graphql-dotnet / graphql-dotnet/graphql-client

GraphQLHttpClient sends request twice when APQ is enabled

Open
#671 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
648
Forks
136
PR merge metrics
No merged PRs in 30d

Description

I am trying to set up my queries to use APQ, but the request is always being sent twice. I see why that is happening in the code [here](https://github.com/graphql-dotnet/graphql-client/blob/6236c9b2c6f3568f96a9f8e12aa6fb367321c068/src/GraphQL.Client/GraphQLHttpClient.cs#L113), but I must be missing something. The way I am reading this, every code path that uses APQ assumes the request failed and resends it. It seems like the `else` [here ](https://github.com/graphql-dotnet/graphql-client/blob/6236c9b2c6f3568f96a9f8e12aa6fb367321c068/src/GraphQL.Client/GraphQLHttpClient.cs#L124) is not needed (or alternatively should be an `else if`), as there is no indication that the request did not succeed. Any help understanding this would be much appreciated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.