[Bug]: OneOf Directive is missed in Schema

Aberta
#3,889 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 7 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
53/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp, graphql, postgresql
Domínio
api, databases

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
C#
Estrelas
1.5k
Forks
380
Merge médio
5d 11h
PRs com merge (30d)
4

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Azure/data-api-builder

Todas as issues de Azure/data-api-builder

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.