graphql-python / graphql-python/graphene

Graphene Generic Scalar

Aperta
#1,253 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
✨ enhancement
Lingua principale
Python
Stelle
8.2k
Fork
818
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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 ?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.