GraphQL schema for multiple collections with Bard+Sets is invalid

Đang mở
#5,211 6 bình luận 5 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
graphql, php
Lĩnh vực
api

Hướng nghiên cứu

Start by reproducing the issue in GraphiQL with two collections that have different sets on their Bard content fields, then inspect the generated schema for Entry_Aaa_Aaa and Entry_Bbb_Bbb. The issue does not name implementation files or tests, so trace where collection-specific Bard sets enter schema generation. Done when each collection's content field uses its own sets and the schema is valid.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bard graphql
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

Ngôn ngữ chính
PHP
Star
4.9k
Fork
647
Merge trung bình
1 ngày 45 phút
Pull request đã merge (30 ngày)
221

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của statamic/cms

Tất cả issue của statamic/cms

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.