[Bug]: OneOf Directive is missed in Schema

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

Maintainer thường phản hồi trong vòng 7 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
53/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, graphql, postgresql
Lĩnh vực
api, databases

Hướng nghiên cứu

Start by comparing GraphQL schema generation in version 2.1.5 with the earlier 1.6+ behavior described in the issue, focusing on how OneOf input types are represented. Reproduce with a PostgreSQL configuration containing a OneOf input type and inspect the generated schema. Done when the schema includes @oneOf on those input types.

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

Mô tả

bug triage
What happened?

Description :
The generated GraphQL schema is missing the @oneOf directive in the latest version of DAB. This functionality was working correctly in earlier versions (1.6+), where the schema correctly exposed OneOf input objects with the @oneOf directive.

Expected Behavior :
When generating the GraphQL schema, input objects configured as OneOf types should include the @oneOf directive in the schema output.

Actual Behavior:
The generated schema does not include the @oneOf directive

Impact :
GraphQL clients cannot discover OneOf semantics through schema introspection.
Schema does not accurately represent the intended input validation rules.
Potential interoperability issues with tooling that relies on the @oneOf directive.

Steps to Reproduce :
Configure an input type that should behave as a OneOf input.
Generate or inspect the GraphQL schema.
Observe that the @oneOf directive is not present on the input type.

Environment
Product: Data API Builder (DAB)
Previous Working Version: 1.6+
Current Version: Latest
Database: PostgreSQL
GraphQL Endpoint: Enabled

Additional Context

This behavior seems to be a regression introduced in a recent release. The same configuration generated schemas with the @oneOf directive in DAB 1.6+, but the directive is no longer emitted in the latest version

Version

2.1.5

What database are you using?

PostgreSQL

What hosting model are you using?

Static Web Apps (SWA), Container Apps

Which API approach are you accessing DAB through?

GraphQL

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
Ngôn ngữ chính
C#
Star
1.5k
Fork
380
Merge trung bình
5 ngày 11 giờ
Pull request đã merge (30 ngày)
4

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 Azure/data-api-builder

Tất cả issue của Azure/data-api-builder

Issue tương tự

Thêm issue về C#

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.