Skip to content

Conditional rules missing in forms queried via GraphQL #11600

@MSchmidt

Description

@MSchmidt

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions