Class GraphQL.Builder
java.lang.Object
com.codename1.backend.graphql.GraphQL.Builder
- Enclosing class:
GraphQL
-
Method Summary
Modifier and TypeMethodDescriptionbatchLoader(String typeName, String fieldName, GraphQL.BatchLoader loader) ResolvestypeName.fieldNamefor many sources at once withloader.build()The engine.fetcher(String typeName, String fieldName, DataFetcher fetcher) ResolvestypeName.fieldNamewithfetcher.introspection(boolean enabled) Whether__schemaand__typeanswer; on by default, as in Spring for GraphQL (spring.graphql.schema.introspection.enabled).maxDepth(int depth) maxFields(int fields) The deepest nesting of selection sets a document may have; 15 by default.The source the root fields' resolvers are given; null by default.scalar(String typeName, GraphQLScalar scalar) Coerces the custom scalartypeNamewithscalar.typeResolver(String typeName, TypeResolver resolver) Names the object type of values of the interface or uniontypeName.
-
Method Details
-
fetcher
Resolves
typeName.fieldNamewithfetcher.Throws
IllegalArgumentException: when the schema has no such field, or the field already has a resolver -- the build reports the same as errors, as Spring for GraphQL's schema inspection does
-
batchLoader
Resolves
typeName.fieldNamefor many sources at once withloader.Throws
IllegalArgumentException: asfetcher(String, String, DataFetcher)
-
typeResolver
Names the object type of values of the interface or uniontypeName. -
scalar
Coerces the custom scalartypeNamewithscalar. -
introspection
Whether__schemaand__typeanswer; on by default, as in Spring for GraphQL (spring.graphql.schema.introspection.enabled). -
maxFields
The deepest nesting of selection sets a document may have; 15 by default. A deeper document is refused before it runs, which bounds what one request can make the server do. The most fields one document may select, counting every alias and every place a fragment is spread; 2000 unless set. A document over it is refused before anything runs. -
maxDepth
-
rootValue
The source the root fields' resolvers are given; null by default. -
build
The engine.
-