A mutation payload must contain a unique success object type with the suffix Success, the base error type BaseUserError, and zero or more specific error types.
Autofixer not available.
Examples of incorrect code for this rule:
type Mutation {
sampleMutation: SampleMutationPayload
}
type SampleMutationPayload {
result: String
}
type Mutation {
sampleMutation: SampleMutationPayload
}
union SampleMutationPayload = String | BaseUserError
type Mutation {
sampleMutation: SampleMutationPayload
}
union SampleMutationPayload = MutationSuccess | Int
Examples of correct code for this rule:
type Mutation {
register(input: RegisterInput!): RegisterPayload
}
union RegisterPayload =
RegisterSuccess
| BaseUserError
| InvalidEmailError
| PasswordTooWeakError