What's the best way to add to the SDL *before* codegen runs #8505
-
I have code that dynamically generates a few types based on a directive in the schema. We use an SDL-first approach so we need to read the schema and print this out before the rest of codegen. Is this best done in one of the lifecycle hooks? Or can I do this in a plugin? (Plugin is preferred but I don't see how to add to the schema that's already been loaded.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Codegen |
Beta Was this translation helpful? Give feedback.
Codegen
plugin
s are only meant to deal with the output, and not with the input (schema/operations).Do you have an example of what schema change you need to perform? I guess ideally you should run your script and create a new SDL file with the modified content, and then run codegen on this file?