mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
Add basic resolvers to Relay Full example in docs/queries.rst.
Added basic resolvers to Full example in Relay section.
This commit is contained in:
parent
7cf4b46f57
commit
8b757bc556
|
@ -266,5 +266,11 @@ Full example
|
||||||
question = graphene.Field(QuestionType)
|
question = graphene.Field(QuestionType)
|
||||||
questions = relay.ConnectionField(QuestionConnection)
|
questions = relay.ConnectionField(QuestionConnection)
|
||||||
|
|
||||||
|
def resolve_question(root, info, **kwargs):
|
||||||
|
return Question
|
||||||
|
|
||||||
|
def resolve_questions(root, info, **kwargs):
|
||||||
|
return Question.objects.all()
|
||||||
|
|
||||||
See the `Relay documentation <https://docs.graphene-python.org/en/latest/relay/nodes/>`__ on
|
See the `Relay documentation <https://docs.graphene-python.org/en/latest/relay/nodes/>`__ on
|
||||||
the core graphene pages for more information on customing the Relay experience.
|
the core graphene pages for more information on customing the Relay experience.
|
Loading…
Reference in New Issue
Block a user