Skip to content

Commit b03160f

Browse files
committed
Fix bug resulting in incorrect Exceptions when automatically enumerating (as IAsyncEnumerable) Connection Pages when a request returns with no results (NextPage = false & EndCursor = null).
1 parent 6c70750 commit b03160f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

FlurlGraphQL/FlurlGraphQL.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<!--NOTE: Just as with the base Flurl.Http.Newtonsoft library and Microsofts recommendation we now support net6 for the latest projects, but also netstandard2.1 which has proper Async streaming support,
55
in addition to netstandard2.0 + net461 for legacy support (because netstandard2.0 it had API compatibility issues prior to .NET Framework 4.7.x -->
66
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;net6.0;</TargetFrameworks>
7-
<Version>2.0.2</Version>
8-
<AssemblyVersion>2.0.2</AssemblyVersion>
9-
<FileVersion>2.0.2</FileVersion>
7+
<Version>2.0.3</Version>
8+
<AssemblyVersion>2.0.3</AssemblyVersion>
9+
<FileVersion>2.0.3</FileVersion>
1010
<Authors>BBernard / CajunCoding</Authors>
1111
<Company>CajunCoding</Company>
1212
<Description>GraphQL client extensions for Flurl.Http -- lightweight, simplified, asynchronous, fluent GraphQL client API extensions for the amazing Flurl Http library!</Description>

FlurlGraphQL/FlurlGraphQL/FlurlGraphQLResponseExtensions.Internal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ string priorEndCursor
152152
throw NewGraphQLException(graphqlResponseProcessor, flurlGraphQLResponse,
153153
"Unable to enumerate all pages because the pageInfo.hasNextPage and/or the pageInfo.endCursor values are not available in the GraphQL query response.");
154154

155-
if (endCursor == priorEndCursor)
155+
if (hasNextPageFlag == true && endCursor != null && endCursor == priorEndCursor)
156156
throw NewGraphQLException(graphqlResponseProcessor, flurlGraphQLResponse,
157157
"Unable to enumerate all pages because the pageInfo.endCursor is returning the same value. Check that the query is correct and that it correctly implements the (after:$after) variable.");
158158

0 commit comments

Comments
 (0)