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

graphql-resolvers

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-resolvers

Resolver composition library for GraphQL.

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.4K
decreased by-10.85%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Installation

This package is available on npm as: graphql-resolvers

npm install graphql-resolvers

You should consider using yarn, though.

Motivation

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.

Documentation

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:

apollo-resolvers:

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.

graphql-tools

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.

Keywords

FAQs

Package last updated on 04 Feb 2020

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