Is it possible to support relay connection spec via GraphQL ?
https://relay.dev/graphql/connections.htm
For my schema I have a slight variation of the same to support a hybrid connection definition as supported by GitHub GraphQL APIs. Also I want to able to map Relation properties to each ThingEdge
properties
# A connection to a list of Things.
type ThingConnection {
# Information to aid in pagination.
pageInfo: PageInfo # this is built based on what is returned
# A list of Things.
nodes: [Thing] # if clients do not want to access the edge properties they will use this
# A list of Thing edges.
edges: [ThingEdge] # each edge will have a Thing Node and a cursor to itself
# Count of filtered result set without considering pagination arguments.
totalCount: Int! # mapped to cypher that fetches the totalCount
}
type ThingEdge {
# The node that is connected to this edge/relationship
node: Thing
# cursor information about this node
cursor: String
# Some props of the edge
created: Date
# Some props of the edge
createdBy: UserId
# Some props of the edge
# sequence: Int
}
# Information about the current page of results fetched via a connection.
type PageInfo {
# When paginating backwards, are there more items?
hasPreviousPage: Boolean!
# When paginating forwards, are there more items?
hasNextPage: Boolean!
# When paginating backwards, the cursor to continue
startCursor: String
# When paginating forwards, the cursor to continue
endCursor: String
}