graphql-python / graphql-python/graphql-core-legacy
Pass field names more accessibly to object resolvers
- Lingua principale
- Python
- Stelle
- 372
- Fork
- 175
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Currently, if you want to look at the set of fields being requested by a child object in a resolver, you have to look deep in the AST, with an expression like this:
```
(field.name.value for field in info.field_asts[0].selection_set.selections)
```
It would be nice if these names were attached directly to the `info` object, even as a property, so that things like database column selection are easier to implement.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by tracing how info.field_asts is populated and exposed to object resolvers, then inspect the resolver context around selection_set.selections. Determine where requested field names could be made accessible without requiring deep AST traversal. Done means resolvers can obtain child field names directly from info, with coverage for the intended database-column-selection use case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100