@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;
22 lines (21 loc) • 1.09 kB
text/typescript
import type { TransportGetSubgraphExecutor } from '@graphql-mesh/transport-common';
import { type RESTTransportOptions } from '@graphql-mesh/transport-rest';
import type { Logger, MeshFetch } from '@graphql-mesh/types';
import { loadGraphQLSchemaFromJSONSchemas } from './loadGraphQLSchemaFromJSONSchemas.cjs';
import type { JSONSchemaLoaderOptions } from './types.cjs';
export default loadGraphQLSchemaFromJSONSchemas;
export * from './loadGraphQLSchemaFromJSONSchemas.cjs';
export * from './getComposerFromJSONSchema.cjs';
export * from './getDereferencedJSONSchemaFromOperations.cjs';
export * from './getGraphQLSchemaFromDereferencedJSONSchema.cjs';
export type * from './types.cjs';
export declare function loadJSONSchemaSubgraph(name: string, options: JSONSchemaLoaderOptions): (ctx: {
fetch: MeshFetch;
cwd: string;
logger: Logger;
}) => {
name: string;
schema$: Promise<import("graphql").GraphQLSchema>;
};
export { processDirectives } from '@graphql-mesh/transport-rest';
export declare const getSubgraphExecutor: TransportGetSubgraphExecutor<RESTTransportOptions>;