-
I'm using @pothos/plugin-dataloader (with graphql-yoga) to "bulk get by id's". I expect it to return a partial list of records. From what I've read in the docs, in order to use that correctly, I need to:
This has been working. However a couple annoyances: my console outputs these errors for each
Here's a sample of my code:
Ideally I'd like to not return an
It's been a "whack-a-mole" trying to resolve one typescript error after another. Any ideas what I'm doing wrong or how I can achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Here's a working example (extracted from pothos tests) https://stackblitz.com/edit/typescript-qhw5q5fl?file=tsconfig.json,index.ts |
Beta Was this translation helpful? Give feedback.
-
Thank you! OMG I just needed to remove the generic block |
Beta Was this translation helpful? Give feedback.
Here's a working example (extracted from pothos tests)
https://stackblitz.com/edit/typescript-qhw5q5fl?file=tsconfig.json,index.ts