This article provides an introduction to GraphQL Mutation Standards.
When working with GraphQL in the Fuuz environment there are four types of mutations to consider:
Create
Update
Upsert
Delete
Only use a create statements when you are confident data does not exist
Examples include: Historical records, Time-sensitive data, Tables that do not allow updates, or a process that only adds new records
Only use an update statement when you are confident data does exist
Example: Data-driven events that update data behind the scenes
Example: Process that sends records elsewhere and updates their status
Only use an upsert statement when you are not confident about existing data
Example: Integration processes that pull in data from other systems and store it by their IDs
Only use delete statements when absolutely necessary, consider using TTL indexing instead on tables as an alternative
All mutations used in production flows must:
Start with the word mutation
Be named the same as the mutation action itself
Contain the parameter which is $payload: [SomeObejct!]!
Avoid containing disable reference checks without prior approval