batches: create mutation for upserting batch changes
Created by: BolajiOlajide
Part 1 #780
Test plan
- Using the API console available via
Site Admin
, create a mutation
mutation UpsertEmptyBatchChange {
upsertEmptyBatchChange(namespace: <namespace_id> name: "random-unknown-bc") {
name
id
lastAppliedAt
batchSpecs {
totalCount
nodes {
id
source
}
}
}
}
- Ensure the name doesn't exist in your database.
- After running the mutation, the batch change should be automatically be created , on subsequent runs the mutation will not fail and will always return the existing batch change.