Add possibility to rename Upload scalar
See original GitHub issueHey,
It would be great to have a possibility to rename scalar. I tried this code, but it is still named Upload
:
import { GraphQLUpload } from 'apollo-upload-server'
const imageTypeDefs = `
scalar Image
`
const imageResolvers = {
Image: GraphQLUpload
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
File Uploads with Apollo Server 2.0 - Apollo GraphQL Blog
Apollo Server 2.0 automatically adds the Upload scalar to the schema, when you are not setting the schema manually.
Read more >Feature Request: FilePicker on Upload scalar #597 - GitHub
It works quite nice with the option to "add query" and "add fragments" directly from the docs. I'm only missing the Tracing view...
Read more >File Upload - gqlgen
To use it you need to add the Upload scalar in your schema, and it will automatically add the marshalling behaviour to Go...
Read more >GraphQL: File Upload & Troubleshooting - Szhshp
scalar Upload always causes error :( · If I add it -> Error: There can be only one type named "Upload" · If...
Read more >Add Upload type to GraphQL - node.js - Stack Overflow
This was working until I changed the image argument type from String to Upload . Where, according to Apollo documentation is enabled by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The best way to validate uploads is to do it the same way you would for any mutation argument; in the mutation resolver.
For example:
In the
uploadImage
mutation resolver:@jaydenseric thank you, this will definitely help 👍