Gadget Framework
Subscribe to our RSS feed to get Gadget changelog updates as they are published.
What is the Gadget framework?
The Gadget framework is a powerful backend framework that utilizes Fastify to power all Gadget applications. It offers a serverless Node.js environment for running your JavaScript code, accompanied by Actions and HTTP routes that are used to execute and organize your backend code.
How to use the Gadget framework
How to change your application's framework version
Existing applications can upgrade or downgrade their framework version in one click. New apps use the latest framework version by default but can be downgraded.
Follow the steps below to change your Gadget framework version:
Head over to the Settings page within your application.
Click the Upgrade button in the framework version section.
- You can now drop down the menu and select the framework version you prefer to change your application to use.
- Now hit the Upgrade and run yarn button in the bottom right-hand corner (will be Downgrade and run yarn if you are downgrading your framework version).
Framework version changelog
v1.3.0
- Related model filtering now available
Includes breaking changes to existing filters on belongs to relationships and GraphQL queries for namespaced models. See the migration guide for more information.
v1.2.0
- Upgrade to Vite 5.
- New
build
script inpackage.json
.- Deprecate the use of
vite:build
script. - Require the use of
gadget
Vite plugin.
- Deprecate the use of
v1.1.0
- Node.js upgrade: node.js v20.9 => node.js v20.12
- Realtime query support in imperative API clients. Read more.
- Add models, fields, actions, and routes to your app from the command line using
ggt add
. Read more. - Namespace and nested folder support for models and actions. Read more: models, actions.
- The default value for
connections.shopify.maxRetries
changed from 6 to 2. - A smaller API client bundle size.
v1.0.0
- Unlimited development environments per app.
- Git-based source control across your entire Gadget application's code, and configurations.
- The file structure of your app has been updated:
- The backend now uses an
api
folder for models, actions, and routes - Model-related files are reorganized under
api/models
- Global actions are reorganized under
api/actions
- The
frontend
folder is renamed toweb
- Access control is now represented as its own folder (
accessControl
) containing permissions (accessControl/permissions
)
- The backend now uses an
- Your app's settings, permissions, and model schema are now represented in metadata files when you use
GGT
to clone your files. - Support for background action invocation.
Queues
page: allowing users to view the status and progress of their background actions and Shopify webhooks.
v0.3.1
Shopify connection
- The
shopifyShop
model now has a fielddisabledWebhooks
to allow shop-level control over webhook registration. - The
scheduledShopifySync
global action is added to give explicit control over when the Shopify daily sync is run.
For users upgrading older versions of their app to v0.3.1, it's important to note that the previous globalShopifySync
still exists within your global actions, but it is safe to remove that because of its redundancy now that scheduledShopifySync
can give you better control over the daily sync schedule of your app.
v0.3
node.js v18.15 => node.js v20.9
- New WebCrypto APIs added for cryptography matching the browser APIs.
- V8 engine upgraded to version 11.3 for improved performance. Read more.
Fastify v3 => Fastify v4
- Plugins have all been renamed from
fastify-something
to@fastify/something
and versions have changed. Please verify any Fastify plugins are compatible with Fastify 4. - HTTP Route error handlers are now encapsulated. If any of your route plugins set error handlers, they will only apply to errors thrown by routes in that folder or a subfolder. Read more.
- HTTP Route handlers now need to return the
reply
object if they will send a response later. Read more. - HTTP Route handlers for GET routes now expose a HEAD route automatically. Read more.
reply.res
has been moved toreply.raw
. Read more.
v0.2
node.js v16.20 => node.js v18.15