Bare-bones example app with webhook on product update.
Useful resources:
This is not official Saleor project. Treat this project more as proof of concept, there are no security checks on webhooks and rest of the app is not tested to be released on production.
-
In App directory create file
.env.local
, use.env.local.sample
as a reference. -
Add Saleor URI to the
.env.local
. If you don't have running instance of Saleor, you create a free dev account or run instance locally -
You'll need yarn to install dependencies.
yarn install
For local development you can use localtunnel or ngrok to expose your app.
- Start App dev server
$ yarn dev
- Run
appInstall
mutation from graphql client (MANAGE_APPS permission required!)
mutation {
appInstall(
input: {
appName: "Best App"
manifestUrl: "https://your.app.url"
permissions: [MANAGE_PRODUCTS]
}
) {
appInstallation {
id
status
appName
manifestUrl
}
appErrors {
field
message
code
permissions
}
}
}
- That's it! 🦄