Closed joarwilk closed 6 years ago
It's actually really simple, here is a working implementation (taken from webtask-bundle). Does babel + requires, so would fix the ES7 feature demand as well.
This issue has been moved to graphcool/graphcool-framework.
This feature request applies to the CLI workflow mainly
What feature are you missing?
Being able to import another javascript file in my schema extensions / SSRs / pipeline functions.
How could this feature look like in detail? Tradeoffs? Basic use case: I wish to make a certain logic-heavy operation in a schema extension. This logic is shared by other schema extensions. Right now there is no way to share code between extensions, since calling
require
on a local file will fail in validation/deploy.A solution would probably be to make the CLI perform some basic bundling of code in the deploy step.