graphql-python / graphql-python/graphene
how to query EmbeddedDocumentListField in the GraphQL
- Lenguaje dominante
- Python
- Estrellas
- 8.2k
- Forks
- 818
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**Note: for support questions, please use stackoverflow**. This repository's issues are reserved for feature requests and bug reports.
* **What is the current behavior?**
EmbeddedDocumentListField can't be queried and I couldn't find anything in the documentation.
I get the following error `"Cannot query field \"candidateToolPairs\" on type \"Column\".",`
Code gist is available: https://gist.github.com/ahmad88me/d489b8aa87e71d24e28606e5b502ab28
``` # schema.py
class Column(MongoengineObjectType):
class Meta:
model = ColumnModel
interfaces = (Node,)
```
with the model class `Column` include `candidate_tool_pairs = EmbeddedDocumentListField(ToolCandidatePair)`
In the graphQL interface, all the field of the class Column loads successfully, but the field `candidate_tool_pairs` (I tried candidateToolPairs as well. Also nothing starts with candidate is suggested by the autocomplete).
Instead, I get the following error: `"Cannot query field \"candidateToolPairs\" on type \"Column\".",`
* **What is the expected behavior?**
To get the list candidateToolPairs
* **Please tell us about your environment:**
```Flask==1.1.2
Flask-GraphQL==2.0.1
graphene==2.1.8
graphene-mongo==0.2.13
graphql-core==2.3.2
graphql-relay==2.0.1
graphql-server-core==1.2.0
mongoengine==0.19.1
pymongo==3.11.0```
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con el ejemplo de schema.py y la declaración de EmbeddedDocumentListField del modelo Column; inspecciona el esquema GraphQL generado para Column y compáralo con la consulta candidateToolPairs esperada. El gist enlazado y las versiones indicadas de Flask, Graphene y MongoEngine proporcionan el contexto para reproducirlo. Se considera terminado cuando se haya determinado si el campo es compatible y se haya registrado el comportamiento verificado o la documentación necesaria.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- flask, graphql, python
- Área
- api, database
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100