You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (Jira)" <ji...@apache.org> on 2021/06/24 13:00:00 UTC

[jira] [Updated] (SLING-10541) Incorrect "Start cursor not found" error with empty result set

     [ https://issues.apache.org/jira/browse/SLING-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz updated SLING-10541:
----------------------------------------
    Description: 
It looks like [this test|https://github.com/apache/sling-org-apache-sling-graphql-core/blob/1e04736f83eeba222ca390cc80159a791e4c6935/src/main/java/org/apache/sling/graphql/helpers/GenericConnection.java#L114] in the GenericConnection class should not throw an exception if the result set is empty.

Currently (to be confirmed by tests) an empty result set causes this exception to be thrown.
{code:java}
if(!inRange && limit > 0) {
  throw new SlingGraphQLException("Start cursor not found in supplied data:" + startAfter);
}
{code}

  was:
It looks like [this test|https://github.com/apache/sling-org-apache-sling-graphql-core/blob/1e04736f83eeba222ca390cc80159a791e4c6935/src/main/java/org/apache/sling/graphql/helpers/GenericConnection.java#L114] in the GenericConnection class should not throw an exception if the result set is empty and {{startAfter}} is null. Currently (to be confirmed by tests) an empty result set causes this exception to be thrown.

{code}
if(!inRange && limit > 0) {
  throw new SlingGraphQLException("Start cursor not found in supplied data:" + startAfter);
}
{code}


> Incorrect "Start cursor not found" error with empty result set
> --------------------------------------------------------------
>
>                 Key: SLING-10541
>                 URL: https://issues.apache.org/jira/browse/SLING-10541
>             Project: Sling
>          Issue Type: Improvement
>          Components: GraphQL
>    Affects Versions: GraphQL Core 0.0.10
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>
> It looks like [this test|https://github.com/apache/sling-org-apache-sling-graphql-core/blob/1e04736f83eeba222ca390cc80159a791e4c6935/src/main/java/org/apache/sling/graphql/helpers/GenericConnection.java#L114] in the GenericConnection class should not throw an exception if the result set is empty.
> Currently (to be confirmed by tests) an empty result set causes this exception to be thrown.
> {code:java}
> if(!inRange && limit > 0) {
>   throw new SlingGraphQLException("Start cursor not found in supplied data:" + startAfter);
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)