I've run into an issue where Apollo client and the GQL playground return different data with the exact same query. The schema looks something like this:
interface A {
age: Int!
}
interface B implements A {
age: Int!
name: String!
}
type SomeType implements A & B { ... }
type Query {
hello: A
}
The server returns a concrete type SomeType
, which implements both interface A
and B
.
The query:
{
hello {
age
... on B {
name
}
}
}
(The only difference I can think of is that when using Apollo client, the query is parsed with the graphl-tag
). In the GQL playground, the query returns the expect result. Something like:
{
"__typename": "someType",
"age": 10,
"name": "someName"
}
However, when running this query with Apollo client, I get:
{
"__typename": "someType",
"age": 10,
}
Via Active questions tagged javascript - Stack Overflow https://ift.tt/W2GBlXu
Comments
Post a Comment