You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
The text was updated successfully, but these errors were encountered:
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
Version and Environment Details
Operation system: [Windows10]
IDE name and version: [pyCharm 2021.3]
Plugin version: [3.1.1]
The text was updated successfully, but these errors were encountered: