-
Notifications
You must be signed in to change notification settings - Fork 5
"‘Upload’ scalar serialization unsupported." #12
Comments
The reason I have to use version 6.0.0 because version 6.1.4 has a problem with hasura, I can't execute every hasura's queries. |
I close this issue due to export const UploadScalar = new GraphQLScalarType({
name: 'Upload',
description: 'The `Upload` scalar type represents a file upload.',
parseValue(value: any) {
return value
},
serialize(value: any) {
return value
},
parseLiteral(ast) {
throw new Error('‘Upload’ scalar literal unsupported.')
},
}) |
Thanks for pointing this out. I think your workaround is the best way to go, as it seems like we shouldn't have to maintain a list of scalars that don't support serialization. I suppose we could wrap the serialize call in a try block and catch the error? Can you also open another issue with whatever problem you are having with hasura? Or is that the same issue? |
Or perhaps an issue should be opened at graphql-upload to support serialization. |
Ok, I'm going to open a new issue about hasura. |
@bkstorm, I think there are other problems with graphql upload and remote schemas. See ardatan#671 and jaydenseric/graphql-upload#56. |
Latest version of this fork provides the patched Upload scalar and a createServerHttpLink method that creates a terminating link for a subschema that can proxy uploads. |
Hi guy.
I encounter an error when using
Upload
scalar to upload files withmergeSchemas
, this type is supported by Apollo server.I think I found the problem.
v5.2.0...v6.0.0
In the function
serializeArgumentValue
of the fileAddArgumentsAsVariables.ts
, you callBut here is the implementation of
Upload
scalarSo that's why the error is threw.
It would be good if we can check
GraphQLUpload
type.The text was updated successfully, but these errors were encountered: