Skip to content

Expose relationship read action arguments as GraphQL defaults - #455

Merged
zachdaniel merged 11 commits into
ash-project:mainfrom
jechol:read-action-arguments
Jul 13, 2026
Merged

Expose relationship read action arguments as GraphQL defaults#455
zachdaniel merged 11 commits into
ash-project:mainfrom
jechol:read-action-arguments

Conversation

@jechol

@jechol jechol commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply relationship read_action_arguments when generating GraphQL arguments for both singular and list relationships.
  • Expose relationship-provided values as GraphQL defaults while preserving each action argument's original nullability.
  • Allow nullable arguments to explicitly pass null instead of using the relationship-provided value.
  • Prefer relationship arguments over read action defaults when both are configured.

Explicit GraphQL arguments still take precedence over relationship-provided arguments.

This builds on ash-project/ash#2775.

Testing

  • Added schema introspection coverage for required, nullable, action-defaulted, and relationship-provided arguments.
  • Added execution coverage for omitted required arguments and explicit null values.
  • ASH_VERSION=local mix test test/resource_test.exs

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@jechol jechol changed the title Expose relationship read action argument defaults Expose relationship read action arguments as GraphQL defaults Jul 13, 2026
@zachdaniel
zachdaniel merged commit 59d9bcd into ash-project:main Jul 13, 2026
22 of 24 checks passed
@zachdaniel

Copy link
Copy Markdown
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.

2 participants