Skip to content

Commit 8cbe46e

Browse files
authored
Merge pull request #369 from graphql-dotnet/fix-di
Fix for double instantiation of GraphQLLocalExecutionClient
2 parents 477b7f4 + e3f8ad6 commit 8cbe46e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GraphQL.Client.LocalExecution/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static class ServiceCollectionExtensions
1111
public static IGraphQLBuilder AddGraphQLLocalExecutionClient<TSchema>(this IServiceCollection services) where TSchema : ISchema
1212
{
1313
services.AddSingleton<GraphQLLocalExecutionClient<TSchema>>();
14-
services.AddSingleton<IGraphQLClient, GraphQLLocalExecutionClient<TSchema>>();
14+
services.AddSingleton<IGraphQLClient>(p => p.GetRequiredService<GraphQLLocalExecutionClient<TSchema>>());
1515
return services.AddGraphQL();
1616
}
1717
}

0 commit comments

Comments
 (0)