Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL and Discovery API disagree on nodes' names #853

Closed
andrewazores opened this issue Mar 9, 2022 · 1 comment · Fixed by #856
Closed

GraphQL and Discovery API disagree on nodes' names #853

andrewazores opened this issue Mar 9, 2022 · 1 comment · Fixed by #856
Assignees
Labels
bug Something isn't working

Comments

@andrewazores
Copy link
Member

andrewazores commented Mar 9, 2022

The Discovery API resports nodes' names as their implemented Kind, ex. Realm or Pod. The GraphQL API just serializes the enum member's name directly, ie REALM and POD. In all of our current use cases this only amounts to a casing difference, but it would still be best if these were consistent between the two API endpoints.

@andrewazores andrewazores added the bug Something isn't working label Mar 9, 2022
@andrewazores andrewazores self-assigned this Mar 9, 2022
@andrewazores andrewazores changed the title GraphQL and Discovery API report node types as the enum members' names, not their Kinds GraphQL and Discovery API disagree on nodes' names Mar 11, 2022
@andrewazores
Copy link
Member Author

Various sources and documentation states that GraphQL doesn't really support mapping enum types to other values, ex:

graphql-java-kickstart/graphql-java-tools#426

It is possible to do it by wrapping the type in a GraphQL scalar and other such tricks, but this means that the GraphQL side of the implementation will have to duplicate all of the NodeTypes already declared by our internal Platforms API, which is what is exposed by the Discovery HTTP API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant