@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;
8 lines (7 loc) • 426 B
text/typescript
import { GraphQLObjectType, GraphQLTypeResolver } from 'graphql';
export declare function getTypeResolverFromOutputTCs({ possibleTypes, discriminatorField, discriminatorMapping, statusCodeTypeNameMap, }: {
possibleTypes: readonly GraphQLObjectType[];
discriminatorField?: string;
discriminatorMapping?: Record<string, string>;
statusCodeTypeNameMap?: Record<string, string>;
}): GraphQLTypeResolver<any, any>;