In my project that uses graphql-dotnet, I unexpectedly started getting errors saying the DataLoader context was null:
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.ArgumentNullException: Value cannot be null.
Parameter name: context
at GraphQL.DataLoader.DataLoaderContextExtensions.GetOrAddBatchLoader[TKey,T](DataLoaderContext context, String loaderKey, Func`3 fetchFunc, IEqualityComparer`1 keyComparer, T defaultValue)
The context
parameter comes from the IDataLoaderContextAccessor
that is injected into the constructor of the graph type. Why would it be null?