0

I am running a query against a graphql server, but the query is returning more records than can be handled and the query is timing out. I can't figure out how to get pagination to work properly, but really I only need a subset of all of the records where the language field matches 'english', but I can't figure out how to do this.

query DocumentsAndSoftware 
   {
   technicalDocumentsEntries (limit: 3000) 
      {
      ... on technicalDocuments_document_Entry 
         { id title technicalDocuments { 
         ... on technicalDocuments_document_BlockType 
             { fallbackFileUrl documentLanguage file 
                { id url dateModified
                }
             }
         }
      }
   }

I have tried this

query 
    languages($documentLanguage: {DocumentsAndSoftware: 
    {technicalDocuments_document_Entry {technicalDocuments: 
    {technicalDocuments_document_BlockType: {some: {documentLanguage: 
     {eq:'english'}}}}}}}) 

To prepend the query

But I am getting this error:

GraphQLSyntaxError: Syntax Error: Expected Name, found '{'.

GraphQL request:1:36
1 | query languages($documentLanguage: {DocumentsAndSoftware: {technicalDocuments_do
  |                                    ^
  | cument_Entry {technicalDocuments: {technicalDocuments_document_BlockType: {some:

I don't really understand the logic around how this querying/filtering works here. I understand that I'm trying to find records where the documentLanguage field matches the term 'english', and I think I've specified the path for that match, but the error doesn't make any sense to me. Can someone help me out?

Thanks

Brad Davis
  • 1,063
  • 3
  • 18
  • 38
  • 1
    GraphQL, in spite of its name, is *not* a general query language. Your server dictates what is possible in terms of query. Please include the definition of the `technicalDocumentsEntries` query from the GraphQL schema - it will tell you what is possible. – Michel Floyd Jun 27 '23 at 19:59
  • Thanks, I don't own that server so I'll have to ask them for it. Appreciate the input. – Brad Davis Jun 27 '23 at 20:39

0 Answers0