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
{{ message }}
Repository navigation
Wrong assumption on argument count for implementation of interfaces #1897
Describe the bug
Currently this library assumes and validates that the amount of arguments a field has on the interface and implementing object has to be the same. However this assumption is not true according to GraphQL Spec (see: https://github.com/graphql/graphql-spec/blob/master/spec/Section%203%20--%20Type%20System.md - IsValidImplementation(type, implementedType)). An implementing type may add optional arguments to the field. The library will then produce an error as:
object type 'Person' does not implement interface 'User' because field 'groups' has a different number of arguments
To Reproduce
interface User {
id: String!
groups: UserGroupList!
}
type Person implements User {
id: String!
groups(name: StringFieldFilter): UserGroupList!
}
Activity
cjanietz commentedon May 18, 2020
The implementation in #1884 seems to fix this, waiting for it to be merged
felipe-gdr commentedon May 18, 2020
@cjanietz , #1884 actually doesn't fix this.
I'll look into fixing this one as well.