mercurius icon indicating copy to clipboard operation
mercurius copied to clipboard

Federation not fetching downstream simple query result type `Int`

Open tomi-bigpi opened this issue 2 years ago • 1 comments

I ran into an issue with a federated query that simply returns an Int. Calling the service directly (also running on Mercurius) returns the value as expected.

Relevant bit from the schema:

type Query {
  myCount: Int!
}

I'm not seeing any calls from the federation service to the downstream service, and calls fail with Cannot return null for non-nullable field Query.myCount.. Making the return type nullable causes a null to be returned.

Wrapping the result in a custom type, such as type MyAggregations { count: Int! } works as expected.

tomi-bigpi avatar Apr 28 '22 21:04 tomi-bigpi