Uploaded image for project: 'Xray for Jira Cloud'
  1. Xray for Jira Cloud
  2. XRAYCLOUD-10439

Incorrect pagination with the Xray Graphql queries

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Waiting Approval
    • Medium
    • Resolution: Unresolved
    • Xray Cloud 7.5.0
    • None
    • GraphQL
    • None
    • Jira Cloud, Postman

    Description

      Description:

      The GraphQL query response does not follow any specific order, which results in incorrect pagination.

      Pre-conditions: N/A

      How to reproduce

      1. Execute the following GraphQL queries:
         Start = 0
        {      getTests(start: 0, limit: 50, jql: "CREATED > 2000-01-01 and (project = \"JN2\") ORDER BY CREATED ASC" ,modifiedSince:"2026-03-11T00:00:00Z" ) {        total        start        results{            jira(fields:["key"])        }    }} 
      1. The same query with a changed Start = 2
        {      getTests(start: 2, limit: 50, jql: "CREATED > 2000-01-01 and (project = \"JN2\") ORDER BY CREATED ASC" ,modifiedSince:"2026-03-11T00:00:00Z" ) {        total        start        results{            jira(fields:["key"])        }    }} 

         

      Actual result/Attachments:

      getTests() query results

      For Start 0:   {"data": {"getTests": {"total": 9, "start": 0,
         "results": [
       { "jira": {"key": "JN2-639" }},{ "jira": {"key": "JN2-640" }},{ "jira": {"key": "JN2-645" }},{ "jira": {"key": "JN2-641" }},{ "jira": {"key": "JN2-642" }},{ "jira": {"key": "JN2-638" }},{ "jira": {"key": "JN2-637" }},{ "jira": {"key": "JN2-644" }},{ "jira": {"key": "JN2-643" }
            }  ]   }}}
      For Start 2: {"data": { "getTests": { "total": 9, "start": 2, "results": [
                      {"jira": {"key": "JN2-643"}},{"jira": {"key": "JN2-639"}},{"jira": {"key": "JN2-640"}},{"jira": {"key": "JN2-644"}},{"jira": {"key": "JN2-641"}},{"jira": {"key": "JN2-642"}},{"jira": {"key": "JN2-645"}}]
      }}} 

      For getTets() The Keys JN2-637 and JN2-638 are omitted as expected, but the order in which it prints the results does not follow the Order by clause, leading to pagination problems.

      Expected result

      GraphQl query results should show the results in the correct order so that Pagination will work correctly.

      Version

      • Xray Cloud 7.5.0

      Attachments

        Issue Links

          Activity

            People

              bernardo.cottim Bernardo Cottim
              jayanthi.murthi Jayanthi Murthi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: