Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to query EmbeddedDocumentListField in the GraphQL #1257

Open
ahmad88me opened this issue Aug 20, 2020 · 0 comments
Open

how to query EmbeddedDocumentListField in the GraphQL #1257

ahmad88me opened this issue Aug 20, 2020 · 0 comments
Labels

Comments

@ahmad88me
Copy link

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

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-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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant