Skip to content

Conversation

gouroujo
Copy link

@gouroujo gouroujo commented Feb 7, 2020

This PR will allow to configure how we resolve data based not only on a list of ids but also with the current graphql context.

@asmeikal
Copy link

@gouroujo I was about to make the same PR! 😃 I was looking for a way to pass an access token from the request to a gRPC dataloader, and I settled for this solution. I think typing the context passed to generateDataLoader as GraphQLExecutionContext would be safer.

@krislefeber this shouldn't be breaking, existing data loaders can ignore the parameter and keep working as expected, even without overloading the generateDataLoader method.

@krislefeber
Copy link
Owner

@gouroujo, if we can get typing added to the passed in context variable I will go ahead and make the merge. I see my mistake about the optional parameter

@ghost
Copy link

ghost commented Sep 3, 2020

Is there any plan to merge this? It would be a great addition to this lib.

The alternative for me is to fork this repo and do it in my project but I would love to keep using this package 😄

chrisbucholz added a commit to nucleuslabs/nestjs-dataloader that referenced this pull request Dec 16, 2020
@AmrAnwar
Copy link

Is there any update regarding this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants