DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a simplified and consistent API over various remote data sources such as databases or web services via batching and caching. A port of the "Loader" API originally developed by @schrockn at Facebook in 2010 as a simplifying force to coalesce the sundry key-value store back-end APIs which existed at the time. At Facebook, "Loader" became one of the implementation details of the "Ent" framework, a privacy-aware data entity loading and caching layer within web server product code. This ultimately became the underpinning for Facebook's GraphQL server implementation and type definitions. DataLoader is a simplified version of this original idea implemented in JavaScript for Node.js services. DataLoader is often used when implementing a graphql-js service, though it is also broadly useful in other situations.

Features

  • DataLoader is provided so that it may be useful to build GraphQL services for Node.js
  • Batching is not an advanced feature, it's DataLoader's primary feature
  • Create loaders by providing a batch loading function
  • A batch loading function accepts an Array of keys, and returns a Promise which resolves to an Array of values
  • DataLoader allows you to decouple unrelated parts of your application without sacrificing the performance of batch data-loading
  • A batch loading function accepts an Array of keys, and returns a Promise which resolves to an Array of values or Error instances

Project Samples

Project Activity

See All Activity >

Categories

API Clients

License

MIT License

Follow DataLoader

DataLoader Web Site

Other Useful Business Software
Build on Google Cloud with $300 in Free Credit Icon
Build on Google Cloud with $300 in Free Credit

New to Google Cloud? Get $300 in free credit to explore Compute Engine, BigQuery, Cloud Run, Vertex AI, and 150+ other products.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query exabytes in BigQuery, or build AI apps with Vertex AI and Gemini. Once your credits are used, keep building with 20+ products with free monthly usage, including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. Sign up to start building right away.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DataLoader!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript API Clients

Registered

2021-05-31