Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Subscription does not trigger when using variable for mutation_in #820

Closed
kbrandwijk opened this issue Oct 15, 2017 · 1 comment
Closed

Comments

@kbrandwijk
Copy link
Contributor

kbrandwijk commented Oct 15, 2017

What is the current behavior?
When you try to use an enum value in a subscription variable, the subscription does not trigger. In the playground, the subscription starts succesfully, but never gets any results.

Please share the relevant part of your project (GraphQL schema, functions, permissions, ...) for easier reproduction

type User @model {
  createdAt: DateTime!
  id: ID! @isUnique
  updatedAt: DateTime!
}
mutation{
  createUser{id}
}

If applicable, share the query, mutation or subscription for reproduction
This one works:

subscription{
  User(filter: {mutation_in: [CREATED]}){
    node{
      id
    }
  }
}

This one doesn't:

subscription($filter: [_ModelMutationType!]){
  User(filter: { mutation_in: $filter}){
    node{
      id
    }
  }
}

with variables:

{"filter": ["CREATED"]}

This one also doesn't work:

subscription($filter: UserSubscriptionFilter){
  User(filter: $filter){
    node{
      id
    }
  }
}

with variables:

{"filter": { "mutation_in": ["CREATED"] }}

What is the expected behavior?
The subscription is triggered in all cases.

@marktani
Copy link
Contributor

This issue has been moved to graphcool/graphcool-framework.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants