1

Has anyone successfully implemented GraphQL.NET v5 in .NET 6 and been able to register in Program.cs as there is no Startup.cs? There are breaking changes from V4.

This is the message I get after upgrade to v5 regards, Olafur

1 Answers1

0

Yes I have but I am using latest version 7.3.0 with .NET 6 Installation, the signature for AddGraphQL has changed as below, the sample code in Program.cs in .net 6.

AddGraphQL(Action<IGraphQLBuilder>? configure)

builder.Services.AddGraphQL(builder => builder
.AddSystemTextJson()
.AddSchema<SampleSchema>()
.AddGraphTypes(typeof(SampleQuery).Assembly)
.AddErrorInfoProvider(opt => opt.ExposeExceptionDetails = true)
.AddDataLoader());
Raj
  • 166
  • 1
  • 11