Prisma1: Better npm package support

Created on 4 Jun 2017  路  12Comments  路  Source: prisma/prisma1

Most helpful comment

@heymartinadams Don't worry, it was directed at Graphcool. It's something they could change on their side to support this, it's not something you can do as a user.

All 12 comments

Is there any workaround if our functions require npm packages currently not available? In my case, I鈥檇 require SendPulse (not to be confused with SendGrid): https://github.com/sendpulse/sendpulse-rest-api-node.js

You can use an external webhook, at webtask.io.

Thanks, @kbrandwijk.

With regards to the inline functions, just expose the meta property of the container. Adding a wt-node-dependencies meta field to the webtask enables support for any package you pass in...

That just totally went over my head, @kbrandwijk 馃ぃ

@heymartinadams Don't worry, it was directed at Graphcool. It's something they could change on their side to support this, it's not something you can do as a user.

you can take inspiration from runkit that is already supporting every existing npm module in their online code editor.

Is this still an issue? Afaik you can already require any package now...

@kbrandwijk i didn't know that, i've been using apollo graphql server so i've still to play with graph.cool service. if it's confirmed we should close this ticket.

Right, by now, all packages are supposed to be supported.

There are two known bugs where this is not the case: https://github.com/graphcool/api-bugs/issues/170 and https://github.com/graphcool/api-bugs/issues/225.

Is it possible to require private packages?

What's the recommended approach for functions that have a more complex spec than can easily fit into a single file? Webhooks?

Neither private packages nor multiple files are supported. Feel free to open a new feature request 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schickling picture schickling  路  3Comments

tbrannam picture tbrannam  路  3Comments

marktani picture marktani  路  3Comments

notrab picture notrab  路  3Comments

sorenbs picture sorenbs  路  3Comments