Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Latest commit

 

History

History
28 lines (20 loc) · 641 Bytes

mutations-payloads-unique.md

File metadata and controls

28 lines (20 loc) · 641 Bytes

Mutations must return unique payload types (mutations-payloads-unique)

All mutations must return a unique payload type

Rule Details

Best practice is to have a unique Payload type for every mutation. This allows us to modify any mutation payload without worrying about breaking others.

Autofixer not available.

Examples of incorrect code for this rule:

type Mutation {
  sampleMutation: SampleMutationPayload
  secondMutation: SampleMutationPayload
}

Examples of correct code for this rule:

type Mutation {
  sampleMutation: SampleMutationPayload
  secondMutation: SecondMutationPayload
}