Inngest is an open source platform that adds superpowers to serverless functions.
You can implement background jobs, delayed jobs, scheduled (aka cron) jobs, step functions and even fan-outs quickly and reliably.
We’ve added super-easy Inngest configuration to Redwood experiments.
rw experimental setup-inngest
Note: your project needs to use at least version 5.0.7 or newer or a recent canary release.
This command uses inngest-setup-redwoodjs to setup Inngest for background, scheduled, delayed, multi-step, and fan-out jobs:
Adding Inngest setup packages for RedwoodJS …
Install inngest packages …
Configure inngest …
Add the Inngest GraphQL plugin …
Add inngest helloWorld example …
Modify the GraphQL handler to the useInngest plugin …
Add inngest dev script to package.json
Adding config to redwood.toml…
Once configured, please see what is added, where and why and your next steps.
The above docs will show how to can run the Inngest Dev Server and start building event-driven workflows.
Creating Functions
Use
yarn inngest-setup-redwoodjs function <name>
to create background, scheduled, delayed and other Inngest function types.
You will be prompted for the function type.
Auto-Instrumented GraphQL API
The philosophy is to:
- “instrument everything” by sending events for each GraphQL execution result to Inngest to effortlessly build event-driven applications.
- provide fine-grained control over what events are sent such as operations (queries, mutations, or subscriptions), introspection events, when GraphQL errors occur, if result data should be included, type and schema coordinate denylists … and more.
- be customized with event prefix, name and user context functions
This experimental plugin feature will instrus=ment your api to send events which you can later use in you workflows and jobs.
The function
command can ge used with:
yarn inngest-setup-redwoodjs function <name> --graphql
And you will be given a list of queries and mutations to use when creating your function. The event name will be based on the GraphQL operation for consistent conventions.
Feedback
Please do provide feedback on this experimental command as well as the plugin and function commands.
- You can find the source code for the plugin and setup commands at GitHub - inngest/envelop-plugin-inngest: An envelop plugin that sends GraphQL response data to Inngest to help build event-driven applications..
- Report any issues here or in Issues · inngest/envelop-plugin-inngest · GitHub
- Known issues with the plugin and command are also Issues · inngest/envelop-plugin-inngest · GitHub
More Info
- Inngest has an excellent Discord channel for help and tips
- Read Inngest’s docs and patterns