Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start a transaction in GraphQL.
GraphQL
mutation StartTransaction {
[1] {
success
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using commitTransaction to start instead of commit at the end.
Using rollbackTransaction which cancels changes.
✗ Incorrect
The beginTransaction mutation starts a new transaction.
2fill in blank
mediumComplete the code to commit a transaction after changes.
GraphQL
mutation CommitChanges {
[1] {
success
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using rollbackTransaction which cancels changes.
Using beginTransaction which starts but does not save.
✗ Incorrect
The commitTransaction mutation saves all changes made during the transaction.
3fill in blank
hardFix the error in the mutation to cancel a transaction.
GraphQL
mutation CancelTransaction {
[1] {
success
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using commitTransaction which saves changes.
Using beginTransaction which starts a transaction.
✗ Incorrect
The rollbackTransaction mutation cancels all changes made during the transaction.
4fill in blank
hardFill both blanks to start and then commit a transaction.
GraphQL
mutation ManageTransaction {
[1] {
success
}
[2] {
success
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping commit and rollback.
Using endTransaction which is not standard.
✗ Incorrect
First, beginTransaction starts the transaction, then commitTransaction saves the changes.
5fill in blank
hardFill all three blanks to start, rollback, and then commit a transaction correctly.
GraphQL
mutation ComplexTransaction {
[1] {
success
}
[2] {
success
}
[3] {
success
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Committing before rollback.
Using endTransaction which is not standard.
✗ Incorrect
Start with beginTransaction, then rollbackTransaction cancels changes, and finally commitTransaction saves if needed.