graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Graphene Generic Scalar

Open Umarahmad87 opened this issue 5 years ago • 0 comments

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 ?

Umarahmad87 avatar Aug 17 '20 18:08 Umarahmad87