Class SchemaDefinition
java.lang.Object
no.sikt.graphitron.definitions.objects.SchemaDefinition
- All Implemented Interfaces:
GenerationTarget,ObjectSpecification<OperationField>
public class SchemaDefinition
extends Object
implements ObjectSpecification<OperationField>, GenerationTarget
Represents the top schema object in GraphQL.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>getFieldByName(String name) no.sikt.graphitron.javapoet.ClassNamegetName()getQuery()booleanDoes this have theGenerationDirective.NOT_GENERATEDdirective for skipping generation set?booleanbooleanboolean
-
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
public no.sikt.graphitron.javapoet.ClassName 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
-
isGenerated
public boolean isGenerated()- Specified by:
isGeneratedin interfaceGenerationTarget- Returns:
- Should this object be generated?
-
isGeneratedWithResolver
public boolean isGeneratedWithResolver()- Specified by:
isGeneratedWithResolverin interfaceGenerationTarget- Returns:
- Should this object be generated as or containing resolvers?
-
isExplicitlyNotGenerated
public boolean isExplicitlyNotGenerated()Description copied from interface:GenerationTargetDoes this have theGenerationDirective.NOT_GENERATEDdirective for skipping generation set?- Specified by:
isExplicitlyNotGeneratedin interfaceGenerationTarget
-