Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

Can't retrieve previousValues field for DELETED subscriptions #443

Open marktani opened 6 years ago

marktani commented 6 years ago

Issue by rajit Friday Dec 22, 2017 at 01:16 GMT Originally opened as https://github.com/graphcool/prisma/issues/1444


For bug reports, please fill in the next sections:

Current behavior

I have a subscription along the lines of:

subscription {
  MyEntity(filter: { mutation_in: [DELETED], child: { value: "match" } }) {
    previousValues {
      id
    }
  }
}

I'm subscribed to this via websockets in my app. Whenever I delete a node of type MyEntity, the subscription triggers, but I get an error Insufficient permissions. The detail of the error indicates that I don't have permission to read previousValues.id.

I changed my permission queries to allow anyone to read MyEntity but this still resulted in the Insufficient permissions error.

Expected behavior?

My expectation is that if I can read an item with a normal query then I should be able to fetch the previousValues fields via subscription when it is deleted.

Thanks in advance!

joe-re commented 6 years ago

I have the same problem.. Are there any news? Please let me know if you need to get information for reproduction.