graphql-python / graphql-python/graphene

Save variables from resolver for later use

Open
#1,270 2 comments 3 reactions 0 assignees View on GitHub
✨ enhancement
Dominant language
Python
Stars
8.2k
Forks
818
PR merge metrics
No merged PRs in 30d

Description

I used graphene for my project and it worked quite well, but I had a really tough time modifying json response, for example adding count of total matched records. I read documentation, but it seems to be overly complicated, which resolves in duplicate responses to database, and hence slowing processes. I am working with quite large data, so duplicating responses to database is not an option. It would be very helpful if I could save some parameters from resolver to separate dictionary to later modify response. I think adding this feature would simplify workflow for many, who wants to use graphql in their projects.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining how GraphQL resolvers produce JSON responses and how the current workflow queries the database more than once. Clarify the expected way to retain resolver parameters for later response modification, including how the total matched-record count should be exposed. Done means the workflow avoids duplicate database responses while supporting this use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.