A GraphQL mutation requests a state-changing action from a server and selects the fields returned afterward. In the board-game API, it updates a game and returns its new name. section 10.2.4
Use a mutation through this practical sequence:
- Authenticate first: obtain a JWT through SwaggerUI, then configure BananaCakePop with Bearer authorization. Protected mutation methods otherwise return 401 Unauthorized. section 10.2.4
- Send a mutation containing the target entity's identifier and changed values, then select the response fields needed for confirmation. section 10.2.4
- Run a separate query afterward to confirm that the change was saved in the database. section 10.5.2
Rename a board game
The following operation changes board game 1 and requests only the resulting name: mutation { updateBoardGame(model: { id: 1, name: "Die Macher (v2)" }) { name } }. A successful response returns "Die Macher (v2)". section 10.2.4
Use the authorization settings to select Bearer authentication and paste the JWT before executing a protected mutation. section 10.2.4

