Skip to content

[Bug] Fragments are discarded on the root Query type #2720

@fubhy

Description

@fubhy

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Fragments are discarded on the root Query type

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Run this query on any subgraph:

fragment Metadata on Query {
  _meta {
    deployment
    block {
      number
    }
  }
}

query MyQuery {
  ...Metadata
}

What is the expected behavior?
The query should return the contents of the Metadata fragment but instead it is empty.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions