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

feat: allow providing descriptions for enum values #117

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

rbino
Copy link
Contributor

@rbino rbino commented Mar 21, 2024

If the module exports graphql_describe_enum_value/1, use that. Otherwise, fallback to the Ash.Type.Enum value descriptions introduced in ash-project/ash#940.

Close #116

Contributor checklist

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

@rbino rbino marked this pull request as draft March 22, 2024 06:52
@rbino rbino marked this pull request as ready for review March 22, 2024 06:52
@rbino rbino force-pushed the enum-descriptions branch 2 times, most recently from 6dab505 to a4d0bff Compare March 25, 2024 10:45
@rbino
Copy link
Contributor Author

rbino commented Mar 25, 2024

@zachdaniel since you've tagged a new Ash version I've also integrated the new Ash.Type.Enum value descriptions, so this should implement fully what was discussed in #116

Contextually, remove an unreachable clause that caused dyalizer to fail,
see ash-project/ash#873 for the commit that made
it unreachable
If the module exports `graphql_describe_enum_value/1`, use that. Otherwise,
fallback to the Ash.Type.Enum value descriptions introduced in
ash-project/ash#940.

Close ash-project#116
@rbino
Copy link
Contributor Author

rbino commented Mar 25, 2024

Removed a clause that cause Dyalizer to fail after the Ash update

rbino added a commit to rbino/edgehog that referenced this pull request Mar 25, 2024
Note that this doesn't expose the capability descriptions yet in the GraphQL
schema until ash-project/ash_graphql#117 gets merged

Signed-off-by: Riccardo Binetti <[email protected]>
rbino added a commit to rbino/edgehog that referenced this pull request Mar 25, 2024
Note that this doesn't expose the capability descriptions yet in the GraphQL
schema until ash-project/ash_graphql#117 gets merged

Signed-off-by: Riccardo Binetti <[email protected]>
rbino added a commit to rbino/edgehog that referenced this pull request Mar 25, 2024
Note that this doesn't expose the capability descriptions yet in the GraphQL
schema until ash-project/ash_graphql#117 gets merged

Signed-off-by: Riccardo Binetti <[email protected]>
rbino added a commit to rbino/edgehog that referenced this pull request Mar 25, 2024
Note that this doesn't expose the capability descriptions yet in the GraphQL
schema until ash-project/ash_graphql#117 gets merged.
Remove old Absinthe schema and resolvers since they're not needed anymore.

Signed-off-by: Riccardo Binetti <[email protected]>
@zachdaniel zachdaniel merged commit 98baf6f into ash-project:main Mar 26, 2024
13 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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.

Allow giving a description to enum values created with Ash.Type.Enum
3 participants