graphql-python / graphql-python/graphene

Graphene Generic Scalar

Open
#1,253 0 comments 0 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 have a list returning from query like this
`[ { "name": "name1", "color":"red"},
{ "name": "name2", "color": "green"} ]`

but I want it to return like JSON e.g. ` { "name1": { "color": "red"}, "name2": { "color": "green"} } `
for now I am using grapehe Generic Scalar to transform it e.g.

but the issue with this is that in query we cannot specify fields while writing query for this, e.g. we cannot do
`{ user {
color
...
}
}`
rather we will only query
`{
user
}`

do we have any built in solutions for this in graphene ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.