I have a set of mutations that trigger the local state of certain types of popups. They\'re generally set up like this:
openDialog: (_, variables, { cache }) =
Answer to the actual problem seems lay in the query. Initially Apollo client was not validating types for @client
queries/mutations so your mutation could look like you wrote it in the question:
mutation AlertOpenDialog($type: String!) {
openDialog(type: $type) @client
}
the correct way of writing above is to specify (select) all the simple type (scalar) fields you wanna get in a response. So in regard to the @Vic answer the mutation should look more like:
mutation AlertOpenDialog($type: String!) {
openDialog(type: $type) @client {
dialog {
id
}
}
}