Package graphql.schema.idl
Class SchemaGenerator.Options
- java.lang.Object
-
- graphql.schema.idl.SchemaGenerator.Options
-
- Enclosing class:
- SchemaGenerator
public static class SchemaGenerator.Options extends java.lang.Object
These options control how the schema generation works
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaGenerator.Options
captureAstDefinitions(boolean captureAstDefinitions)
Memory can be saved if the original AST definitions are not associated with the built runtime types.static SchemaGenerator.Options
defaultOptions()
boolean
isCaptureAstDefinitions()
boolean
isUseAppliedDirectivesOnly()
boolean
isUseCommentsAsDescription()
SchemaGenerator.Options
useAppliedDirectivesOnly(boolean useAppliedDirectivesOnly)
The classGraphQLDirective
should really represent the definition of a directive, and not its use on schema elements.SchemaGenerator.Options
useCommentsAsDescriptions(boolean useCommentsAsDescription)
This controls whether # comments can be used as descriptions in the built schema.
-
-
-
Method Detail
-
isUseCommentsAsDescription
public boolean isUseCommentsAsDescription()
-
isCaptureAstDefinitions
public boolean isCaptureAstDefinitions()
-
isUseAppliedDirectivesOnly
public boolean isUseAppliedDirectivesOnly()
-
defaultOptions
public static SchemaGenerator.Options defaultOptions()
-
useCommentsAsDescriptions
public SchemaGenerator.Options useCommentsAsDescriptions(boolean useCommentsAsDescription)
This controls whether # comments can be used as descriptions in the built schema. For specification legacy reasons # comments used to be used as schema element descriptions. The specification has since clarified this and "" quoted string descriptions are the sanctioned way to make scheme element descriptions.- Parameters:
useCommentsAsDescription
- the flag to control whether comments can be used as schema element descriptions- Returns:
- a new Options object
-
captureAstDefinitions
public SchemaGenerator.Options captureAstDefinitions(boolean captureAstDefinitions)
Memory can be saved if the original AST definitions are not associated with the built runtime types. However some tooling may require them.- Parameters:
captureAstDefinitions
- the flag on whether to capture AST definitions- Returns:
- a new Options object
-
useAppliedDirectivesOnly
public SchemaGenerator.Options useAppliedDirectivesOnly(boolean useAppliedDirectivesOnly)
The classGraphQLDirective
should really represent the definition of a directive, and not its use on schema elements. The newGraphQLAppliedDirective
has been created to fix this however for legacy reasons both classes will be put on schema elements. This flag allows you to only useGraphQLAppliedDirective
on schema elements.- Parameters:
useAppliedDirectivesOnly
- the flag on whether to useGraphQLAppliedDirective
s only on schema elements- Returns:
- a new Options object
-
-