@apollographql/graphql-upload-8-fork
Version:
Fork of graphql-upload@8 that works with graphql@15 for compatibility with apollo-server@2
15 lines (12 loc) • 397 B
JavaScript
import { GraphQLScalarType } from 'graphql'
export const GraphQLUpload = new GraphQLScalarType({
name: 'Upload',
description: 'The `Upload` scalar type represents a file upload.',
parseValue: value => value,
parseLiteral() {
throw new Error('‘Upload’ scalar literal unsupported.')
},
serialize() {
throw new Error('‘Upload’ scalar serialization unsupported.')
}
})