Generate enums via SchemaMutator #3756
Unanswered
jared-mackey
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
It it possible to generate enums or enum values with a SchemaMutator plugin? I've written a plugin that should accomplish this but for some reason the resulting enums don't end up in the schema served up to the playground. I am dynamically creating the values via introspection of the model in my repository and then adding them to
schema.Types[...].EnumValues
with all the things I think are needed (directives forgoEnum
andgoModel
, etc). Using values in mutations or queries from these models works but it doesn't seem to get reflected into the schema served to clients in the introspection. Not sure if this is a bug or just not expected to work. Any guidance? :)Thanks!
Beta Was this translation helpful? Give feedback.
All reactions