graphql-compose-dataloader
Add DataLoader to graphql-composer resolvers.
Installation
npm install graphql-compose-dataloader --save
Modules graphql
, graphql-compose
are in peerDependencies
, so should be installed explicitly in your app. They have global objects and should not have ability to be installed as submodule.
Example
;;; const LanguagesSchema = language: String skill: type: String enum: 'basic' 'fluent' 'native' ; const Languages = mongooseconst LanguagesTC =
Props
Prop | Type | Description |
---|---|---|
cacheExpiration |
number |
Expiration in number of milliseconds. This will clear the one request sendt via the resolver (Default: 500) |
removeProjection |
boolean |
Remove projection, this will request fields on the requested document and put it to cache (Default: true) |
debug |
boolean |
Enable debug? (Default: false) |
License
======= MIT