@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;
9 lines (8 loc) • 414 B
TypeScript
import { JSONSchemaObject } from 'json-machete';
import { SchemaComposer } from 'graphql-compose';
export declare function getGenericJSONScalar({ isInput, subSchema, schemaComposer, validateWithJSONSchema, }: {
isInput: boolean;
subSchema: JSONSchemaObject;
schemaComposer: SchemaComposer<any>;
validateWithJSONSchema: (data: any) => boolean;
}): import("graphql-compose").ScalarTypeComposer<any>;