Skip to content

Regarding resolver function for interface #605

Answered by rafalp
huanyu-li asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Thanks for asking!

What is important, is returning str with name of GraphQL type in your schema. Example decides what type name to return using isinstance check against few classes that were made up for the example and imported from some made up place (in this case models). It's up to you to decide where your classes will be defined and where you will import them from.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@huanyu-li
Comment options

@rafalp
Comment options

@huanyu-li
Comment options

Answer selected by rafalp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants