-
Notifications
You must be signed in to change notification settings - Fork 192
net5 TFM #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # src/AspNetCore/Example/Example.csproj
Query = provider.GetRequiredService<StarWarsQuery>(); | ||
Mutation = provider.GetRequiredService<StarWarsMutation>(); | ||
Query = (StarWarsQuery)provider.GetService(typeof(StarWarsQuery)) ?? throw new InvalidOperationException(); | ||
Mutation = (StarWarsMutation)provider.GetService(typeof(StarWarsMutation)) ?? throw new InvalidOperationException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long time ago we removed GetRequiredService
extension method from GraphQL.NET codebase.
#pragma warning disable CS0612 // Type or member is obsolete | ||
services | ||
.AddGraphQL(options => options.EnableMetrics = true) | ||
.AddErrorInfoProvider(opt => opt.ExposeExceptionStackTrace = true) | ||
.AddSystemTextJson() | ||
.AddUserContextBuilder(httpContext => new GraphQLUserContext { User = httpContext.User }); | ||
#pragma warning restore CS0612 // Type or member is obsolete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use non-obsolete methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change usages after April release.
No description provided.