UNPKG

@omnigraph/json-schema

Version:

This package generates GraphQL Schema from JSON Schema and sample JSON request and responses. You can define your root field endpoints like below in your GraphQL Config for example;

17 lines (16 loc) 449 B
import { GraphQLScalarType } from 'graphql'; export const GraphQLFile = new GraphQLScalarType({ name: 'File', description: 'The `File` scalar type represents a file upload.', extensions: { codegenScalarType: 'File', }, }); export const GraphQLVoid = new GraphQLScalarType({ name: 'Void', description: 'Represents empty values', serialize: () => '', extensions: { codegenScalarType: 'void', }, });