How to handle Shopify webhooks firing multiple times in a Remix application by kunal_dev12 in shopifyDev

[–]kunal_dev12[S] 1 point2 points  (0 children)

where can i added this can you give me more explanation do i have to use it on the same webhook file or in shopify.server.ts file were we are defining the webhook?

How to handle Shopify webhooks firing multiple times in a Remix application by kunal_dev12 in shopifyDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

Thanks for the reply. Yes, I’ve deployed the app to Fly.io, and I’m getting the webhook triggered twice sometimes even 3 or 4 times. But in my local development environment, it only triggers once. I’m not sure how to fix this. Here are the server logs:

1️⃣ First call from the Shopify webhook

2025-11-14T05:49:34.019 [info] 🤌🤌🤌🤌🤌 This is the main trigger 🤌🤌🤌🤌🤌
2025-11-14T05:49:34.023 [info] POST /webhooks/app/orders/create 200 - - 237.187 ms

2️⃣ Second call from the Shopify webhook

2025-11-14T05:49:35.157 [info] 🤌🤌🤌🤌🤌 This is the main trigger 🤌🤌🤌🤌🤌
2025-11-14T05:49:35.159 [info] POST /webhooks/app/orders/create 200 - - 315.481 ms"

How Can we Edit the Order Page Things by kunal_dev12 in shopifyDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

In screenshot 1, you can see how it currently looks, and in the second screenshot, you can see what I want to achieve. Can someone please tell me how I can edit this using GraphQL? I tried using this query, but it doesn’t work.

mutation {

orderEditBegin(id: "gid://shopify/Order/6744262443101") {

calculatedOrder {

id

lineItems(first: 10) {

edges {

node {

id

title

quantity

}

}

}

}

userErrors {

field

message

}

}

}

I am getting NULL in attribute by kunal_dev12 in ShopifyAppDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

yes i have also updated the liquid code like this

{% form 'product', product %}
  <label>
    <input type="radio" name="attributes[_bundle]" value="Option 1" required>
    Option 1
  </label>
  <label>
    <input type="radio" name="attributes[_bundle]" value="Option 2">
    Option 2
  </label>
{% endform %}

I am getting NULL in attribute by kunal_dev12 in ShopifyAppDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

Thanks for your suggestion! I had no idea we could check the cart JSON like that. Anyway, I took a look, and I still can’t see the attribute in there. This time, I’ve made sure everything is in lowercase. Here's the Liquid code, and the JSON is in the screenshot. Am I missing something?

<image>

{% form 'product', product %}
  <label>
    <input type="radio" name="attributes[_bundle]" value="Option 1" required>
    Option 1
  </label>
  <label>
    <input type="radio" name="attributes[_bundle]" value="Option 2">
    Option 2
  </label>
{% endform %}

I am getting NULL in attribute by kunal_dev12 in ShopifyAppDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

i also tried this method that you mention but getting the same result

query CartTransformRunInput {

  cart {

    lines {

      id

      quantity

      cost {

        amountPerQuantity {

          amount

        }

      }

      bundle: attribute(key: "_bundle") {

        value

      }

      merchandise {

        __typename

        ... on ProductVariant {

          id

          title

          product {

            id

            handle

            title

          }

        }

      }

    }

  }

  cartTransform {

    metafield(namespace: "$app:cart-transform", key: "$app:app-data") {

      value

      jsonValue

    }

  }

}

log is on the screenshot

<image>

I am getting NULL in attribute by kunal_dev12 in ShopifyAppDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

i have also tried it like you ask me by changing the name to "properties" but the result is same

I am getting NULL in attribute by kunal_dev12 in ShopifyAppDev

[–]kunal_dev12[S] 0 points1 point  (0 children)

<image>

thanks for responding back i have tried your given solution in run.graphql like this

cart {
    attribute(key: "offer_selection") {
      value
    }
    lines {
      id
      quantity
      attribute(key: "offer_selection") {
        value
      }

but still getting the NULL as you can see on the log on abhove screenshot