-
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
Allow returning arbitrary values #14
Comments
yeah that makes sense |
Cool - how can I help? |
this is the issue right? |
Hmm, I don't think so. From reading that code, if a non-object is passed in, it should just pass it through directly. However, according to @mahcloud, if a non-object is passed in, an error is thrown. I can look at getting the specific error if that's helpful. |
yeah, we're thinking about rewriting the package in typescript too so any problems you run into let me know |
Hi @PatrickJS I was wondering if there was any progress on this topic, or anything we may track which is related to this issue? |
We're looking at using this library to wrap a portion of our existing data loader implementation. A headache that has come up is that
redis-dataloader
does not allow returning primitives, only JSON. This makes consuming data loaders that return, for example, a simple count, somewhat more cumbersome. It is achievable by returning something like{ count: 21 }
, but then every consumer (generally GraphQL type resolvers) must pull that value out of the response from the data loader.Is there a reason that
redis-dataloader
could not allow arbitrary primitives, such as numbers?The text was updated successfully, but these errors were encountered: