Gadget Developers

GD

Gadget Developers

Build SAAS apps alongside thousands of other Gadget developers. Get help, and offer help to others in the community.

Join

How to use SaveBar component from @shopify/app-bridge-react

I am trying to use the SaveBar component and imported it as follows:
import { useAppBridge, SaveBar } from '@shopify/app-bridge-react';
import { useAppBridge, SaveBar } from '@shopify/app-bridge-react';
However I get the following error:
SyntaxError: The requested module '/node_modules/.vite/deps/@shopify_app-bridge-react.js?v=855aef6d' does not provide an export named 'SaveBar'
SyntaxError: The requested module '/node_modules/.vite/deps/@shopify_app-bridge-react.js?v=855aef6d' does not provide an export named 'SaveBar'
...

Can you inspect a queue size from within code?

I'd like to be able to show a progress bar for how many products have been processed after kicking off a batch job to process all the products.

Calling a Background action from a global action

I am calling a background action from a global action and it is not returning an authenticated shopify api client. This is the object it is returningg with no current object to use graphql:
No description

AutoForm AutoInput Units

I want to add units to autoform fields. How can i do so?

Block webhook from non subscribers

My request time has surged a lot lately and it is mostly triggered by webhooks being processed. However, more than half of my app users aren't subscribed to a plan and their webhooks are being processed for no use basically, as the app is not functional for them. Currently I have a simple conditional block that calls the mantle api to check if a store is subscribed and return if they aren't but is there a way like shopify webhook filtering to entirely eliminate them?

session?.set("user", { _link: record.id }); but const userId = session.get("user"); is null

this is sign-up.ts ``` import { save, ActionOptions, applyParams } from "gadget-server"; export const run: ActionRun = async ({...

Have sentry skip GGT_RECORD_NOT_FOUND

I am seeing a lot of record not found (particularly record not found for delete actions) and I want sentry to ignore those

Computed field help

Hi guys! I'm trying to write a computed field on shopifyShop to check the amount of missing product alt texts in the store. I had this in the past but now that it changed to product media I'm not being able to write it. Can you help?...

Non-action files in actions folder

I have a number of global / scheduled actions, and I've separated out the logic within these actions into discreet classes that are imported and run in sequence or concurrently depending on what's required. I'd like to keep these classes close to the action they're being used in, but doing that means Gadget thinks these classes are actions when they're not. Is there a way to get Gadget to ignore these files (I've got them in a subfolder called tasks)?...

It's saying there was a timeout of the global scheduled action but it seems to be running fine

It also keeps retrying it Trace ID: dd18f7a18cafaee46ac71c76db4cd67a Example trace ID of the thing that the scheduled action causes to run: a9cb0b34ba06e565f2b729c252a60e34...
No description

Return integration

I'm trying to integrate an external system to handle returns/restocking/refunds. Any suggestions for which data models/webhooks to listen and utilize?

Listening to Supabase real-time from Gadget

Hi guys, I have a project coming in from a customer who is connecting his Supabase DB to Shopify. My initial idea was to use Gadget to listen to these changes and handle the business logic before pushing the data to Shopify. My question is: Is it possible to keep the websocket connection with Supabase up in Gadget, or will the app turn off due to inactivity?...

Missing Scopes Error

I'm getting this error when trying to reinstall the app to update scopes I've just added. I'm trying to follow this tutorial but getting this error instead. https://www.youtube.com/watch?v=vo1ihbiJtRk&ab_channel=Gadget (minute 1:09)...
No description

GGT_BACKEND_PROCESS_CRASH: Cannot find module '/gadget/app/.gadget/server/dist/index.js'

This started happening a few minutes ago in one of my development environments (staging). I've tried restarting the app and yarn installing fresh. Not sur what's going on. It happened as I was deploying to prod so I was very concerned that prod would be broken too but prod seems to be working. GGT_BACKEND_PROCESS_CRASH: Cannot find module '/gadget/app/.gadget/server/dist/index.js' Require stack: - /app/packages/app-sandbox/src/services/AppBridge.js - /app/packages/app-sandbox/src/boot/gadget-app-config.js - /app/packages/@starscream/core/plugins/app-boot.js - /app/packages/@starscream/core/boot.js - /app/packages/@starscream/core/server.js - /app/packages/app-sandbox-versions/app-sandbox-fv-4/src/server.js Trace ID: 43acd9f252f1d269359860498c9c36fb...
No description

Visualizing error rate in production

What is the recommended tool to use to visualize error rates in production? I'd like to get a chart of timeseries with count all errors thrown by gadget production. Any recommendations? What are you using?...

computed fields trigger refresh

When using the Gadget React client to perform a findMany query with the live flag enabled, I’ve noticed that computed fields based on related data are not updating in real-time. Only hardcoded fields seem to refresh as expected. Is this the intended behavior, or is there a way to ensure computed fields update live as well?

Converting currency in app extension

Hi everyone, Apologies if this is not Gadget specific. I'm looking for a way to convert an amount to a different currency in a Shopify post-purchase extension. I found Shopify’s currency converter CDN, but since you can’t include scripts in the extension, I’m not sure it will work. Has anyone found a workaround or method to convert currency within a post-purchase extension?...

Error setting up vitest

Getting this error - I've gone through steps 1 through 4 in the docs - https://docs.gadget.dev/guides/development-tools/unit-testing#unit-test-runner-setup ```➜ clhom git:(netsuiteCustomer) ✗ yarn test yarn run v1.22.22 warning ../../package.json: No license field...
No description

Auto expand output object in playground

When I run a new query in playground I see that the output is collapsed. For example if I run ``` await api.shopifyShop.findMany({...