Skip to content

Source gen generates invalid requests when unions have the same property name and different types #138

Description

@Jacob-Steentoft

Describe the bug

When two or more union types have the same property name but different types, ZeroQL doesn't generate a field for the unique instance of the union.

How to Reproduce

public async Task UnionFailing()

Request 2 union types with the same property name with different types.

Expected behavior

ZeroQL generates a temporate field for unions.

The GraphqQL schema that fails

query { posts { ... on ImageContent { imageUrl resolution } ... on TextContent { text } ... on FigureContent { figure { ... on Circle { radius } __typename } } ... on IntegerContent { text } __typename } }

Environment (please complete the following information):

  • Nuget: 7.0.3
  • IDE: Rider
  • .Net Version 9.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions