You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, what this doesn't communicate is that the use of enums expects the enum keys to be passed into resolvers/returned from resolvers. This pitfall should be more strongly emphasised.
Are you able to make a PR that fix this?
Sure.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
dwjohnston
changed the title
Update documentation to clarify that Enum values must match the keys.
Update documentation to clarify that enum keys are what are passed in/out of resolvers.
Jun 24, 2024
Describe the issue
An issue I have just experience is when I have an enum like:
Where I'm hoping to use a query argument like :
{status: 'P'}
.That this won't work, GraphQL will resolve the on the keys of the enum, not the values.
There are github issues that similarly reference this issue:
#741
#1521
and this section of the documentation is linked:
https://typegraphql.com/docs/enums.html#interoperability
However, what this doesn't communicate is that the use of enums expects the enum keys to be passed into resolvers/returned from resolvers. This pitfall should be more strongly emphasised.
Are you able to make a PR that fix this?
Sure.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: