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
Calling the above mutation using apollo.watchQuery executes successfully on GraphCool, but the client produces the following error:
Error: Invalid variable referenced in @include directive.
at directives.js: 42
at Array.some( < anonymous > )
at Object.shouldInclude(directives.js: 20)
at graphql.js: 27
at Array.forEach( < anonymous > )
at executeSelectionSet(graphql.js: 26)
at graphql.js: 55
at Array.forEach( < anonymous > )
at executeSelectionSet(graphql.js: 26)
at graphql.js: 94
The text was updated successfully, but these errors were encountered:
I created a currently failing test that reproduces the issue. The issue reproduces when calling graphql-anywhere's filter, propType, 'check', or even graphql with a fragment that uses a variable.
Here's a fairly simple reproducible sample:
importgqlfrom'graphql-tag';importpropTypefrom'graphql-anywhere';constfragment=gql` fragment visitor on Visitor { pageViews user @include(if: $isAuthenticated) { username name email } }`;constpropTypes={visitor: propType(fragment),};
I'm duplicating this issue because I've encountered it and it appears the issue was lost and needed to be recreated (ref: https://stackoverflow.com/questions/46004129/invalid-variable-referenced-in-include-directive)
Quoted below vvv
I'll duplicate my issue here hoping that someone may give me a hint to where I'm going wrong.
Here's the schema on GraphCool:
Here's a fragment in my Angular code:
Here's my GraphQL query:
Calling the above mutation using
apollo.watchQuery
executes successfully on GraphCool, but the client produces the following error:The text was updated successfully, but these errors were encountered: