graphql-go icon indicating copy to clipboard operation
graphql-go copied to clipboard

GraphiQL weirdness (showing "undefined" as type of fields), or underlying issue?

Open dmitshur opened this issue 7 years ago • 2 comments

I was playing with the starwars example with the provided GraphiQL frontend, and noticed the following unexpected behavior. When using autocomplete to see the fields available, the type of each field is shown to be "undefined":

image

However, when hovering over the same field, it shows the type correctly:

image

I've previously used GitHub's GraphiQL Explorer at https://developer.github.com/v4/explorer/, which does not have this issue:

image

Is this a bug in GraphiQL, or is it some underlying issue in the GraphQL server or the starwars schema?

dmitshur avatar Jul 10 '17 19:07 dmitshur

AFAICT This is a bug in GraphiQL, upgrading the library to 11.2 gets rid of this issue (althogh the type is no longer displayed, but that was just a change upstream).

acornejo avatar Jul 29 '17 22:07 acornejo

I'm running the latest version of GraphiQL. I've noticed if you comment your fields it will provide that in the description which is kind of nice.

An example is as follows;

		# created is the date this product was created in YYYY-MM-DD format.
		created: String!

Which is displayed as follows; screen shot 2018-01-07 at 05 44 48

nfisher avatar Jan 07 '18 08:01 nfisher