GraphQLUpload.mjs 397 B

1234567891011121314
  1. import { GraphQLScalarType } from 'graphql'
  2. export const GraphQLUpload = new GraphQLScalarType({
  3. name: 'Upload',
  4. description: 'The `Upload` scalar type represents a file upload.',
  5. parseValue: value => value,
  6. parseLiteral() {
  7. throw new Error('‘Upload’ scalar literal unsupported.')
  8. },
  9. serialize() {
  10. throw new Error('‘Upload’ scalar serialization unsupported.')
  11. }
  12. })