Class ConnectionObjectDefinition

java.lang.Object
no.sikt.graphitron.definitions.objects.AbstractObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
no.sikt.graphitron.definitions.objects.ConnectionObjectDefinition
All Implemented Interfaces:
ObjectSpecification<ObjectField>

public class ConnectionObjectDefinition extends AbstractObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
Object that corresponds to a GraphQL type whose name ends with the "Connection" suffix. The behaviour of this class should always reflect the connections specification.
  • Constructor Details

    • ConnectionObjectDefinition

      public ConnectionObjectDefinition(graphql.language.ObjectTypeDefinition objectDefinition, EdgeObjectDefinition edgeObject)
  • Method Details

    • createFields

      protected List<ObjectField> createFields(graphql.language.ObjectTypeDefinition objectDefinition)
      Specified by:
      createFields in class AbstractObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
    • getNodeType

      public String getNodeType()
      Returns:
      The underlying GraphQL object that is referred to within the edge type's node field.
    • getEdgeObject

      public EdgeObjectDefinition getEdgeObject()
      Returns:
      Edge object for this connection. Defined by the "edges" field on the connection object.