zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

Union query doesn't return attributes #1189

Closed mwoszczyna closed 2 years ago

mwoszczyna commented 2 years ago

Hi there, I run into a problem:

I'm trying to run a query including the following part of the query

asset {
            ... on AssetInterface {
              id
              name
              imageUrl
           }
}

The query as it self returns all expected values (attributes) apart of the asset

Not sure why the asset fragment in the response returns type only: asset: {__typename: AssetFootballerNode}

I was expecting to see some extra attributes as per query: asset: {__typename: AssetFootballerNode, id: 'something, name: 'something', imageUrl: 'something' }

When running same query in the standalone gql client it works perfectly fine.

Is it a bug, am I missing something?

budde377 commented 2 years ago

Are you using any code generators?

budde377 commented 2 years ago

Please provide a reproducible example.

If you need help debugging, please head over to our discord and we'll sort your out.