-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
Upload scalar support for the schema wrapping #2795
Comments
@ardatan thanks for your answer! But is it safe to just return the |
@mikeconley12 It is passed internally to the subschema so I don't think it is unsafe. @yaacovCR What do you think? |
jaydenseric/graphql-upload#194 @jaydenseric has some valid reasons for not changing the scalar. He suggests a workaround over there for us to avoid “serializing” the scalar using the normal method, which I don’t find terribly appealing. I think this might relate to a broader graphql discussion about whether there could be a way to mark a scalar (or enum) as only valid for input (or output). Our present options are to take up his extensions suggestion or just encourage users to use our version of the scalar without the serialize check. Its perfectly safe, you just have to remember on your own to not use the upload scalar as output. |
Thank you for the answers! |
Is your feature request related to a problem? Please describe.
I'm using
@graphql-tools/[email protected]
package with[email protected]
. And I have code similar to this:The
schema
has theUpload
scalar from thegraphql-upload
package. When I run my code I have the following error:Error: ‘Upload’ scalar serialization unsupported.
. Theserialize
method is called by thewrapSchema
function.Please see the links:
graphql-tools/packages/utils/src/transformInputValue.ts
Line 44 in 75fe51f
graphql-tools/packages/delegate/src/createRequest.ts
Line 110 in 75fe51f
Describe the solution you'd like
Is it possible to avoid calling the
serialize
method when using thewrapSchema
function? Or is there another solution?Describe alternatives you've considered
I defined my own version of the
Upload
scalar:This solved the error, but it doesn't seem safe
Additional context
My Node.js version is v14.16.0 and I'm using Ubuntu 20.04
The text was updated successfully, but these errors were encountered: