Class SchemaDefinition
java.lang.Object
no.sikt.graphitron.definitions.objects.SchemaDefinition
- All Implemented Interfaces:
ObjectSpecification<OperationField>
Represents the top schema object in GraphQL.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>getFieldByName(String name) getName()getQuery()boolean
-
Constructor Details
-
SchemaDefinition
public SchemaDefinition(graphql.language.SchemaDefinition definition)
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceObjectSpecification<OperationField>- Returns:
- The name of the type as specified in the schema.
-
getClassReference
- Specified by:
getClassReferencein interfaceObjectSpecification<OperationField>- Returns:
- The pre-generated class for this GraphQL-type.
-
getGraphClassName
- Specified by:
getGraphClassNamein interfaceObjectSpecification<OperationField>- Returns:
- The javapoet
ClassNamefor the imported generated GraphQL type.
-
getFields
- Specified by:
getFieldsin interfaceObjectSpecification<OperationField>- Returns:
- The fields contained within this type.
-
getFieldByName
- Specified by:
getFieldByNamein interfaceObjectSpecification<OperationField>- Returns:
- The field with this name. Null if it does not exist.
-
isOperationRoot
public boolean isOperationRoot()- Specified by:
isOperationRootin interfaceObjectSpecification<OperationField>- Returns:
- Is this object an operation node? That should be either the Query or the Mutation type.
-
getQuery
-
getMutation
-