Dynamically choosing the schema at runtime #3563
Unanswered
joao-figueira
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling trying to dynamically choose the schema which I want to use based on information sent on the request.
Example:
If I send a request to an specific URL - .../graphql/schema/{id} - I can get the id from the slug. With that ID, I want to get the schema (stored on a database where it can be updated as many time the user wants) and execute the query against it.
I can already do this using graphql-dotnet, but I want to use HotChocolate in order to take advantage of all the features that it provides. I've wasted many hours so far and I'm not being successful.
I've looked into the implementation of the IRequestExecutorResolver and I realized that the RequestExecutor is chosen according to the schemaName. Is there any way to, at runtime, add and edit the current list of executors? Or is there any easier way to resolve my problem?
Many thanks, João
Beta Was this translation helpful? Give feedback.
All reactions