ISchema in HotChocolate 13? #5885
Unanswered
onionhammer
asked this question in
Q&A
Replies: 1 comment
-
Got it working: in Program.cs: var app = builder.Build();
if (outputSdl is not null)
{
Console.WriteLine("Outputting schema...");
var resolver = app.Services.GetRequiredService<IRequestExecutorResolver>();
var executor = await resolver.GetRequestExecutorAsync();
var sdl = executor.Schema.Print();
// Output to file
File.WriteAllText(outputSdl, sdl);
Environment.Exit(0);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to output my schema at build-time to the filesystem and store it in source control, with HC 12 I was able to do this pretty easily, however in HC13 it doesnt appear that the
OnAfterSchemaCreate
extension method exists anymoreI also see that this code doesnt seem to build; is it an extension in a different nuget package?
https://chillicream.com/docs/hotchocolate/v13/distributed-schema/schema-configuration#schema-federations
Beta Was this translation helpful? Give feedback.
All reactions