|
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, |
Replies: 1 comment 3 replies
|
Hi! Thanks for asking! What is important, is returning |
Hi! Thanks for asking!
What is important, is returning
strwith name of GraphQL type in your schema. Example decides what type name to return usingisinstancecheck 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.