StrawberryShake graphql init command return Object reference not set to an instance of an object

118 views Asked by At

I'm trying to use StrawberryShake library to build a GraphQL client app. When executing dotnet graphql init https://public-api.shiphero.com/graphql --headers Authorization="xxxxxxxxxxx" command in Visual Studio Developer PowerShell window, it downloads the schema ok, but then generates error of "Object reference not set to an instance of an object". Does anyone know what to do to avoid this error? I know the schema downloaded was good from checking in Fiddler. Below is the output:

Download schema started.

Download schema completed in 3073 ms

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at HotChocolate.Utilities.Introspection.SchemaFeatures.FromIntrospectionResult(IntrospectionResult result) in /home/runner/work/graphql-platform/graphql-platform/src/HotChocolate/Utilities/src/Utilities.Introspection/SchemaFeatures.cs:line 28 at HotChocolate.Utilities.Introspection.IntrospectionClient.GetSchemaFeaturesAsync(HttpClient client, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/HotChocolate/Utilities/src/Utilities.Introspection/IntrospectionClient.cs:line 97 at HotChocolate.Utilities.Introspection.IntrospectionClient.DownloadSchemaAsync(HttpClient client, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/HotChocolate/Utilities/src/Utilities.Introspection/IntrospectionClient.cs:line 67

I'm expecting after "Download schema completed in xxx ms", it should say "Client configuration started." followed by "Client configuration completed in xxx ms" message.

0

There are 0 answers