How to use Shopify rest api query parameters for search for script tag?

Icarus_
Tourist
7 0 2
Hello everyone,
 
I'm trying to use the rest-client on the Shopify API but I'm having a problem trying to set the query parameter to the src with the error below:
 

 

const result = await client.get({
  path: "script_tags",
  query: { src: "mysite.com" }
});

 

 
 

 

TypeError: Cannot read property 'toString' of undefined
at RestClient.<anonymous> (/Users/icaro/Documents/Udemy/Shopify/banner/node_modules/@shopify/shopify-api/dist/clients/rest/rest_client.js:37:59);​

 

 

The docs state this:

queryRecord<string, string | number>FalsenoneAn optional query object to be appended to the request
And according to the tests on the GitHub repo, this should pass:
 

 

client.get({path: 'products', query: {limit: 10}})

 

 

Would that be a specific problem with the script tag? 

0 Likes