Replies: 1 comment
-
You can do this with type modules: https://chillicream.com/blog/2021/09/27/hot-chocolate-12#dynamic-schemas The schema definition will be slightly different, as you have to operate on lower level APIs, but the type modules are what you are looking for. |
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.
-
Hello!
In my project GraphQL queries and mutations are dynamically generated based on the database context and compile as "in memory" assembly.
There are classes:
I can make GraphQL queries and mutations to existing database entities. I use hotchocolate methods (AddQueryType and AddMutationType) for my generated classes using reflection.
Here is a method to add dynamic context with graphql support:
I want to regenerate my assembly by reloading "Query" class and "Mutation" class in runtime when DB structure changes (e.g. when a new field is added to a table in the DB, or when an existing field is deleted).
How can I do this?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions