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

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({...

Is there anyway to see previous / new values in an update action?

I am updating a value from a UI but would like to check the old value vs new value in the update.js action, is this possible please? I can do this in a global action before firing the update but would be cool if there was some native functionality. Thanks...

Using live: true ,but cant Realtime queries

use this code , when a new record in database, it cant realtime queries the new record ``` const [{ data: taskRecord, fetching, error: fetchError }, reexecuteQuery] = useFindFirst(api.workTask, { live: true, filter: {...

Would using the realtime live feature work for human handoff for chatbot?

I am creating a chatbot using vercel AI SDK. I store the conversation inside of a data model. When the user wants to talk to a human the ai agent triggers a tool. This will set the conversation status to pending. On our Shopify app we will display these conversations so the client can answer them. I am wondering if we could use the live feature for both the frontend and backend? (shopify theme extension). So when the client sends a message in the shopify app, it will add to the message field in the conversation field. Then because of the live feature, that would show up for the user in frontend. Because the live feature is using websockets right? Again not an expert here! Appreciate any advice 🙏...

Error notifications

Is it possible to setup email notifications for errors? Ideally with some batching logic.

bulk cancel background action

If I enter a search term in the background action list, and click cancel all, will it cancel the search results, or all (even the ones not returned in the search results)?

How to Trigger Shopify Web Pixel for Custom Add to Cart Button in JavaScript?

I’ve added a custom "Add to Cart" button using JavaScript instead of Liquid, but I noticed that Shopify's Web Pixel tracking is not capturing the event when this button is clicked. However, the default Shopify "Add to Cart" button is working fine and triggers the Web Pixel event properly. I’ve identified two possible approaches to solve this issue: 1️⃣ Manually trigger the event so that the Web Pixel function can track my custom button click just like Shopify’s default button....

Aggregate reports

I want to run aggregate reports based on custom fields that I added on the Shopify order made a model. Examples are like sum of orders based on a custom field, sum of returns. What’s the best way to do that while still giving the merchant the ability to control to adjust different filters?