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 resources without types #121

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

rbino
Copy link
Contributor

@rbino rbino commented Mar 28, 2024

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

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

@zachdaniel
Copy link
Contributor

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?

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 ash-project#119
@rbino
Copy link
Contributor Author

rbino commented Mar 28, 2024

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 zachdaniel merged commit 9674614 into ash-project:main Mar 28, 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.

Type should be optional for resources that only expose generic actions
2 participants