This issue is obscuring another issue that I'm having that is preventing me from calling a Mutation of mine. The error that I'm receiving is:
4>CSC : warning AD0001: Analyzer 'ZeroQL.SourceGenerators.Analyzers.QueryRequestAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
As for the other error, I'm still trying to pin it down and will create an issue for that, if it isn't something that I'm doing wrong. Love this library by the way. Thanks.
This issue is obscuring another issue that I'm having that is preventing me from calling a Mutation of mine. The error that I'm receiving is:
4>CSC : warning AD0001: Analyzer 'ZeroQL.SourceGenerators.Analyzers.QueryRequestAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
I started debugging the analyer and see the root cause here. At https://github.com/byme8/ZeroQL/blob/main/src/ZeroQL.SourceGenerators/Analyzers/QueryRequestAnalyzer.cs#L73 the ZeroQLRequestLikeContextResolver.Resolve method can return an
Error
in itsResult<GraphQLSourceGenerationContext>
instance, but theif
condition following the Resolve call only checks for anErrorWithData<Diagnostic>
. Itselse
then gets called which assumes that there is no error and thatrequestContext
is not null (but it is null). Therefore, an exception occurs at https://github.com/byme8/ZeroQL/blob/main/src/ZeroQL.SourceGenerators/Analyzers/QueryRequestAnalyzer.cs#L83 when trying to get theOperationQuery
property.As for the other error, I'm still trying to pin it down and will create an issue for that, if it isn't something that I'm doing wrong. Love this library by the way. Thanks.