Closed KaisSalha closed 1 month ago
The issue here is that pothos isn't inferring the return type of load at all. What it does is that it ensures that load returns an array of whatever is expected for a resolver returning a Membership, and that same type is used as the argument in group. Because Membership is also a loadable type, you can return just a string to use the membership dataloader
Thanks!
Property 'user_id' does not exist on type 'string | { id: number; created_at: Date; user_id: number; organization_id: number; permissions: unknown; role_id: number; }'. Property 'user_id' does not exist on type 'string'.ts(2339)
I don't understand why load may return a string.
Typeof result is the following:
but typeof load is the following: