0

I am using graphql from the last few days. I am using query to excess some data from my mongodb data base. The query is

query {try{sentences{tokens { index word }}}}

It is giving me all the data from my data base. Now when I am trying to use some filter in my query, I am facing error. If any one can me any idea or solution about my mistake it will be helpful.enter image description here

enter image description here

I tried same (word: "such") , in query, try and sentences also. But facing same error. Tried to do greater, equal and different query with find and filter.

***schema

enter image description here

jonson
  • 105
  • 2
  • 7

1 Answers1

0

Try after changing query as below:

{
    query {
        try {
            sentences {
                tokens(query: { word: "such"}) {
                    word
                }
            }
        }
    }
}
Chandan
  • 11,465
  • 1
  • 6
  • 25
  • I am tried earlier this command. But still facing same error after using this also. { "data": null, "errors": [ { "message": "Unknown argument \"query\" on field \"tokens\" of type \"TrySentence\".", "locations": [ { "line": 4, "column": 20 } ] } ] } – jonson Jun 02 '22 at 23:22
  • After using this query, facing same issue. "message": "Cannot query field \"query\" on type \"Query\".", "locations": [ { "line": 2, "column": 5 – jonson Jun 03 '22 at 09:13