Last active
September 2, 2022 13:44
-
-
Save Sky-bits/52322a0d12577e3949daf9243b8ea93c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const response = await client.query({ | |
data: `mutation { | |
productCreate(input : { title: "gql product from app meta 33 "} ) | |
{ | |
product{id, description, mediaCount} | |
userErrors { | |
field | |
message | |
} | |
} | |
} | |
`, | |
}); | |
# get the app data | |
query gettheappdata { | |
app{ | |
id | |
appStoreAppUrl | |
} | |
} | |
# output shopify admin graphql | |
{ | |
"data": { | |
"app": { | |
"id": "gid://shopify/App/2315872", | |
"appStoreAppUrl": null | |
} | |
}, | |
"extensions": { | |
"cost": { | |
"requestedQueryCost": 1, | |
"actualQueryCost": 1, | |
"throttleStatus": { | |
"maximumAvailable": 1000, | |
"currentlyAvailable": 999, | |
"restoreRate": 50 | |
} | |
} | |
} | |
} | |
# create app scropt tag | |
mutation { scriptTagCreate(input : {src:"https://gist.githubusercontent.com/sanjay-ios-io/5919a6de463cfd27f51b60d8401fadb9/raw/d364a4b9d0158e9d0dee7145e48f668126ffd60b/testjs.js" }) { | |
scriptTag { | |
#ScriptTag fields | |
id | |
src | |
displayScope | |
} | |
userErrors { | |
field | |
message | |
} | |
} | |
} | |
# get the app id | |
{ | |
appInstallation { | |
id | |
} | |
} | |
# create the app meta filed | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment