HotChocolate GraphQL add type extension or schema at runtime

Viewed 583

I want to add a new type or query extension dynamically when a back end service registers at our API anytime at runtime. So on startup in ConfigureServices we basically just have a query with one test method:

services.AddGraphQLServer()
        .AddQueryType(t => t.Name("Query"))
        .AddType<Query>();

After startup I need to call AddType or AddTypeExtensionsFromString to add the new methods/types to the API. Is there an way to do this with HotChocolate?

0 Answers
Related