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

Router does not serve __type field as part of an Introspection query #1245

Open
danielreynolds1 opened this issue Oct 4, 2024 · 5 comments
Assignees
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@danielreynolds1
Copy link

Component(s)

router

Component version

0.110.1, 0.118.0

wgc version

0.62.0

controlplane version

0.104.0

router version

0.110.1, 0.118.0

What happened?

Description

When I try to make an IntrospectionQuery using StrawberryShake (.NET client), the .NET code cannot parse the result. The query looks like:

query IntrospectionQuery {
  __type(name: "__Schema") {
    fields {
      name
    }
  }
}

The result comes back from the router as:

{
  "data": {
    "__type": null
  }
}

Steps to Reproduce

I have reproduced this using multiple versions of the Router. I believe it is completely agnostic of the subgraphs within the system.

This should be reproducible on the code found in the demo.

Expected Result

Based on an alternative Federated router implementation, I would expect the result to be:

{
  "data": {
    "__type": {
      "fields": [
        {
          "name": "description"
        },
        {
          "name": "types"
        },
        {
          "name": "queryType"
        },
        {
          "name": "mutationType"
        },
        {
          "name": "subscriptionType"
        },
        {
          "name": "directives"
        }
      ]
    }
  }
}

Environment information

No response

Router configuration

No response

Router execution config

No response

Log output

No response

Additional context

Apollo Router produced the expected result above, as did the graphql-yoga server. I assume it is a part of the intended GraphQL spec?

@danielreynolds1 danielreynolds1 added the bug Something isn't working label Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

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 Oct 8, 2024
@StarpTech
Copy link
Contributor

Hi @danielreynolds1, thanks for opening the issue. We'll take a look and come back to you.

@devsergiy
Copy link
Member

Hi @danielreynolds1

We intentionally do not include information from the internal graphql types
Could you explain your use case? Why do you need that?

@danielreynolds1
Copy link
Author

Hi,

As mentioned in the original post, the call is made by StrawberryShake as this is how it builds its introspected schema. I don’t know why it does it that way, other introspection queries work for us.

The docs can be found here: https://chillicream.com/docs/strawberryshake/v13

We use the library in various Server and Desktop applications and it would be nice if we could do the introspection to acquire the schema. The workaround for now has been to download the schema from studio and put this alongside the project (so it doesn’t automatically download it from the server).

The StrawberryShake introspection has worked with other routers, so I was surprised to see the query returning null for __Type!

@devsergiy
Copy link
Member

Thanks for the report and the detailed explanation
we will schedule a fix for this issue

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

3 participants