SchemaParser

Parses a GraphQL schema definition file (schema.graphql) and extracts all schema-level type definitions (input object types, enum types, scalar types, object types, interface types, and union types) for code generation.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun parse(file: File): List<SchemaType>

Parses a schema file and returns all schema-level type definitions. Root operation type names from a SchemaDefinition are not included in this result; use parseWithRootTypes if you need them.

Link copied to clipboard

Parses a schema file and returns a SchemaParseResult containing all schema-level type definitions and any root operation type names defined by a SchemaDefinition.

Link copied to clipboard
fun toGraphQLType(type: Type<*>): GraphQLType

Converts a graphql-java Type AST node to our GraphQLType IR.