UNPKG

graphql-sock

Version:

GraphQL Semantic Output Conversion Kit - converts a cutting edge SDL file that supports semantic nullability into a more traditional SDL file legacy tools can support.

12 lines (11 loc) 716 B
import { GraphQLFieldConfig, GraphQLSchema } from "graphql"; export declare function semanticToNullable(schema: GraphQLSchema): GraphQLSchema; export declare function semanticToStrict(schema: GraphQLSchema): GraphQLSchema; /** * Takes a GraphQL field config and checks to see if the `@semanticNonNull` * directive was applied; if so, converts to a field config that adds * GraphQLNonNull wrapper types in the relevant places if `toStrict` is true. * * @see {@url https://www.apollographql.com/docs/kotlin/advanced/nullability/#semanticnonnull} */ export declare function convertFieldConfig(spec: GraphQLFieldConfig<unknown, unknown, unknown>, toStrict: boolean): GraphQLFieldConfig<unknown, unknown, unknown>;