Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I'm trying to get a test-script to load on my development shopify store using GraphQL (Graphiql test app). The Script Tag is successfully created. However, the `test-script`, which should be injected into the shopify store, does not display. I believe the issue stems from my misunderstanding of the ScriptTagInput.src field from the GraphQL docs.
I'm not sure where to place the test-script.js file in order to access it as a URL in the mutation.
test-script.js
console.log('this is coming from the test script api');
GraphQL Mutation:
mutation scriptTagCreate($input: ScriptTagInput!) { scriptTagCreate(input: $input) { scriptTag { id } userErrors { field message } } } { "input": { "src": "https://d74c-12-216-7-134.ngrok.io/test-script.js", "displayScope": "ALL" } }
Current File Structure:
This is the repo I cloned using the Shopify CLI. It has removed the use of Next.js.
How do I get the test-script.js script URL so that I can have it loaded in my Shopify development store?