All Projects → graphql-compose → graphql-compose-dataloader

graphql-compose / graphql-compose-dataloader

Licence: MIT license
Add DataLoader to graphql-composer resolvers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to graphql-compose-dataloader

Workshop-GraphQL
A GraphQL Server made for the workshop
Stars: ✭ 22 (+22.22%)
Mutual labels:  schema, dataloader
graphql-compose-relay
No description or website provided.
Stars: ✭ 29 (+61.11%)
Mutual labels:  graphql-compose-plugin
E Commerce Db
Database schema for e-commerce (webstores) sites.
Stars: ✭ 245 (+1261.11%)
Mutual labels:  schema
pony-capnp
Cap’n Proto plugin for generating serializable Pony classes. 🐴 - 🎩'n 🅿️
Stars: ✭ 19 (+5.56%)
Mutual labels:  schema
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+1305.56%)
Mutual labels:  schema
sbt-avro
Plugin SBT to Generate Scala classes from Apache Avro schemas hosted on a remote Confluent Schema Registry.
Stars: ✭ 15 (-16.67%)
Mutual labels:  schema
Graphql Rover
🚀 GraphQL + Vue.js + D3.js schema viewer, powered by introspection.
Stars: ✭ 239 (+1227.78%)
Mutual labels:  schema
metastore
A protobuf schema registry on steroids. It will keep track of the contracts throughout your organization, making sure no contract is broken.
Stars: ✭ 43 (+138.89%)
Mutual labels:  schema
decapi
Create GraphQL API by decorating TypeScript classes
Stars: ✭ 81 (+350%)
Mutual labels:  schema
NoSQLDataEngineering
NoSQL Data Engineering
Stars: ✭ 25 (+38.89%)
Mutual labels:  schema
another-json-schema
Another JSON Schema validator, simple & flexible & intuitive.
Stars: ✭ 48 (+166.67%)
Mutual labels:  schema
golang-example-app
Example application
Stars: ✭ 138 (+666.67%)
Mutual labels:  dataloader
schema-and-structured-data-for-wp
Creating the best Structured Data and Schema plugin for WordPress
Stars: ✭ 66 (+266.67%)
Mutual labels:  schema
Dry Schema
Coercion and validation for data structures
Stars: ✭ 249 (+1283.33%)
Mutual labels:  schema
firestore-to-bigquery-export
NPM package for copying and converting Cloud Firestore data to BigQuery.
Stars: ✭ 26 (+44.44%)
Mutual labels:  schema
Scenic
Scenic is maintained by Derek Prior, Caleb Hearth, and you, our contributors.
Stars: ✭ 2,856 (+15766.67%)
Mutual labels:  schema
graphql-schema-diff
📄🔄📄 Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.
Stars: ✭ 54 (+200%)
Mutual labels:  schema
graphql-docker-api
A GraphQL Server for the Docker API
Stars: ✭ 57 (+216.67%)
Mutual labels:  schema
schema-voyager
Visualize Datomic schema
Stars: ✭ 15 (-16.67%)
Mutual labels:  schema
magnet
A JSON/BSON schema generator
Stars: ✭ 16 (-11.11%)
Mutual labels:  schema

graphql-compose-dataloader – DEPRECATED

Greenkeeper badge Travis npm version npm Add DataLoader to graphql-composer resolvers.

Deprecation reason

DataLoader cannot be expressed like a simple plugin. Mostly this plugin was used with graphql-compose-mongoose models. From [email protected] (read more) it starts provide new built-in resolvers dataLoader & dataLoaderMany resolvers which implement DataLoader logic in different manner.

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

import mongoose from 'mongoose';
import composeWithMongoose from 'graphql-compose-mongoose';
import composeWithDataLoader from 'graphql-compose-dataloader';

const LanguagesSchema = new mongoose.Schema({
  language: String,
  skill: {
    type: String,
    enum: [ 'basic', 'fluent', 'native' ],
  },
});

const Languages = mongoose.model('Languages', LanguagesSchema)
const LanguagesTC = composeWithDataLoader(composeWithMongoose(Languages),{cacheExpiration: 700})

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].