Package 

Class AugmentFieldHandler

  • All Implemented Interfaces:

    
    public final class AugmentFieldHandler
    extends AugmentationHandler
                        

    This class augments existing fields on a type and adds filtering and sorting to these fields.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      AugmentFieldHandler(SchemaConfig schemaConfig, TypeDefinitionRegistry typeDefinitionRegistry, TypeDefinitionRegistry neo4jTypeDefinitionRegistry)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit augmentType(ImplementingTypeDefinition<?> type) The 1st step in enhancing a schema.
      DataFetcher<Cypher> createDataFetcher(AugmentationHandler.OperationType operationType, FieldDefinition fieldDefinition) The 2nd step is creating a data fetcher based on a field definition.
      • Methods inherited from class org.neo4j.graphql.AugmentationHandler

        cypherDirective, dynamicPrefix, getDirectiveArgument, getFieldDefinition, getIdField, getNeo4jTypeDefinitionRegistry, getScalarFields, getSchemaConfig, getTypeDefinitionRegistry, getUnwrappedType, input, isID, isNativeId, isRelationship, isScalar, relationship, resolve
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AugmentFieldHandler

        AugmentFieldHandler(SchemaConfig schemaConfig, TypeDefinitionRegistry typeDefinitionRegistry, TypeDefinitionRegistry neo4jTypeDefinitionRegistry)
    • Method Detail

      • augmentType

         Unit augmentType(ImplementingTypeDefinition<?> type)

        The 1st step in enhancing a schema. This method creates relevant query / mutation fields and / or adds filtering and sorting to the relation fields of the given type

        Parameters:
        type - the type for which the schema should be enhanced / augmented
      • createDataFetcher

         DataFetcher<Cypher> createDataFetcher(AugmentationHandler.OperationType operationType, FieldDefinition fieldDefinition)

        The 2nd step is creating a data fetcher based on a field definition. The field may be an augmented field (from step 1) but can also be a user specified query / mutation field

        Parameters:
        operationType - the type of the field
        fieldDefinition - the filed to create the data fetcher for