Describe the bug
The schema inspection "Interface implementation" is to strict.
False positive error with message:
The object type 'AorBEdge' has tried to redefine field 'node' defined via interface 'Edge' from 'Node!' to 'StricterNode!'
The redifinition of the 'node' fields return type should be allowed, because the new return type 'StricterNode' implements the 'Node' interface (just a refinement).
The inspection seems to raise an error if any redefinition of a field defined by an interface is attempted.
Instead it should check, whether or not the new type is a refinement of the original return type.
To Reproduce
interface Node {
id: ID!
}
interface Edge {
cursor: String!
node: Node!
}
interface StricterNode implements Node {
id: ID!
}
type A implements StricterNode & Node {
id: ID!
}
type B implements StricterNode & Node {
id: ID!
}
type AorBEdge implements Edge { # <-- False positive appears here, see screenshot.
cursor: String!
node: StricterNode!
}
Expected behavior
This is valid GraphQL-SDL, so there is no error to detect.
Validity of SDL was ensured by executing this schema with pythons ariadne library, which results in no error.
Screenshots
Version and Environment Details
Operation system: [Windows10]
IDE name and version: [pyCharm 2021.3]
Plugin version: [3.1.1]
Describe the bug The schema inspection "Interface implementation" is to strict.
False positive error with message:
The redifinition of the 'node' fields return type should be allowed, because the new return type 'StricterNode' implements the 'Node' interface (just a refinement).
The inspection seems to raise an error if any redefinition of a field defined by an interface is attempted. Instead it should check, whether or not the new type is a refinement of the original return type.
To Reproduce
Expected behavior This is valid GraphQL-SDL, so there is no error to detect. Validity of SDL was ensured by executing this schema with pythons
ariadne
library, which results in no error.Screenshots![grafik](https://user-images.githubusercontent.com/52535122/145437616-365f2bba-3e58-4271-86cb-2d0601c78c4c.png)
Version and Environment Details Operation system: [Windows10] IDE name and version: [pyCharm 2021.3] Plugin version: [3.1.1]