Unhandled exception. System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue.
at Newtonsoft.Json.Linq.JToken.get_Item(Object key)
at lambda_method14(Closure , JObject )
at Octokit.GraphQL.Core.Deserializers.ResponseDeserializer.Deserialize[TResult](Func`2 deserialize, JObject data)
at Octokit.GraphQL.Core.Deserializers.ResponseDeserializer.Deserialize[TResult](Func`2 deserialize, String data)
at Octokit.GraphQL.Core.SimpleQuery`1.Runner.RunPage(CancellationToken cancellationToken)
at Octokit.GraphQL.ConnectionExtensions.Run[T](IConnection connection, ICompiledQuery`1 query, Dictionary`2 variables, CancellationToken cancellationToken)
at GithubStatsWorker.Worker.UpdateCommitStats() in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Worker.cs:line 46
at GithubStatsWorker.Worker.UpdateRepoStats() in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Worker.cs:line 26
at Program.<Main>$(String[] args) in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Program.cs:line 64
at Program.<Main>(String[] args)
Trying to put a .SingleOrDefault() after the .DefaultBranchRef or .Target, gives the following exception:
Unhandled exception. System.TypeInitializationException: The type initializer for 'GithubStatsWorker.Queries' threw an exception.
---> System.NotImplementedException: The method or operation is not implemented.
at Octokit.GraphQL.QueryableValueExtensions.SingleOrDefault[TValue](IQueryableValue`1 source)
at GithubStatsWorker.Queries..cctor() in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Queries.cs:line 16
--- End of inner exception stack trace ---
at GithubStatsWorker.Worker.UpdateCommitStats() in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Worker.cs:line 46
at GithubStatsWorker.Worker.UpdateRepoStats() in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Worker.cs:line 26
at Program.<Main>$(String[] args) in /home/polarizedions/programming/GithubStats/GithubStatsWorker/Program.cs:line 64
at Program.<Main>(String[] args)
Data returned from api: (screenshot from SimpleQuery.cs, RunPage method)
@PolarizedIons, thank you so much for reporting this ❤️ . We'll get it on our board for prioritization and try to reproduce the issue - thanks also for providing all the great info.
Running this query:
Gives the stacktrace:
Trying to put a
.SingleOrDefault()
after the.DefaultBranchRef
or.Target
, gives the following exception:Data returned from api: (screenshot from
SimpleQuery.cs
,RunPage
method)