I constructed the following query in GraphQL playground:
In this query I try combine 2 calls, one to fetch a product by id and another one where I try to fetch a product by name.
However when I tried to execute this query it resulted in the following error message:
The query has non-mergable fields
The problem is that GraphQL tries to merge the results in one product result object which does not work.
To have the behavior I want I need to specify an alias for every query:
Now when I execute the query, the query results are put in their own object: