cms
cms copied to clipboard
Graphiql explorer doesn't expand certain fieldtypes inside Bard set
Bug description
When certain fieldtypes (list below) are used for sets in a Bard field, Graphiql Explorer can't expand those sets in query builder. Clicking on set name inserts set name in a query, but neither checkbox is selected nor the field names in the set are presented.

How to reproduce
- Create a Bard field
- Add a set with one of the affected fieldtypes (e.g. Select, full list below)
- Enter Graphiql Explorer
- Try to compose a query for the Bard field based on a set created in step 2. Clicking on it does
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
List of fieldtypes affected by this issue:
- Button Group
- Checkboxes
- Radio
- Select
- Assets
- Collections
- Entries
- Form
- Taxonomies
- Terms
- User Groups
- Roles
- Users
- Grid
- Replicator
- Table
- Taggable
I am having a similar issue. I am trying to add an Asset field to a blog post's Bard field and in GraphiQL Explorer I can never select any sets other than the Video set I created. I haven't tested with other field types besides Assets and Text. The only field type that seems to work for me is Video.
"Set_Content_Embed" doesn't exist in the blueprint and whenever I add new sets to the bard field, they do not appear after a refresh (I also cleared the application cache) in the GraphiQL explorer. Even after I remove the Video embed set from the Bard field and I refresh the GraphiQL Explorer, the removed video field persists.
Ive attached some screenshots here.

I played around a bit and it seems the issue for me is when my Bard field has the handle content. I renamed it, along with updating its handle to blog_content and then it seems to work. I suspect it has to do with "reserved" handles in Statamic. I tried adding a set with a Text field and named it "Text" (handle was text), which broke, because Bard already references that handle when it sees a paragraph or some other text.
When I named it "Text Embed" and changed the handle to text_embed, it worked as expected.
I also tried to replicate with the Select field type according to the original poster and it seems to work fine with Statamic 3.4.7
I assume this issue could be because of the handles used in sets within Bard. I changed them so that they're hopefully different to Bard's internal handles and things seemed to work fine then.
Hope this helps!
Is this still an issue on the latest Statamic version? I'm struggling to replicate it.
I'm unable to reproduce this issue on the latest version of Statamic.
I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!