I have object something like below:
type SomeEventInput {
event: Event
}
type Event {
type: EventType!
}
enum EventType {
MORNING
EVENING
AFTERNOON
MIDNIGHT
}
Mutation.SomeEvent(input: SomeEventInput!): Boolean!
What i am trying to test it something like :
mutation SomeEvent($input: SomeEventInput!) {
SomeEventInput(input: {Event: {type: MORNING}})
}
But it is showing error for
"message": "Variable "$input" is never used in operation "SomeEvent".",
1
It is right, you aren't using
$input
anywhere, only declaring it. Did you add that accidentally? Also seems like maybe you wantSomeEvent(input: { event: { type: MORNING } })
?3 hours ago