-
-
Notifications
You must be signed in to change notification settings - Fork 821
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
Receive 'Cannot use GraphQLSchema' error when using makeExecutableSchema in junction with SchemaLink #1790
Comments
Hi @MikeWinfied . I ran that sandbox code locally and couldn't reproduce the issue. Is the code where you're seeing the issue also being run on Code Sandbox or are you getting that same error when running the code locally? |
Hi, @danielrearden! Thanks for your quick reply! I'm seeing the same error on my local environment. The code on sandbox is a boiled-down version to trace down the issue. |
@danielrearden @MikeWinfied We don't have |
@ardatan does it mean that the issue should be redirected to |
@ardatan I thought it might be an issue with |
@MikeWinfied can you try removing |
@danielrearden, the same 😓 The removal didn't help and
|
You might get the same error even with the same version of graphql if you have multiple instances of GraphQL, i.e. if was not always being used as a peer dependency, or if sometimes uses as a fork of graphql. Did apollo fork graphql at some point internally? Not sure if above is relevant or even actually true in full, just thinking out loud (sort of). |
Hi, @danielrearden! Should I address my issue elsewhere? |
Based on the comment in the issue linked above, it sounds like this error might be specific to |
Workers? |
Running into this when trying to use the approach mentioned by OP in a Cypress Component Test. Tried to work around it by dynamically importing all needed dependencies, but cypress doesn't support that currently in that scenario.
|
After some digging, what I found so far is that the default cypress webpack bundle ends up using different entry points for the graphql module:
while
|
Submitted an PR over at apollo-client (apollographql/apollo-client#7184) which fixes the issue for me. If you'd like to see if it works for you as well, feel free to test with
as dependency |
Is this issue still relevant? |
The fix that went into 3.3.0-beta14 and 3.2.5 solved it for me |
Ok closing this issue then because the issue seems unrelated to graphql-tools. |
Hi @stoically , have you been able to fix this issue?, I'm getting the same issue with Cypress as well, it seems that there is an issue when using
Any ideas ? Thank you |
Could you please create a reproduction in a different issue? Thanks! |
Hi, everyone!
When trying to run GraphQL w/o a server, providing
SchemaLink
created usingmakeExecutableSchema
, I receive an error when running a query:My dependencies are:
From what I can gather, I have only one
graphql
available so I'm not even sure that the message hits in the right direction.The demo is available here
I don't have a GraphQL server available at my disposal. After considering the
@rest
directive I've come to the conclusion that having full-bodied resolvers would be cleaner and would easily integrate into the existing codebase.The text was updated successfully, but these errors were encountered: