async-graphql / async-graphql

A GraphQL server library implemented in Rust
https://async-graphql.github.io/
Apache License 2.0
3.38k stars 468 forks source link

Dynamic Schema Does Not Resolve Correct Type for property `_services` (Federation Subgraphs) #1211

Open nickisyourfan opened 1 year ago

nickisyourfan commented 1 year ago

Expected Behavior

Subgraph introspection of a federated server built with dynamic schema returns type _Service.

Actual Behavior

Subgraph introspection of a federated server built with dynamic schema returns type String.

Steps to Reproduce the Problem

  1. Use dynamic schema.
  2. Enable Federation.
  3. Use Rover CLI to create supergraph -or- introspect the subgraph.
    • rover supergraph compose http://localhost:5000
    • rover subgraph introspect http://localhost:5000
  4. Field _service returns sdl as type String causing subgraph introspection error. Note, regular introspection is valid using rover graph introspect http://localhost:5000
_service: "..."  
  1. It should return type _Service instead, which is an object that contains the property sdl as a string.
_service: {
  sdl: "..."
}

Specifications

bbigras commented 1 year ago

Can this issue be closed now?

nickisyourfan commented 1 year ago

This PR did provide the fix for me. @bbigras

Would you like that I hit the close button or would you like an official contributer to close this?