You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@arcticmatt I might be running into the same issue, curious if you can reproduce this.
I can run a query that references the members of the union, with or without fragment syntax (my union type here is union UnionFoo = FooStandalone | FooShadow):
{
Foo(limit: 10) {
__typename
...on FooStandalone { id name }
...on FooShadow { id name }
}
}
or
{
Foo(limit: 10) {
__typename
...FooStandaloneFragment
...FooShadowFragment
}
}
fragment FooStandaloneFragment on FooStandalone { id name }
fragment FooShadowFragment on FooShadow { id name }
Remote GraphQL service receives:
query: 'query { Foo(limit: 10) { __typename ... on FooShadow{ id name } ... on FooStandalone{ id name } } }'
So far, so good.
However I get the same as you if I reference the union type itself - the fields are omitted from the delegated query:
{
Foo(limit: 10) {
__typename
...on UnionFoo {
... on FooStandalone {
id
name
}
... on FooShadow {
id
name
}
}
}
}
or
{
Foo(limit: 10) {
__typename
...UnionFooFragment
}
}
fragment UnionFooFragment on UnionFoo {
...FooStandaloneFragment
...FooShadowFragment
}
fragment FooStandaloneFragment on FooStandalone { id name }
fragment FooShadowFragment on FooShadow { id name }
Version Information
Server Version: 2.7.0, 2.13.0
Environment
Tried on Cloud and locally (using Docker)
What is the current behaviour?
This is what happens when I hit Hasura (which sits in front of a remote schema)
The response is missing
goalAmount
What is the expected behaviour?
This is what happens when I hit the remote schema directly (same exact query)
The response returns
goalAmount
as expectedHow to reproduce the issue?
See queries in screenshots above
Any possible solutions/workarounds you're aware of?
The query works if you don't have a fragment directly on a union type
Keywords
union,fragment
The text was updated successfully, but these errors were encountered: