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

Fix default enum value present for SDL schemas #1188

Conversation

maartenvanvliet
Copy link
Contributor

TypeReference.unwrap/1 was passed in %TypeReference.Name{} struct in the
case of SDL schema's, and returns it. This fails in the subsequent lookup
in enums. We need to use TypeReference.to_type/2 to get
the actual atom type identifier for the enums lookup.

For macro schema's this is not an issue as the atom type identifier is
passed into TypeReference.unwrap/1.

TypeReference.unwrap/1 was passed in %TypeReference.Name{} struct in the
case of SDL schema's, and returns it. This fails in the subsequent lookup
in `enums`. We need to use TypeReference.to_type/2 to get
the actual atom type identifier for the `enums` lookup.

For macro schema's this is not an issue as the atom type identifier is
passed into TypeReference.unwrap/1.
@benwilson512 benwilson512 merged commit 9155d1a into absinthe-graphql:master Sep 6, 2022
@maartenvanvliet maartenvanvliet deleted the default-enum-value-present branch September 6, 2022 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants