graphql-compose-connection5.0.0 • Public • Published
This is a plugin for graphql-compose family, which adds to the ObjectTypeComposer
Live demo: https://graphql-compose.herokuapp.com/
This package completely follows to Relay Cursor Connections Specification (https://facebook.github.io/relay/graphql/connections.htm).
Besides standard connection arguments
after, also added significant arguments:
filterarg - for filtering records
sortarg - for sorting records. Build in mechanism allows sort by any unique indexes (not only by id). Also supported compound sorting (by several fields).
npm install graphql graphql-compose graphql-compose-connection --save
graphql-compose are in
peerDependencies, so should be installed explicitly in your app. They should not installed as submodules, cause internally checks the classes instances.
Types should have following resolvers:
count- for counting records
findMany- for filtering records. Also required that this resolver supports search with operators (lt, gt), which used in
filterargument, which will be copied to connection. Also should have
Used in plugins
graphql-compose-mongoose - converts mongoose models to graphql types