how to personalize resolve DjangoObjectType #1169
Answered
by
louisdvs
yoelvysmartinez
asked this question in
Q&A
My schema My question is how to personalize resolve_cities in CountryNode class. Something like this |
Answered by
louisdvs
Mar 1, 2019
Replies: 3 comments
|
I've done it with Object Type but I do not want to lose the relay pagination |
0 replies
|
You shouldn't be trying to add a resolver for Cities on the Country Node. The only reason you would add a field and resolver directly on the Type definition is if it is not defined in the django model. You should be able to add the custom resolver in your query, like: Hope this helps. Cheers |
0 replies
Answer selected by
zbyte64
|
Hey @yoelvys - it looks like @louisdvs is providing the correct solution. Closing as resolved. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You shouldn't be trying to add a resolver for Cities on the Country Node. The only reason you would add a field and resolver directly on the Type definition is if it is not defined in the django model.
You should be able to add the custom resolver in your query, like:
Hope this helps. Cheers