Class OperationField
java.lang.Object
no.sikt.graphitron.definitions.fields.OperationField
- All Implemented Interfaces:
FieldSpecification
This class represents operation fields in the schema type.
-
Constructor Details
-
OperationField
public OperationField(graphql.language.OperationTypeDefinition field)
-
-
Method Details
-
hasSetFieldOverride
public boolean hasSetFieldOverride()- Specified by:
hasSetFieldOverridein interfaceFieldSpecification- Returns:
- Does this field use the
GenerationDirective.FIELDdirective?
-
getTypeName
- Specified by:
getTypeNamein interfaceFieldSpecification- Returns:
- The name of the field's underlying data type.
-
getContainerTypeName
- Specified by:
getContainerTypeNamein interfaceFieldSpecification- Returns:
- The name of the field's container schema type.
-
isID
public boolean isID()- Specified by:
isIDin interfaceFieldSpecification- Returns:
- Is this field an ID?
-
hasNodeID
public boolean hasNodeID()- Specified by:
hasNodeIDin interfaceFieldSpecification- Returns:
- Does this field have the @nodeId directive?
-
isIterableWrapped
public boolean isIterableWrapped()- Specified by:
isIterableWrappedin interfaceFieldSpecification- Returns:
- Is this field wrapped in a list?
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceFieldSpecification- Returns:
- Is this field optional/nullable?
-
isNonNullable
public boolean isNonNullable()- Specified by:
isNonNullablein interfaceFieldSpecification- Returns:
- Is this field required/non-nullable?
-
getTypeClass
public no.sikt.graphitron.javapoet.TypeName getTypeClass()- Specified by:
getTypeClassin interfaceFieldSpecification- Returns:
TypeNamefor this field's type.
-
getName
- Specified by:
getNamein interfaceFieldSpecification- Returns:
- The name of the object as specified in the schema.
-
getUpperCaseName
- Specified by:
getUpperCaseNamein interfaceFieldSpecification- Returns:
- The database equivalent name of this field. Defaults to field name.
-
getMappingFromSchemaName
- Specified by:
getMappingFromSchemaNamein interfaceFieldSpecification- Returns:
- Schema-side method name mappings based on the GraphQL equivalent of this field.
-
getMappingFromFieldOverride
- Specified by:
getMappingFromFieldOverridein interfaceFieldSpecification- Returns:
- DB-side method name mappings based on the database equivalent of this field.
-
isRootField
public boolean isRootField()- Specified by:
isRootFieldin interfaceFieldSpecification- Returns:
- Is this object field a Query or Mutation root field?
-
isIterableWrappedWithNullableElement
public boolean isIterableWrappedWithNullableElement()- Specified by:
isIterableWrappedWithNullableElementin interfaceFieldSpecification
-