graphql-dotnet / graphql-dotnet/graphql-client

Error in a Mutation Execution of 6.0.1 Nuget Version

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

Description

Hi

```csharp
internal class WebApiAuthTokenService
{

private static GraphQLHttpClient GraphQLClientForCreateToken;

private readonly string _webApiAddress;

public WebApiAuthTokenService(string WebApiAddress)
{
_webApiAddress = WebApiAddress;

GraphQLClientForCreateToken = new GraphQLHttpClient(_webApiAddress, new NewtonsoftJsonSerializer());
}

public async Task createToken(string login, string Password)
{

var heroRequest = new GraphQLRequest
{
Query = @"mutation createToken {
createToken(login: """ + login + @""", password: """ + Password + @""")
{
token
}
}"
};

var ApiResponse = await GraphQLClientForCreateToken.SendMutationAsync(heroRequest);

return ApiResponse.Data;

}

}
```

Just by upgrading from version 6.0.0 to version 6.0.1 of the package, the above code starts reporting the exception with the text "The HTTP request failed with status code OK".

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.