Unions that list each other fail with a StackOverflowError
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
Start by reading SchemaParser#getLeafUnionObjects and trace how nested union members are expanded; the issue identifies the recursive expansion as the source of the StackOverflowError. Reproduce with the mutual and self-referencing schemas shown in the issue, including a field that returns the inner union. Done when those schemas no longer overflow and the invalid union membership is handled consistently with the chosen behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Two unions that list each other fail the schema build with a StackOverflowError:
type Query {
results: [Result!]!
}
union Result = Book | Media
union Media = Movie | Result
Same for a union that lists itself (union Result = Book | Result).
SchemaParser#getLeafUnionObjects expands nested unions recursively and doesn't keep track of the ones it already expanded. On master this only happens when some field returns the inner union, or for the self-member case. Otherwise the scanner fails first with "No object type found". After #866 the scanner gets past that, so the first schema above overflows too.
The spec doesn't allow unions as members at all, so I think either flattening each union once (both would be Book | Movie) or failing with an error that names the unions is fine. Probably the error, since nobody asked for cycles.
- Linguagem predominante
- Kotlin
- Estrelas
- 824
- Forks
- 175
- Merge médio
- 2d 5h
- PRs com merge (30d)
- 53
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de graphql-java-kickstart/graphql-java-tools
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 74/100
graphql-java-kickstart/graphql-java-tools#896 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
Mantenedores costumam responder em até 1 dia
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0Abertaenhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
graphql-java-kickstart/graphql-java-tools#881 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de graphql-java-kickstart/graphql-java-tools
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
lugassawan/swe-workbench#823 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 80/100
Droid-Deck/DroidDeck#1355 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
Lovelace refine Taak
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
MinBZK/MijnOverheidZakelijk#1383 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
world-federation-of-advertisers/cross-media-measurement#4739 ·
Mantenedores costumam responder em até 1 dia