Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

New Function Runtime #800

Closed
timsuchanek opened this issue Oct 13, 2017 · 0 comments
Closed

New Function Runtime #800

timsuchanek opened this issue Oct 13, 2017 · 0 comments
Milestone

Comments

@timsuchanek
Copy link
Contributor

timsuchanek commented Oct 13, 2017

ES7 + Typescript support

Since today, Graphcool's Framework Preview has a new function runtime.
It supports ES7 and more complex javascript projects with multiple files.
From now on you can even write your functions in TypeScript and use async/await!

In order to give you full control, Graphcool is no longer automatically injecting npm packages, but bundling and uploading the service folder, including the node_modules.

It is likely that you got redirected to this issue by the CLI, because you are already using functions in an existing service without having a local node_modules folder or package.json file.

How to make your functions ready

Without package.json

If you don't have a package.json yet, a quick way of creating one is running this in your graphcool service folder:

npm init --yes

Then install the dependencies, that you already use:

npm install --save graphcool-lib validator

With an existing package.json

Just run

npm install

Now you can run graphcool deploy as usual.

Notes

  • This only affects upgraded projects that are part of the Framework Preview. Legacy projects still run on the old function runtime.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants