Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-compose-pagination

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-compose-pagination

Plugin for `graphql-compose` which provide a pagination resolver for types.

  • 8.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

graphql-compose-pagination

travis build codecov coverage npm trend Commitizen friendly

This is a plugin for graphql-compose family, which adds to the ObjectTypeComposer pagination resolver.

Live demo: https://graphql-compose.herokuapp.com/

CHANGELOG

Installation

npm install graphql graphql-compose graphql-compose-pagination --save

Modules graphql and graphql-compose are in peerDependencies, so should be installed explicitly in your app. They should not installed as sub-modules, cause internally checks the classes instances.

Example

import { preparePaginationResolver } from 'graphql-compose-pagination';
import { UserTC, findManyResolver, countResolver } from './user';

const paginationResolver = preparePaginationResolver(UserTC, {
  findManyResolver,
  countResolver,
  name: 'pagination', // Default
  perPage: 20, // Default
});

Implementation of findManyResolver and countResolver can be found in this file.

screen shot 2017-08-07 at 23 31 46

Used in plugins

graphql-compose-mongoose – converts mongoose models to graphql types

License

MIT

Keywords

FAQs

Package last updated on 06 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc