Resolver composition library for GraphQL.
Last updated 8 months ago by lucasconstantino .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install graphql-resolvers 
SYNC missed versions from official npm registry.

GraphQL Resolvers

Resolver composition library for GraphQL

build status coverage npm version sponsored by Taller

This library consists of simple but well tested helper functions for combining other functions into more specialized ones.


This package is available on npm as: graphql-resolvers

npm install graphql-resolvers

You should consider using yarn, though.


Many times we end-up repeating lots of logic on our resolvers. Access control, for instance, is something that can be done in the resolver level but just tends to end up with repeated code, even when creating services for such a task. This package aims to make it easier to build smart resolvers with logic being reusable and split in small pieces. Think recompose, but for GraphQL resolvers.


Read full documentation here

Similar projects

Besides being inspired by some functional libraries out there, this project has some goals in common with other projects:


While graphql-resolvers follows the functional paradigm, apollo-resolvers project solves some problems using an opinionated and OOP approach. Furthermore, the second also solves other problems which graphql-resolvers does not intend to work on, such as solving circular references on the resolver's context.


At first, my idea was to incorporate the combineResolvers method into the wider project graphql-tools. That may yet happen some day, but I think people my not want to install the whole graphql-tools project when wanting this simple package's helper on their projects. Also, combineResolvers should work pretty fine with resolvers binded into graphql/types too.

Current Tags

  • 0.3.2                                ...           beta (3 years ago)
  • 0.4.2                                ...           latest (8 months ago)

10 Versions

  • 0.4.2                                ...           8 months ago
  • 0.3.3                                ...           a year ago
  • 0.3.2                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago

Copyright 2014 - 2016 © |