Development discussions around Shopify APIs
Hi,
I have app where we inject script into merchant assets folder. In script file we make ajax call to get some data from our server.
But when merchant uninstalls the app we are not able to delete the script files from the assets folder. So, even after the app is uninstalled script file will make ajax call to our server. So roughly we will be getting more than 50 calls from single merchant who have uninstalled our app, every day. We are able to see the even 1000 calls being made per second. Thsi can badly impact the infrastructure going forward as the customer base increases.
Is there any way to remove script file from the assets folder or stop making ajax call from the script file once the merchant uninstalls our app?
Thanks...
Hey @badgeAppTester_,
When an app is uninstalled, any script tags generated by the app are automatically removed.
I believe this functionality was introduced in 2017, so it's possible that old script tags are still existing if the app was uninstalled before then. Can you confirm when the affected shops originally uninstalled your app?
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
We are not using script tags we inserting our script file into assets folder of the store owner. Is there any way to remove script file from the asset folder
Hi, I'm actually having a similar problem.
I used the GraphiQL App to write a mutation for scriptTagCreate so I can test adding in a custom script tag, and after uninstalling the app the script tags are still in my store.
MUTATION
mutation exampleScriptTagCreate($input: ScriptTagInput!) { scriptTagCreate(input: $input) { userErrors { field message } scriptTag { src displayScope } } }
QUERY VARIABLES
{ "input": {"src": "https://example.com/script.js", "displayScope": "ONLINE_STORE" } }
Now I'm trying to figure out how to remove these Script Tags with another Mutation but I'm having trouble doing so.
Doh!! I solved my problem. I was using the GraphiQL App to insert ScriptTags but I was trying to uninstall MY ACTUAL APP and expecting it to work. Uninstalling the GraphiQL App worked like a charm.
Dumb mistake on my part... (I'm new)
Hello,
Is it possible to remove the Graphql App by API call?
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023