-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Redis dataloader can accept parameters #9
Comments
Hmm, not sure. If you send me a code sample I could get a better diagnoses of the issue? |
I'm using like a factory function, so I can reuse it without redeclaring all redisloader again, but, when I tried to use a function that has parameters into the redisloader, it does not accepted my parameters if it wasn't a number ( wich is the cache container ) For example:
But the function does not receive my args, only numbers. My factory function is below
|
One thing that looks like it might be off is the signature of the function you are passing into the Dataloader. In So async function updateUser(arg) {
return User.update({ where: { ...args } })
} might be changed to async function updateUser(arrayOfArgs) {
return await Promise.all(arrayOfArgs.map(args => User.update({ where: { ...args } })))
} It may be useful to get deeper familiarity with the Facebook Dataloader documentation as well. https://github.com/facebook/dataloader |
Hi, I'm using the dataloader, but I cant send parameters besides the first parameter, cache ID
Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: