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;

18 lines (17 loc) 821 B
import { MeshFetch } from '@graphql-mesh/types'; import { loadGraphQLSchemaFromJSONSchemas } from './loadGraphQLSchemaFromJSONSchemas.cjs'; import { JSONSchemaLoaderOptions } from './types.cjs'; export default loadGraphQLSchemaFromJSONSchemas; export * from './loadGraphQLSchemaFromJSONSchemas.cjs'; export * from './getComposerFromJSONSchema.cjs'; export * from './getDereferencedJSONSchemaFromOperations.cjs'; export * from './getGraphQLSchemaFromDereferencedJSONSchema.cjs'; export * from './types.cjs'; export declare function loadJSONSchemaSubgraph(name: string, options: JSONSchemaLoaderOptions): (ctx: { fetch: MeshFetch; cwd: string; }) => { name: string; schema$: Promise<import("graphql").GraphQLSchema>; }; export { getSubgraphExecutor, processDirectives } from '@graphql-mesh/transport-rest';