profile
viewpoint

Ask questions"Unknown field" - does not resolve to a valid schema type (New in plugin version 2.5)

Describe the bug

  • Started to notice after update of the js-graphql plugin to version 2.5 (and Android studio to 4.0)
  • Viewing our file with grapql queries now all requested fields are red and on hovering show error "Unknown field"
  • No auto-suggestion when typing
  • But: Can still run queries against our Graphql endpoint
  • When installing the previous plugin version 2.4: All works fine with auto-suggestion and no red errors

To Reproduce

  • Sorry I'm only having a full production API graqhql, but here is the condensed definition related to the screenshots - maybe something to do with the extra defined type?
allStudios(
   first: Int
): StudioConnection!

type StudioConnection {
  edges: [StudioEdge!]
  pageInfo: PageInfo!
  totalCount: Int!
}

I really hope this helps. If not I can try to workout a simple demo project, but will take me longer

Expected behavior

  • No errors shown in graphql file
  • When typing after a query: get suggestions for the available fields

Screenshots

Using version 2.5:

Screenshot 2020-06-17 at 15 48 42

Screenshot 2020-06-17 at 15 51 06

Using version 2.4:

Screenshot 2020-06-17 at 15 53 14

Version and Environment Details Operation system: macOS IDE name and version: Android Studio 4.0 Plugin version: 2.5

Additional context

  • Couldn't find any open issue that sounded like mine, but https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/347 also mentions something broken in 2.5 and working on 2.4 - not sure if related?
jimkyndemeyer/js-graphql-intellij-plugin

Answer questions AllanWang

image

is that what you are looking for? I'm having the same issue. This is using the github schema (https://github.com/octokit/graphql-schema/blob/master/schema.json)

useful!

Related questions

Add or prepare for support of new GraphQL Config version hot 1
[v2] There is no top level schema object defined hot 1
Github User Rank List