@PublicApi public class SchemaGenerator extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SchemaGenerator.Options
These options control how the schema generation works
|
Constructor and Description |
---|
SchemaGenerator() |
Modifier and Type | Method and Description |
---|---|
static GraphQLSchema |
createdMockedSchema(java.lang.String sdl)
Created a schema from the SDL that is has a mocked runtime.
|
GraphQLSchema |
makeExecutableSchema(SchemaGenerator.Options options,
TypeDefinitionRegistry typeRegistry,
RuntimeWiring wiring)
This will take a
TypeDefinitionRegistry and a RuntimeWiring and put them together to create a executable schema
controlled by the provided options. |
GraphQLSchema |
makeExecutableSchema(TypeDefinitionRegistry typeRegistry,
RuntimeWiring wiring)
This will take a
TypeDefinitionRegistry and a RuntimeWiring and put them together to create a executable schema |
public static GraphQLSchema createdMockedSchema(java.lang.String sdl)
sdl
- the SDL to be mockedRuntimeWiring.MOCKED_WIRING
public GraphQLSchema makeExecutableSchema(TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem
TypeDefinitionRegistry
and a RuntimeWiring
and put them together to create a executable schematypeRegistry
- this can be obtained via SchemaParser.parse(String)
wiring
- this can be built using RuntimeWiring.newRuntimeWiring()
SchemaProblem
- if there are problems in assembling a schema such as missing type resolvers or no operations definedpublic GraphQLSchema makeExecutableSchema(SchemaGenerator.Options options, TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem
TypeDefinitionRegistry
and a RuntimeWiring
and put them together to create a executable schema
controlled by the provided options.options
- the controlling optionstypeRegistry
- this can be obtained via SchemaParser.parse(String)
wiring
- this can be built using RuntimeWiring.newRuntimeWiring()
SchemaProblem
- if there are problems in assembling a schema such as missing type resolvers or no operations defined