graphql / dataloader

DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.
MIT License
12.89k stars 515 forks source link

Maintenance Plan #297

Open saihaj opened 2 years ago

saihaj commented 2 years ago

Hello everyone!

We @the-guild-org are the new maintainers of this project. We investigated current state of this project, triaged all existing issues and PRs so we can address them. Here is our plan: before addressing issues and PRs there are some infra things we need to introduce that will help simplify management of this project and make it simpler to encourage new contributors.

lixurea commented 2 years ago

Same question. It fails to batch when there're other async functions around, more specifically, when using node-fetch in the async functions.

import fetch from 'node-fetch';
import DataLoader from 'data-loader';

const normalAsyncFunction = () => fetch('www.test.url');
const myDataLoader = new DataLoader((keys) => keys);

const myFunc = () => {
    await normalAsyncFunction(); // doesn't batch when this function is around
    await myDataLoader.load(1);
}
WillSquire commented 2 years ago

Is there a reason why Facebook is no longer maintaining this repo anymore?

saihaj commented 2 years ago

Is there a reason why Facebook is no longer maintaining this repo anymore?

@WillSquire GraphQL is now managed and maintained by the GraphQL Foundation. You can read more here: https://graphql.org/foundation/