Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

No subscriptions are fired for CREATED when querying previousValues #498

Closed marktani closed 6 years ago

marktani commented 6 years ago

Current behavior

Subscribing to previousValues in a CREATED subscription prevents subscription events from firing.

Reproduction

For this mutation:

mutation {
  createItem(title: "Test") {
    id
  }
}

this subscription works as expected:

subscription {
  Item(filter: {mutation_in: [CREATED, UPDATED]}) {
    mutation
  }
}

This one doesn't:

subscription {
  Item(filter: {mutation_in: [CREATED, UPDATED]}) {
    mutation
    previousValues {
      id
    }
  }
}

Expected behavior?

The event is fired, and previousValues is null.

marktani commented 6 years ago

This was a transient issue.