-
Notifications
You must be signed in to change notification settings - Fork 37
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
GraphQL Upload #30
GraphQL Upload #30
Conversation
// does not work | ||
// const { GraphQLUpload } = require("graphql-upload"); | ||
|
||
// does work | ||
const { GraphQLUpload } =require("@graphql-tools/links"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yaacovCR this is the issue I was having in this thread ardatan/graphql-tools#671 (comment). The original GraphQLUpload
throws an error.
Sorry I haven't gotten to this. I'll try to take a look sometime this week. Thanks for the contribution! |
So, to clarify, this is NOT a working example, it is an issue report opened in the form of a PR? This should be handled as an issue in GraphQL Tools linked to reproduction branches on your own fork. Please don’t PR code here until it is in good working order. Closing this on the above assumption. Feel free to reopen when the issues are fixed, or if I’m misunderstanding the situation and the discussed issues have already been resolved. |
The code does work, if you run the server and run the curl request, it will return the uploaded file. This is probably the wrong place to add my issue but I just wanted to highlight that this version works but it might not be correct. The commented code is the correct version according to this comment but it's not working. I think it's fine to close this PR since it's not correct. It would be nice to have an example of how to use graphql-upload with schema stitching. |
This is very helpful for the upstream issue. Not sure how urgent for you to debug as I see there is clear workaround, but the commented out code should be working as you mention. |
If anyone get stuck here in the future, be sure that you dont have |
This PR reproduces an issue where the gateway schema modified scalar is not overriding the local schema version. See ardatan/graphql-tools#671 (comment). I copied the example from
combining-local-and-remote-schemas
and addedgraphql-upload
.When I use the original scalar in the local schema, I receive the following error:
Stacktrace
To test, run the server
yarn start
and then run the following curl command.It will return the filename, mime type and content of the file. If you uncomment the original scalar in the file
graphql-upload/services/local/schema.js
, it will throw the error above.Edit:
Added test,
cd graphql-upload
and runnpx jest
. Again it will pass with the modified scalar, if you change the local schema to use the original scalar, it will throw an error