-
-
Notifications
You must be signed in to change notification settings - Fork 670
Open
Labels
Community 👨👧Something initiated by a communitySomething initiated by a communityDocumentation 📖Issues about docsIssues about docs
Description
Describe the issue
An issue I have just experience is when I have an enum like:
enum Status = {
PENDING = "P",
COMPLETE = "C"
}
registerEnumType(Status, {name: "Status}); 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:
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.
Metadata
Metadata
Assignees
Labels
Community 👨👧Something initiated by a communitySomething initiated by a communityDocumentation 📖Issues about docsIssues about docs