public static class SchemaPrinter.Options
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static SchemaPrinter.Options |
defaultOptions() |
SchemaPrinter.Options |
descriptionsAsHashComments(boolean flag)
Descriptions are defined as preceding string literals, however an older legacy
versions of SDL supported preceding '#' comments as
descriptions.
|
GraphqlTypeComparatorRegistry |
getComparatorRegistry() |
java.util.function.Predicate<GraphQLDirective> |
getIncludeDirective() |
SchemaPrinter.Options |
includeDirectives(boolean flag)
Allow to print directives.
|
SchemaPrinter.Options |
includeDirectives(java.util.function.Predicate<GraphQLDirective> includeDirective) |
SchemaPrinter.Options |
includeExtendedScalarTypes(boolean flag)
This will allow you to include the graphql 'extended' scalar types that come with graphql-java such as
GraphQLBigDecimal or GraphQLBigInteger
|
SchemaPrinter.Options |
includeIntrospectionTypes(boolean flag)
This will allow you to include introspection types that are contained in a schema
|
SchemaPrinter.Options |
includeScalarTypes(boolean flag)
This will allow you to include scalar types that are contained in a schema
|
SchemaPrinter.Options |
includeSchemaDefinition(boolean flag)
This will force the printing of the graphql schema definition even if the query, mutation, and/or subscription
types use the default names.
|
boolean |
isDescriptionsAsHashComments() |
boolean |
isIncludeExtendedScalars() |
boolean |
isIncludeIntrospectionTypes() |
boolean |
isIncludeScalars() |
boolean |
isIncludeSchemaDefinition() |
boolean |
isUseAstDefinitions() |
SchemaPrinter.Options |
setComparators(GraphqlTypeComparatorRegistry comparatorRegistry)
The comparator registry controls the printing order for registered
GraphQLTypes. |
SchemaPrinter.Options |
useAstDefinitions(boolean flag)
This flag controls whether schema printer will use the
GraphQLType's original Ast TypeDefinitions when printing the type. |
public boolean isIncludeIntrospectionTypes()
public boolean isIncludeScalars()
public boolean isIncludeExtendedScalars()
public boolean isIncludeSchemaDefinition()
public java.util.function.Predicate<GraphQLDirective> getIncludeDirective()
public boolean isDescriptionsAsHashComments()
public GraphqlTypeComparatorRegistry getComparatorRegistry()
public boolean isUseAstDefinitions()
public static SchemaPrinter.Options defaultOptions()
public SchemaPrinter.Options includeIntrospectionTypes(boolean flag)
flag - whether to include thempublic SchemaPrinter.Options includeScalarTypes(boolean flag)
flag - whether to include thempublic SchemaPrinter.Options includeExtendedScalarTypes(boolean flag)
flag - whether to include thempublic SchemaPrinter.Options includeSchemaDefinition(boolean flag)
flag - whether to force include the schema definitionpublic SchemaPrinter.Options includeDirectives(boolean flag)
flag - whether to print directivespublic SchemaPrinter.Options includeDirectives(java.util.function.Predicate<GraphQLDirective> includeDirective)
public SchemaPrinter.Options useAstDefinitions(boolean flag)
GraphQLType's original Ast TypeDefinitions when printing the type. This
allows access to any `extend type` declarations that might have been originally made.flag - whether to print via AST type definitionspublic SchemaPrinter.Options descriptionsAsHashComments(boolean flag)
flag - whether to print description as # commentspublic SchemaPrinter.Options setComparators(GraphqlTypeComparatorRegistry comparatorRegistry)
GraphQLTypes.
The default is to sort elements by name but you can put in your own code to decide on the field order
comparatorRegistry - The registry containing the Comparator and environment scoping rules.