Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect type deduction with interfaces #1094

Open
prokop7 opened this issue Aug 19, 2024 · 2 comments
Open

Incorrect type deduction with interfaces #1094

prokop7 opened this issue Aug 19, 2024 · 2 comments
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@prokop7
Copy link

prokop7 commented Aug 19, 2024

Component(s)

router

Component version

v0.0.0-20240819092109-3eea9d8f5836

wgc version

0.58.7

controlplane version

4c8154f4ad9d98bd67a4aee1c8615acdb97de3e165cdac5a346ce7dcb484b9e4

router version

v0.0.0-20240819092109-3eea9d8f5836

What happened?

With given schema

type Query {
  objects: Object
}
interface Object {
  id: Int!
}

type Car implements Object {
  id: Int!
  content: CarContent!
}

type CarContent {
  name: String!
}

type Bike implements Object {
  id: Int!
  content: BikeContent!
}

type BikeContent {
  name: String!
}

the following query will fail with this exception differing types 'BikeContent!' and 'CarContent!' for objectName 'content'

query {
  objects {
    id
    ... on Car {
      id
      content {
        name
      }
    }
    ... on Bike {
      id
      content {
        name
      }
    }
  }
}

It is expected that this query will either execute smoothly or fail during the composition phase.
On Apollo side this runs without exceptions

Environment information

Environment

K8S cluster
golang:1.22.2 + distroless/static

Router configuration

No response

Router execution config

No response

Log output

No response

Additional context

No response

@prokop7 prokop7 added the bug Something isn't working label Aug 19, 2024
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@StarpTech StarpTech added the internally-reviewed The issue has been reviewed internally. label Aug 20, 2024
@StarpTech
Copy link
Contributor

Hi @prokop7, thanks for the report! We will take a look and come back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants