Return subset of data from GraphQL query

Hi. Within my GraphQL query, I'm wanting to return from an array of object a certain amount of data. Meaning in the below query, I'm currently getting an array of objects for InfoComponentsAccordion. I'm wanting to restrict that to get only the first 2 items (either just the first two, or even better if possible get results based on accordion_heading text). In the GraphQL schema, I can not see fields / input fields for first to do this. I can see fields for this if I query allInfos instead of info, however the fields do not filter this level down. Any idea how this can be done? Or if I can get access to update/amend the GraphQL schema to add fields to do this?

  query {
    info(uid: "terms-conditions", lang: "en-gb") {
      page_title
      components {
        ... on InfoComponentsAccordion {
          type
          label
          fields {
            accordion_heading
            accordion_content
          }
        }
      }
    }
  }

Hello Adam, welcome to the Community.

It is not possible to limit the number of retrieved slices in a query. You can do other types of sorting and filtering options that you can do to limit the response.

You'll need to do this in the front-end of your application.

Could you tell me a little bit more about your use case?

This issue has been closed due to inactivity. Flag to reopen.