{
queryContact {
id
friends { id }
friendsAggregate { count }
__typename
}
}
Results will have:
"__typename": ""
I am using slash and there is no way that I know of to see the logs to see how the rewriter translated these two different queries to DQL to maybe help find the error.
@graphql This causes some really weird bugs in my application because Apollo Client depends upon this typename to properly cache results. Can we prioritize this bug?
I have managed to reproduce this on the given version. This bug was introduced along with introducing aggregate fields to GraphQL and is present in 20.11. The bug is in the way DQL result is parsed and converted into GraphQL result.
We have managed to RCA this bug and a fix will soon be pushed to 20.11.
Current workaround to avoid __typename from returning empty string is to have the __typename field before the aggregate field in the query.
The following query will return __typename result properly.
{
queryContact {
id
friends { id }
__typename
friendsAggregate { count }
}
}
Thanks to the JSON changes by @abhimanyusinghgaur , this bug is not present in 21.03 and master.