Package graphql.schema
Class GraphQLSchema.Builder
java.lang.Object
graphql.schema.GraphQLSchema.Builder
- Enclosing class:
GraphQLSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set
<GraphQLDirective> private final Set
<GraphQLType> private GraphQLCodeRegistry
private SchemaDefinition
private String
private List
<SchemaExtensionDefinition> private GraphQLObjectType
private GraphQLObjectType
private GraphQLObjectType
private final List
<GraphQLAppliedDirective> private final List
<GraphQLDirective> private GraphQLObjectType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalDirective
(GraphQLDirective additionalDirective) additionalDirectives
(Set<GraphQLDirective> additionalDirectives) additionalType
(GraphQLType additionalType) additionalTypes
(Set<GraphQLType> additionalTypes) build()
Builds the schemabuild
(Set<GraphQLType> additionalTypes) Deprecated.build
(Set<GraphQLType> additionalTypes, Set<GraphQLDirective> additionalDirectives) Deprecated.- Use theadditionalType(GraphQLType)
andadditionalDirective(GraphQLDirective)
methodsprivate GraphQLSchema
This is used to clear all the directives in the builder so far.codeRegistry
(GraphQLCodeRegistry codeRegistry) definition
(SchemaDefinition definition) description
(String description) extensionDefinitions
(List<SchemaExtensionDefinition> extensionDefinitions) fieldVisibility
(GraphqlFieldVisibility fieldVisibility) Deprecated.introspectionSchemaType
(GraphQLObjectType introspectionSchemaType) mutation
(GraphQLObjectType mutationType) mutation
(GraphQLObjectType.Builder builder) query
(GraphQLObjectType queryType) query
(GraphQLObjectType.Builder builder) subscription
(GraphQLObjectType subscriptionType) subscription
(GraphQLObjectType.Builder builder) private GraphQLSchema
validateSchema
(GraphQLSchema graphQLSchema) withSchemaAppliedDirective
(GraphQLAppliedDirective appliedDirective) withSchemaAppliedDirectives
(GraphQLAppliedDirective... appliedDirectives) withSchemaAppliedDirectives
(Collection<? extends GraphQLAppliedDirective> appliedDirectives) withSchemaDirective
(GraphQLDirective directive) withSchemaDirectives
(GraphQLDirective... directives) withSchemaDirectives
(Collection<? extends GraphQLDirective> directives)
-
Field Details
-
queryType
-
mutationType
-
introspectionSchemaType
-
subscriptionType
-
codeRegistry
-
definition
-
extensionDefinitions
-
description
-
additionalDirectives
-
additionalTypes
-
schemaDirectives
-
schemaAppliedDirectives
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
query
-
query
-
mutation
-
mutation
-
subscription
-
subscription
-
fieldVisibility
Deprecated.- Parameters:
fieldVisibility
- the field visibility- Returns:
- this builder
-
codeRegistry
-
additionalTypes
-
additionalType
-
clearAdditionalTypes
-
additionalDirectives
-
additionalDirective
-
clearDirectives
-
withSchemaDirectives
-
withSchemaDirectives
public GraphQLSchema.Builder withSchemaDirectives(Collection<? extends GraphQLDirective> directives) -
withSchemaDirective
-
withSchemaDirective
-
withSchemaAppliedDirectives
public GraphQLSchema.Builder withSchemaAppliedDirectives(GraphQLAppliedDirective... appliedDirectives) -
withSchemaAppliedDirectives
public GraphQLSchema.Builder withSchemaAppliedDirectives(Collection<? extends GraphQLAppliedDirective> appliedDirectives) -
withSchemaAppliedDirective
-
withSchemaAppliedDirective
-
clearSchemaDirectives
This is used to clear all the directives in the builder so far.- Returns:
- the builder
-
definition
-
extensionDefinitions
public GraphQLSchema.Builder extensionDefinitions(List<SchemaExtensionDefinition> extensionDefinitions) -
description
-
introspectionSchemaType
-
build
Deprecated.- Use theadditionalType(GraphQLType)
methodsBuilds the schema- Parameters:
additionalTypes
- - please don't use this anymore- Returns:
- the built schema
-
build
@Deprecated public GraphQLSchema build(Set<GraphQLType> additionalTypes, Set<GraphQLDirective> additionalDirectives) Deprecated.- Use theadditionalType(GraphQLType)
andadditionalDirective(GraphQLDirective)
methodsBuilds the schema- Parameters:
additionalTypes
- - please don't use this any moreadditionalDirectives
- - please don't use this any more- Returns:
- the built schema
-
build
Builds the schema- Returns:
- the built schema
-
buildImpl
-
validateSchema
-
additionalType(GraphQLType)
methods