You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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 orpackage.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:Then install the dependencies, that you already use:
With an existing package.json
Just run
Now you can run
graphcool deploy
as usual.Notes
The text was updated successfully, but these errors were encountered: