Package graphql.schema.idl
Class SchemaParser
java.lang.Object
graphql.schema.idl.SchemaParser
This can take a graphql schema definition and parse it into a
TypeDefinitionRegistry
of
definitions ready to be placed into SchemaGenerator
say-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildRegistry
(Document document) special method to build directly a TypeDefinitionRegistry from a Document useful for Introspection => IDL (Document) => TypeDefinitionRegistryParse a file of schema definitions and create aTypeDefinitionRegistry
parse
(InputStream inputStream) Parse a inputStream of schema definitions and create aTypeDefinitionRegistry
Parse a reader of schema definitions and create aTypeDefinitionRegistry
parse
(Reader reader, @Nullable ParserOptions parserOptions) Parse a reader of schema definitions and create aTypeDefinitionRegistry
Parse a string of schema definitions and create aTypeDefinitionRegistry
-
Constructor Details
-
SchemaParser
public SchemaParser()
-
-
Method Details
-
parse
Parse a file of schema definitions and create aTypeDefinitionRegistry
- Parameters:
file
- the file to parse- Returns:
- registry of type definitions
- Throws:
SchemaProblem
- if there are problems compiling the schema definitions
-
parse
Parse a inputStream of schema definitions and create aTypeDefinitionRegistry
- Parameters:
inputStream
- the inputStream to parse- Returns:
- registry of type definitions
- Throws:
SchemaProblem
- if there are problems compiling the schema definitions
-
parse
Parse a reader of schema definitions and create aTypeDefinitionRegistry
- Parameters:
reader
- the reader to parse- Returns:
- registry of type definitions
- Throws:
SchemaProblem
- if there are problems compiling the schema definitions
-
parse
public TypeDefinitionRegistry parse(Reader reader, @Nullable ParserOptions parserOptions) throws SchemaProblem Parse a reader of schema definitions and create aTypeDefinitionRegistry
- Parameters:
reader
- the reader to parseparserOptions
- the parse options to use while parsing- Returns:
- registry of type definitions
- Throws:
SchemaProblem
- if there are problems compiling the schema definitions
-
parse
Parse a string of schema definitions and create aTypeDefinitionRegistry
- Parameters:
schemaInput
- the schema string to parse- Returns:
- registry of type definitions
- Throws:
SchemaProblem
- if there are problems compiling the schema definitions
-
parseImpl
-
buildRegistry
special method to build directly a TypeDefinitionRegistry from a Document useful for Introspection => IDL (Document) => TypeDefinitionRegistry- Parameters:
document
- containing type definitions- Returns:
- the TypeDefinitionRegistry containing all type definitions from the document
- Throws:
SchemaProblem
- if an error occurs
-