Package graphql.schema.idl
Class SchemaPrinter
java.lang.Object
graphql.schema.idl.SchemaPrinter
This can print an in memory GraphQL schema back to a logical schema definition
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Options to use when printing a schema -
Field Summary
FieldsModifier and TypeFieldDescriptionThis predicate excludes all directives which are specified by the GraphQL Specification. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondirectivesString
(Class<? extends GraphQLSchemaElement> parentType, GraphQLDirectiveContainer directiveContainer) This can print an in memory GraphQL IDL document back to a logical schema definition.print
(GraphQLDirective graphQLDirective) print
(GraphQLSchema schema) This can print an in memory GraphQL schema back to a logical schema definitionprint
(GraphQLType type) print
(List<GraphQLSchemaElement> elements)
-
Field Details
-
ExcludeGraphQLSpecifiedDirectivesPredicate
This predicate excludes all directives which are specified by the GraphQL Specification. Printing these directives is optional.
-
-
Constructor Details
-
SchemaPrinter
public SchemaPrinter() -
SchemaPrinter
-
-
Method Details
-
print
This can print an in memory GraphQL IDL document back to a logical schema definition. If you want to turn an Introspection query result into a Document (and then into a printed schema) then useIntrospectionResultToSchema.createSchemaDefinition(java.util.Map)
first to get theDocument
and then print that.- Parameters:
schemaIDL
- the parsed schema IDL- Returns:
- the logical schema definition
-
print
This can print an in memory GraphQL schema back to a logical schema definition- Parameters:
schema
- the schema in play- Returns:
- the logical schema definition
-
directivesString
public String directivesString(Class<? extends GraphQLSchemaElement> parentType, GraphQLDirectiveContainer directiveContainer) -
print
-
print
-
print
-