Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@skip and @include are not supported #14

Closed
jonaskello opened this issue Aug 23, 2018 · 0 comments
Closed

@skip and @include are not supported #14

jonaskello opened this issue Aug 23, 2018 · 0 comments

Comments

@jonaskello
Copy link
Member

jonaskello commented Aug 23, 2018

For example this query:

query ($noProducts: Boolean!) {
  products @skip(if: $noProducts) {
    id
  }
}

With variables:

{  "noProducts": true }

Gives this response:

{
  "data": {}
}

This will cause an error on normalize() becuse gql-cache thinks that there should be a field for products in the repsonse but it does not exist since the server skips it.

Note that @skip and @include are standard directives included in the specification:

GraphQL implementations should provide the @skip and @include directives.

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

No branches or pull requests

1 participant