public static interface GraphQlSource.SchemaResourceBuilder extends GraphQlSource.Builder<GraphQlSource.SchemaResourceBuilder>
GraphQlSource
builder that relies on parsing schema definition
files and uses a RuntimeWiring
to create the underlying
GraphQLSchema
.Modifier and Type | Method and Description |
---|---|
GraphQlSource.SchemaResourceBuilder |
configureRuntimeWiring(RuntimeWiringConfigurer configurer)
Configure the underlying
RuntimeWiring.Builder to register
data fetchers, custom scalar types, type resolvers, and more. |
GraphQlSource.SchemaResourceBuilder |
defaultTypeResolver(TypeResolver typeResolver)
Configure the default
TypeResolver to use for GraphQL interface
and union types that don't have such a registration after
applying
RuntimeWiringConfigurer s. |
GraphQlSource.SchemaResourceBuilder |
schemaFactory(BiFunction<TypeDefinitionRegistry,RuntimeWiring,GraphQLSchema> schemaFactory)
Configure a function to create the
GraphQLSchema from the
given TypeDefinitionRegistry and RuntimeWiring . |
GraphQlSource.SchemaResourceBuilder |
schemaResources(Resource... resources)
|
build, configureGraphQl, exceptionResolvers, instrumentation, typeVisitors
GraphQlSource.SchemaResourceBuilder schemaResources(Resource... resources)
resources
- resources with GraphQL schema definitionsGraphQlSource.SchemaResourceBuilder configureRuntimeWiring(RuntimeWiringConfigurer configurer)
RuntimeWiring.Builder
to register
data fetchers, custom scalar types, type resolvers, and more.configurer
- the configurer to applyGraphQlSource.SchemaResourceBuilder defaultTypeResolver(TypeResolver typeResolver)
TypeResolver
to use for GraphQL interface
and union types that don't have such a registration after
applying
RuntimeWiringConfigurer
s.
By default this is set to ClassNameTypeResolver
.
typeResolver
- the TypeResolver
to useGraphQlSource.SchemaResourceBuilder schemaFactory(BiFunction<TypeDefinitionRegistry,RuntimeWiring,GraphQLSchema> schemaFactory)
GraphQLSchema
from the
given TypeDefinitionRegistry
and RuntimeWiring
.
This may be used for federation to create a combined schema.
By default, the schema is created with
SchemaGenerator.makeExecutableSchema(graphql.schema.idl.TypeDefinitionRegistry, graphql.schema.idl.RuntimeWiring)
.
schemaFactory
- the function to create the schema