Skip to content

GraphQL schema for multiple collections with Bard+Sets is invalid #5211

@dmgawel

Description

@dmgawel

Bug description

When there is more than one collection that has a Bard field with Sets, the generated GraphQL schema is invalid. List of possible Sets from one of the Bard fields is used for all other collections.

How to reproduce

  1. Create two collections, "aaa" and "bbb".
  2. Add a Bard field named content to both of them.
  3. Add different sets to the content field for both collections and add sample fields (can be text type) inside sets
  4. Visit GraphiQL Explorer and try to fetch entries including content field on both Entry_Aaa_Aaa and Entry_Bbb_Bbb. You'll see that sets for Entry_Bbb_Bbb are used for Entry_Aaa_Aaa as well (could be the other way, I'm not sure what the rule is here, but looks like it's alphabetical).

Logs

No response

Versions

Statamic 3.2.32 Pro
Laravel 8.82.0
PHP 8.0.15
No addons installed

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