Anyone have info on requiring arbitrary JavaScript...
# prisma-whats-new
m
Anyone have info on requiring arbitrary JavaScript modules described here https://graphcool.slack.com/archives/C0MQJ62NL/p1516393171000075
m
@magus you need to create another resolver function and call it from your first function. see this forum post https://www.graph.cool/forum/t/does-anyone-know-if-you-can-call-a-serverless-function-from-inside-another-serverless-function/1929
m
What if I don’t want to make another resolver. The functions I’m trying to use are utility functions they do not require database queries, for example calculating derived data from a given model or returning a static object or value in multiple files.
m
@magus no dice I think. I think it's the way the system is setup up right now
you might be able to create your own server using graphql-yoga + prisma. Then you could import your own modules
m
Thanks ya that’s what it seemed like to me as well. Oh well...could be an opportunity for some bundler framework to improve the experience.