graphql-dotnet / graphql-client

A GraphQL Client for .NET Standard
MIT License
620 stars 132 forks source link

Null Reference Exception: Object reference not set to an instance of an object #512

Open mherbert opened 1 year ago

mherbert commented 1 year ago

I am using version 5.1.0 and still receiving the Null Reference Exception on SendMutationAsync and SendQueryAsync as well. Appreciate your inputs .. thank you!

Document   | Name | Value | Type -- | -- | -- | -- ◢ | $exception | {System.NullReferenceException: Object reference not set to an instance of an object. at GraphQL.Client.Http.GraphQLHttpClientOptions.<>c.<.ctor>b__44_2(HttpResponseMessage r) in /_/src/GraphQL.Client/GraphQLHttpClientOptions.cs:line 60 at GraphQL.Client.Http.GraphQLHttpClient.SendHttpRequestAsync[TResponse](GraphQLRequest request, CancellationToken cancellationToken) in /_/src/GraphQL.Client/GraphQLHttpClient.cs:line 124 at GraphQL.Client.Http.GraphQLHttpClient.SendQueryAsync[TResponse](GraphQLRequest request, CancellationToken cancellationToken) Document   | Name | Value | Type -- | -- | -- | --   | StackTrace | " at GraphQL.Client.Http.GraphQLHttpClientOptions.<>c.<.ctor>b__44_2(HttpResponseMessage r)\n at GraphQL.Client.Http.GraphQLHttpClient.d__28`1.MoveNext()\n at GraphQL.Client.Http.GraphQLHttpClient.d__23`1.MoveNext()\n at VectorLMS.Person.d__2.MoveNext() in
sungam3r commented 1 year ago

This is because fix from @rose-a was not included into release https://github.com/graphql-dotnet/graphql-client/releases/tag/v5.1.0.

изображение

mherbert commented 1 year ago

Thank you Sungam! I am new to this process. How can I get the fix? Will there be a new version released soon? Thank you again for your help.

sungam3r commented 1 year ago

@rose-a Would you publish a release? Or I can do it myself pushing new tag.

Meccuz commented 1 year ago

Is there any news on this release? We just encountered this issue today. Thanks!

rose-a commented 1 year ago

sorry for my slow reaction, I'm currently pretty swamped...

I just released v5.1.1 containing this fix. Hope this solves the problem.