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

Conditional rules missing in forms queried via GraphQL #11600

Closed
MSchmidt opened this issue Mar 20, 2025 · 0 comments · Fixed by #11607
Closed

Conditional rules missing in forms queried via GraphQL #11600

MSchmidt opened this issue Mar 20, 2025 · 0 comments · Fixed by #11607

Comments

@MSchmidt
Copy link

Bug description

When querying forms via GraphQL, there is no way to get the given field conditions from the blueprint. The same is available on the REST-API via a if array that is part of the response JSON.

How to reproduce

  1. Set e.g. conditional visibility on any field of a form blueprint.

  2. Query via GraphQL with all available fields.

{
  forms {
    handle
    rules
    fields {
      config
      display
      handle
      instructions
      type
      width
    }
    honeypot
    title
  }
}

Logs

Environment

Application Name: Statamic
Laravel Version: 11.34.2
PHP Version: 8.3.19
Composer Version: 2.8.6
Environment: local
Debug Mode: ENABLED
URL: statamic.test
Maintenance Mode: OFF
Timezone: UTC
Locale: de

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants