graphql-static-binding
Version:
Generate static binding files for a GraphQL schema
15 lines (14 loc) • 987 B
TypeScript
import { GraphQLObjectType, GraphQLUnionType, GraphQLInputObjectType, GraphQLScalarType, GraphQLEnumType, GraphQLInterfaceType } from "graphql";
export interface Generator {
Main: (queryType: GraphQLObjectType, mutationType?: GraphQLObjectType | null, subscriptionType?: GraphQLObjectType | null) => string;
Header: (schema: string) => string;
SchemaType?: (queryType: GraphQLObjectType, mutationType?: GraphQLObjectType | null, subscriptionType?: GraphQLObjectType | null) => string;
RootType?: (type: GraphQLObjectType) => string;
SubscriptionType?: (type: GraphQLObjectType) => string;
GraphQLUnionType?: (type: GraphQLUnionType) => string;
GraphQLInputObjectType?: (type: GraphQLInputObjectType) => string;
GraphQLObjectType?: (type: GraphQLObjectType) => string;
GraphQLScalarType?: (type: GraphQLScalarType) => string;
GraphQLEnumType?: (type: GraphQLEnumType) => string;
GraphQLInterfaceType?: (type: GraphQLInterfaceType) => string;
}