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

Resources get verifiers applied, but domains do not #242

Open
sevenseacat opened this issue Nov 15, 2024 · 0 comments
Open

Resources get verifiers applied, but domains do not #242

sevenseacat opened this issue Nov 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sevenseacat
Copy link
Contributor

Describe the bug

This just popped up because I knew I'd seen something about automatic types being generated for resources with metadata, but couldn't find it in the docs - so I looked in the source.

Resources that use the AshGraphql.Resource extension get verifiers applied to them, one of which is AshGraphql.Resource.Verifiers.VerifyQueryMetadata. This verifies that if a query action has metadata defined and shown in the response, a custom type must be defined for the response (eg. :user_with_token).

These verifiers do not apply to queries defined on a domain, so any metadata will silently be ignored and dropped.

Expected behavior

The same error that is generated for queries on resources should also be generated for queries on domains.

Runtime

  • Elixir version 1.17.3-otp-27
  • Erlang version 27.1
  • OS macOS Sonoma
  • Ash version 3.4.42
  • AshGraphql 1.4.3
@sevenseacat sevenseacat added the bug Something isn't working label Nov 15, 2024
@zachdaniel zachdaniel moved this to Up Next in Ash Framework Roadmap Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Up Next
Development

No branches or pull requests

1 participant