-
Hi, I just have a question regarding resolving interface when I read following docs (https://ariadnegraphql.org/docs/interfaces). def resolve_search_result_type(obj, *_): In addition, I find sth from the main webpage like 'from .models import Category, Promotion'. Should Client, Order, and Product follow the same way to be imported like 'from .models import Client, Order, Product'? Thank you in advance. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi! Thanks for asking! What is important, is returning |
Beta Was this translation helpful? Give feedback.
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 usingisinstance
check against few classes that were made up for the example and imported from some made up place (in this casemodels
). It's up to you to decide where your classes will be defined and where you will import them from.