"Unknown field" - does not resolve to a valid schema type (New in plugin version 2.5)
See original GitHub issueDescribe 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:
Using version 2.4:
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?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:16
Top Results From Across the Web
does not resolve to a valid schema type (New in plugin ...
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...
Read more >js-graphql-intellij-plugin - Bountysource
I have added my schema to a .graphql file in my main project directory. I now get this error: image. This is very...
Read more >@pothos/plugin-errors - npm
A Pothos plugin for adding typed errors into your schema. ... plugin will automatically resolve to the corresponding error object type.
Read more >Release Notes - Flyway by Redgate • Database Migrations ...
Fix issue where post schema clean didn't include correct schemas. Clean mode now cleans more schemas for SQL Server integrated authentication logins. Issue...
Read more >Hibernate ORM 5.4.33.Final User Guide - Red Hat on GitHub
Since there was no explicit type mapping, Hibernate looks to the BasicTypeRegistry to find the registered mapping for java.lang.String .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone having trouble with this, I found out what I was doing wrong (This is in Webstorm, but should work the same in Intellij)
Create your
.graphql.config
file and click the green arrow icon to generate theschema.graphql
This will create a new schema file in the chosen directory. You should then have auto complete and proper syntax highlighting in your own .graphql files
Hello, I am currently having this problem. here is content of scratch.graphql file:
When I run this query it correctly returns data, but when I hover over
allUsers
orusername
I get “Unknown field allUsers The parent selection or operation does not resolve to a valid schema type”.How do I fix this and get schema autocompletion and validation?
I am using GraphQL 3.1.2 plugin in PycharmProfessional. Here is .graphqlconfig file content:
the scratch.graphql file in in src folder. If you need more info please let me know.
I also get a
A schema should have a 'query' operation defined
error in my graphql window, but the generated by graphql schema has type Query defined, so I don’t know what the problem is.