-
Notifications
You must be signed in to change notification settings - Fork 2k
Error: Must provide Source. Received: undefined after upgrade to [email protected] #2503
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
Comments
Same here, it's possible the problem is in graphql-tools instead though as it seems to begin from there.
at var graphql_1 = require("graphql"); It seems that the bolded part graphql_1.introspectionQuery is undefined which then causes the error at node_modules/graphql/language/parser.js:82:67) If I change that line from graphql_1.introspectionQuery -> graphql_1.getIntrospectionQuery() it seems to work. EDIT: Ah, it's deprecated, mentioned in the changelogs: |
Should be fixed in graphql-tools v4.0.7. (https://github.com/apollographql/graphql-tools/blob/master/CHANGELOG.md) Which version are you using? |
I
I was on latest v5 alpha, I’ll try latest stable tomorrow. |
This is almost certainly due to the existence of multiple different versions of # using yarn
yarn why graphql
# using npm
npm ls graphql While GraphQL 15 is a major change, you may find that the libraries you use that have a stated dependency of 14 will still work with the new version. If this is the case, you can force the use of version 15 everywhere using yarn's resolutions or npm-force-resolutions. However, the real solution is to make sure all libraries are updated to use the newest version of |
Maybe op has a different problem, but for me at least, the problem seems to be in graphql-tools v5.0.0-alpha.2, downgrading to 4.0.7 fixed the problem. |
Should definitely be fixed in graphql-tools alpha. One thing you can try is to delete your node_modules folder and reinstall: Of note, this path is no longer within the graphql-tools alpha version: Having been replaced by: |
I removed node_modules and package-lock.json several times during testing and the problem always reoccurred, but I think I found the problem. There's a version 5.0.0-rc.1 published a year ago in NPM registry and it seems that for some reason npm was installing that version instead. I guess it thought it was newer than the 5.0.0-alpha.2. I had ^5.0.0-alpha.2 in my package.json. This is a part of the package.json from graphql-tools that was getting installed and it seems to be the wrong version: "_from": "graphql-tools@^5.0.0-alpha.2", |
Ahah, makes sense now, thanks! That is a very old rc, and graphql-tools has gone back to alphas prior to release of v5. |
@yaacovCR Thanks investigating this issue 👍 |
I've bumped to the latest "graphql-tools": "^6.0.6", + "graphql": "15.0.0", and i still receive this error. |
Does @mike-marcacci comment above give and additional info: #2503 (comment) |
I don't have multiple graphql versions |
Same here 😕 |
So far from above the problem seems to be with graphql-tools rather than graphql-js... You might want to open an issue there with attention to version of graphql-tools. A minimal reproduction would be helpful. |
ok i raised an issue there |
this repo example fail Apollo federation migrate example |
I had the same issue after upgrading to graphql v15 "graphql": "^15.1.0",
"apollo-server-express": "^2.16.0" After reading through comments, I added "resolutions": {
"graphql-tools": "4.0.7"
} Following this, deleted my And it fixed my issue |
@a7ul Thanks! your solution works for me! |
thanks man it worked. |
I ran |
For anyone who happens to reach this thread from Googling and is using Once I used this Authentication header instead of a fully signed V4 request, my POST requests went through successfully. Cheers! |
@IvanGoncharov can this solution be mentioned somewhere in documentation? maybe some section about upgrading to v15? |
Installing the most recent version of |
Fixed my issue by updating |
Title.
Downgrade to [email protected] solve problem.
The text was updated successfully, but these errors were encountered: