Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.9k stars 1.98k forks source link

[Feature Request] GraphQL Documentation for Union #1870

Closed jmiraglia-stuzo closed 4 years ago

jmiraglia-stuzo commented 4 years ago

Is your feature request related to a problem? Please describe. The GraphQL documentation portion of Insomnia does not resolve Union data types. Drilling into one of these types always produces a no description value to be displayed.

Describe the solution you'd like It would be great if when selecting a Union data type, any types that make up that union are presented in the same way that Fields is presented.

Describe alternatives you've considered Right now there is no alternative solution except to look at the raw schema or use a different GraphQL client that parses this properly.

elemanhillary-zz commented 4 years ago

@jmiraglia-stuzo , it would be really nice if you provide me atleast the graphl api with some union data types so that i can work on this ASAP. Thanks

jmiraglia-stuzo commented 4 years ago

@elemanhillary For example, Artsy, contains a public API at https://metaphysics-production.artsy.net/. In this API there is a Query artwork returning type Artwork. Artwork contains context: ArtworkContext. ArtworkContext is a union. I've included screenshots of what is shown in Insomnia vs GraphiQL below as well:

Open Commerce (Localhost) – Artsy 2020-01-09 08-50-19

GraphiQL 2020-01-09 08-49-34

elemanhillary-zz commented 4 years ago

okay i will look on that, thanks

elemanhillary-zz commented 4 years ago

@jmiraglia-stuzo you can checkout the PR i have opened and give feedback