Skip to content

fix: allow resolve_type to return a type name string for Interface and Union#1605

Open
SAY-5 wants to merge 1 commit into
graphql-python:masterfrom
SAY-5:fix/resolve-type-string-return
Open

fix: allow resolve_type to return a type name string for Interface and Union#1605
SAY-5 wants to merge 1 commit into
graphql-python:masterfrom
SAY-5:fix/resolve-type-string-return

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 25, 2026

Fixes #1555.

TypeMap.resolve_type silently ignored string return values from user-defined resolve_type methods on Interface and Union types, causing graphql-core to report that the abstract type could not resolve to an object type. Adding an isinstance(type_, str) check passes the string directly to graphql-core, which already accepts type name strings.

…d Union

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

In 3.1.0, resolve_type method on Interfaces and Unions no longer supports returning the GraphQL Type as a string

1 participant