Skip to content

Fix interface not possible type when implementing another interface#233

Merged
JohnStarich merged 1 commit intomasterfrom
bugfix/add-interface-as-interface-possible-type
Apr 29, 2026
Merged

Fix interface not possible type when implementing another interface#233
JohnStarich merged 1 commit intomasterfrom
bugfix/add-interface-as-interface-possible-type

Conversation

@JohnStarich
Copy link
Copy Markdown
Member

Fix interface not possible type when implementing another interface

Some schemas may have interfaces that implement interfaces, like so:

interface Node {
    id: ID!
}

interface Bar implements Node {
    id: ID!
}

type Foo implements Node & Bar {
    id: ID!
}

Node should be a possible type of Bar, just like Node and Bar are possible types of Foo.

Comment thread merge.go
result.AddPossibleType(name, definition)
for _, interfaceName := range definition.Interfaces {
result.AddPossibleType(interfaceName, definition)
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JohnStarich JohnStarich marked this pull request as ready for review April 29, 2026 20:11
@JohnStarich JohnStarich merged commit fad245d into master Apr 29, 2026
5 checks passed
@JohnStarich JohnStarich deleted the bugfix/add-interface-as-interface-possible-type branch April 29, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant