ash-project / ash_graphql

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

feat: allow resources without types #121

Closed rbino closed 7 months ago

rbino commented 7 months ago

Ensure they only expose generic action queries. Add checks to ensure that either type :resource_type or generate_object? false is passed if it's needed.

Close #119

Contributor checklist

zachdaniel commented 7 months ago

This looks good to me, but one thing I want to be sure of is that it doesn't break cases where users have relationships to non-graphql resources. The current behavior is that those relationships are ignored. Is that the same behavior still?

rbino commented 7 months ago

Yep, here it still checks if AshGraphql.Resource is in the extensions. I've added a non-graphql resource in tests to verify it correctly compiles (if I add extensions: [AshGraphql.Resource] it fails to compile, exactly like before when type was required)

zachdaniel commented 7 months ago

🚀 Thank you for your contribution! 🚀