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

4.0.5 patch breaks @skip and @include directives in schema stitching #1159

Closed
herenickname opened this issue Jun 27, 2019 · 6 comments
Closed
Labels

Comments

@herenickname
Copy link

After we have updated graphql-tools to 4.0.5:
image

@Skip and @include directives broke in schema stitching.

For example we had this query:

 games(order_by: {
  stats: {
   matches: desc
  }
 }) {
  id
  name
  shortName
  rawName: raw_name
  disabled
  stats @include(if: $requestStats) {
   id
   matchesCount: matches
   usersOnlineCount: users_online
   usersPlayed: users_played
  }
 }
}

We get this:
image

@yaacovCR
Copy link
Collaborator

yaacovCR commented Jun 28, 2019

Not having any directive support in addResolversToSchemas was protecting against default of no directives in mergeSchemas and adding back the default directives. Fix is within mergeSchemas to pass undefined instead of empty array when directive option is not enabled.

@yaacovCR
Copy link
Collaborator

Should be fixed in graphql-tools-fork. Let me know if you can if you have any issues.

@Grmiade
Copy link

Grmiade commented Aug 23, 2019

Any news about this issue?

@Necmttn
Copy link

Necmttn commented Oct 25, 2019

image
this was the solution for our case.

@kamilkisiela
Copy link
Collaborator

We recently released an alpha version of GraphQL Tools (#1308) that should fix the issue.

Please update graphql-tools to next or run:

npx match-version graphql-tools next

Let us know if it solves the problem, we're counting for your feedback! :)

@yaacovCR yaacovCR mentioned this issue Mar 27, 2020
22 tasks
@yaacovCR
Copy link
Collaborator

Rolled into #1306 .

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

No branches or pull requests

5 participants