Invalid Schema for optional field arguments on interface implementations
See original GitHub issueVersion and Environment Details
Operation system: OSX
IDE name and version: WebStorm 2020.1 EAP
Plugin version: 2.4.0
Expected Behaviour
interface Vehicle {
name: String!
}
type Car implements Vehicle {
name(charLimit: Int = 10): String!
}
This was, at one point, an invalid schema, but it was made valid 5 years ago. https://github.com/graphql/graphql-spec/pull/110 https://github.com/graphql/graphql-spec/issues/401
Actual Behaviour
graphql.schema.validation.InvalidSchemaException: invalid schema:
object type 'Car' does not implement interface 'Vehicle' because field 'name' has a different number of arguments
at graphql.schema.GraphQLSchema$Builder.buildImpl(GraphQLSchema.java:536)
at graphql.schema.GraphQLSchema$Builder.build(GraphQLSchema.java:515)
at graphql.schema.idl.SchemaGenerator.makeExecutableSchemaImpl(SchemaGenerator.java:294)
at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:271)
at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:243)
at graphql.schema.idl.UnExecutableSchemaGenerator.makeUnExecutableSchema(UnExecutableSchemaGenerator.java:28)
at com.intellij.lang.jsgraphql.schema.GraphQLTypeDefinitionRegistryServiceImpl.lambda$getSchemaWithErrors$1(GraphQLTypeDefinitionRegistryServiceImpl.java:72)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
at com.intellij.lang.jsgraphql.schema.GraphQLTypeDefinitionRegistryServiceImpl.getSchemaWithErrors(GraphQLTypeDefinitionRegistryServiceImpl.java:69)
at com.intellij.lang.jsgraphql.ide.project.schemastatus.GraphQLConfigSchemaNode.<init>(GraphQLConfigSchemaNode.java:82)
at com.intellij.lang.jsgraphql.ide.project.schemastatus.GraphQLSchemasRootNode.getChildren(GraphQLSchemasRootNode.java:48)
at com.intellij.lang.jsgraphql.ide.project.schemastatus.GraphQLSchemasPanel.lambda$null$0(GraphQLSchemasPanel.java:128)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:869)
at com.intellij.lang.jsgraphql.ide.project.schemastatus.GraphQLSchemasPanel.lambda$null$1(GraphQLSchemasPanel.java:125)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
It does look like it’s straight from the library so I’ll create an issue there as well. https://github.com/graphql-java/graphql-java/issues/1932
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Covariance of arguments not possible for interface ... - GitHub
Then I define a Sculpture implementation. I want Scuplture to be filtered on material and school , but also based on all the...
Read more >Federation error codes - Apollo GraphQL Docs
Indicates that a schema provided for an Apollo Federation supergraph is not a valid supergraph schema.
Read more >How can I infer optional properties in TypeScript?
Given a schema-like T , first map over each of its properties and pull out the first parameter to the validate() method.
Read more >Handbook - Interfaces - TypeScript
Notice that our object actually has more properties than this, but the compiler only checks that at least the ones required are present...
Read more >GraphQL specification
Fragments are consumed by using the spread operator ( ... ). All fields selected by the fragment will be added to the query...
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
Working great! Thanks for the quick release 💯
Fixed in 2.5.0, pending JetBrains approval.