ash-project / ash_graphql

The extension for building GraphQL APIs with Ash
https://hexdocs.pm/ash_graphql
MIT License
71 stars 46 forks source link

bugfix: Fix check for checking if a field is filterable or not #198

Closed sevenseacat closed 2 months ago

sevenseacat commented 2 months ago

The calling function passes in field.name, the filterable_field? function should not attempt to access the name again

This fixes a compilation error when using the filterable_fields config option anywhere in your app

Contributor checklist

(well technically I didn't add any test, but adding the filterable_fields option to a test resource causes the app to not compile anymore without the code change)

zachdaniel commented 2 months ago

🚀 Thank you for your contribution! 🚀

1alexbc1 commented 1 month ago

The calling function passes in field.name, the filterable_field? function should not attempt to access the name again

This fixes a compilation error when using the filterable_fields config option anywhere in your app

Contributor checklist

  • [x] Bug fixes include regression tests
  • [ ] Features include unit/acceptance tests

(well technically I didn't add any test, but adding the filterable_fields option to a test resource causes the app to not compile anymore without the code change)