Graphql-yoga: Facebook Dataloader

Created on 20 Nov 2017  路  6Comments  路  Source: dotansimha/graphql-yoga

Any expectations to adapt?

Most helpful comment

@schickling

At this time, no. Apparently you can move dataloaders to different layers of the server and get different results? After hearing that, I've decided to research it a little. Once I complete that research, and possibly implement my own version, I'm sure I'll have an opinion on how the API should look. 馃憤

All 6 comments

Hi @ronal2do thanks a lot for bringing this up. Could you describe your scenario for dataloader?

I, too, am interested in this. I'm most interested in reducing the amount of requests in a single query. Because my GraphQL server currently is wrapping REST APIs, I am making the same request in multiple resolvers, but resolving different parts of the returned object.

I think this is a use case for dataloader.

@DevanB do you have any suggestion on how the API should look like you'd want to use?

@schickling

At this time, no. Apparently you can move dataloaders to different layers of the server and get different results? After hearing that, I've decided to research it a little. Once I complete that research, and possibly implement my own version, I'm sure I'll have an opinion on how the API should look. 馃憤

Just to cache the data, even for servers that I believe to be very useful, I use in some projects that is very good

I believe this should NOT be part of Yoga,
unless it is implemented as a schema @directive

Was this page helpful?
0 / 5 - 0 ratings

Related issues

playerx picture playerx  路  5Comments

lautiamkok picture lautiamkok  路  4Comments

kv-pawar picture kv-pawar  路  3Comments

AhmadEl-Banna picture AhmadEl-Banna  路  5Comments

SebastianEdwards picture SebastianEdwards  路  4Comments