You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var StatusMutation struct {
StatusCheck struct {
ID graphql.ID `graphql:"id"`
...
StatusHistory []struct {
Status string `graphql:"status"`
} `graphql:"statusHistory"
} `graphql:"statusCheck(input: $input)"`
}
Here is the mutation:
...
statusMutationInput(input: $input){
id,
statusHistory{
... on SubmittedEvent{
status,
},
... on FinalizeEvent{
status,
}
}
...
This works perfectly if only 1 item is passed into the StatusHistory. However, if I get more than 1, I get the template slice can only have 1 item, got 2 error above.
Here is the error (with debug):
template slice can only have 1 item, got 2, Locations: [], Extensions: map[code:graphql_decode_error internal:map[response:map[body:{\"data\":{\"statusCheck\":{\"id\":\"dHJhbnNhY3Rpb25fNmswaGNwenY\", ... ,\"statusHistory\":[{\"status\":\"SUBMITTED\"},{\"status\":\"FINALIZED\"}]}},\"extensions\":{\"requestId\":\"810d4903-6e2b-4d6c-a6d6-82cf5e33f80a\"}}
We can get 0, 1 or all of these events.
Not quite understanding why this is happening if I'm allowing for more than 1 item to be queried?
Thanks.
EDITED: Forgot to include mutation*
The text was updated successfully, but these errors were encountered:
Have an object defined like this:
Here is the mutation:
This works perfectly if only 1 item is passed into the StatusHistory. However, if I get more than 1, I get the
template slice can only have 1 item, got 2
error above.Here is the error (with debug):
We can get 0, 1 or all of these events.
Not quite understanding why this is happening if I'm allowing for more than 1 item to be queried?
Thanks.
EDITED: Forgot to include mutation*
The text was updated successfully, but these errors were encountered: