Missing TypeScript types for custom GraphQL resolver function #13620
Unanswered
only-issues
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When extending GraphQL in PayloadCMS v3 as described in the Extending GraphQL docs, I tried adding a custom field with a
resolve
function like this:The issue is that all parameters (
obj, args, context, info
) are inferred asany
orunknown
.I searched through the documentation and also checked all exported types from Payload, but I couldn’t find any suitable types for these resolver parameters.
Are there officially exported types (or recommended ones) for these arguments, or should we rely directly on the
graphql
package types likeGraphQLResolveInfo
, etc.?Beta Was this translation helpful? Give feedback.
All reactions