From 8b757bc556d9b164feb41fe6ae5500bdc06ca713 Mon Sep 17 00:00:00 2001 From: changeling Date: Sun, 12 May 2019 13:17:05 -0500 Subject: [PATCH] Add basic resolvers to Relay Full example in docs/queries.rst. Added basic resolvers to Full example in Relay section. --- docs/queries.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/queries.rst b/docs/queries.rst index a266ecf..51120b8 100644 --- a/docs/queries.rst +++ b/docs/queries.rst @@ -266,5 +266,11 @@ Full example question = graphene.Field(QuestionType) 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 `__ on the core graphene pages for more information on customing the Relay experience. \ No newline at end of file