# Shopify GraphQL

**URL:** https://connective.celigo.com/t/shopify-graphql/764
**Category:** Integrator.io
**Tags:** graphql, json, shopify
**Created:** [May 19, 2022, 3:57pm UTC](https://connective.celigo.com/t/shopify-graphql/764 "2022-05-19T15:57:46Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pangaiaadmin](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pangaiaadmin](https://connective.celigo.com/u/pangaiaadmin)
#### Post date: [May 19, 2022, 3:57pm UTC](https://connective.celigo.com/t/shopify-graphql/764/1 "2022-05-19T15:57:46Z")

</div>

Hi,  
  
Has anyone successfully connected to Shopify via GraphQL? We're trying to use the PriceLists query  
  
[https://shopify.dev/api/admin-graphql/2022-04/queries/priceLists](https://shopify.dev/api/admin-graphql/2022-04/queries/priceLists)   
  
to query and update International Prices (which are only accessible in Shopify via GraphQL and not the REST API).  
  
If so, would you be happy to share the json and how you entered it?  
  
Many Thanks,

Stew

---

<div class="post-metadata">

### Author: ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)
#### Post date: [May 19, 2022, 4:17pm UTC](https://connective.celigo.com/t/shopify-graphql/764/2 "2022-05-19T16:17:06Z")

</div>

Hi @pangaiaadmin

We have GraphQL connector that you can use to set up integration with a Shopify GraphQL endpoint. Here is the kb for setting up a connection: [https://docs.celigo.com/hc/en-us/articles/4843857027227](https://docs.celigo.com/hc/en-us/articles/4843857027227)

Here is an example of value for the base URI in the connection:

 ![5301043caa20740200000001-c6c026e687c149469dc2eafff1e7e3b9.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/273ad5e4a385bca05cc09b3044800ed383728f57.png)

And to test the connection, here is an example of the query:

 ![5301043caa20740200000001-88256b34974547268e8c215cc73a8cd2.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/4fdfaaf48f37bbd1aa161b5775d061d35d2ccd87.png)

In the export step, you can then build the GraphQL queries - see below for example:

 ![5301043caa20740200000001-5218f09cb975437894aa87419a50dab0.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/2e64c90374d158166fbc06b070c6a6d7e297f0fc.png)

```
query ($var: Int!) { customers(first: $var, query:"accepts_marketing:true" {{#if export.http.paging.token}}, after: "{{export.http.paging.token}}" {{/if}}) { pageInfo {hasNextPage endCursor} edges { node {id,firstName,lastName} } }}
```

The above example uses the following pagination set up

 ![5301043caa20740200000001-e99e2f900dc041e48fd4d740fdd63c0e.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/df94e53fc5ab350faa7572fbef628d8f7eb6bf4c.png)

Thanks

---

<div class="post-metadata">

### Author: ![pangaiaadmin](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pangaiaadmin](https://connective.celigo.com/u/pangaiaadmin)
#### Post date: [May 20, 2022, 12:01pm UTC](https://connective.celigo.com/t/shopify-graphql/764/3 "2022-05-20T12:01:54Z")

</div>

Hi,  
  
Thanks for the quick response. I can connect OK to the GraphQL but when we try to preview the export we still get a syntax error even though I have copied and pasted the code above in (I think).  
  
Here's the syntax error:  
  
{  
 "errors": [  
 {  
 "message": "Parse error on \"query\" (STRING) at [1, 2]",  
 "locations": [  
 {  
 "line": 1,  
 "column": 2  
 }  
 ]  
 }  
 ]  
}  
  
and here's the config:

 ![5301043caa20740200000001-60b6c3d5899e4e2e9bc2e5ba31d22c6b.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/5/58a5d953cfd549d5c57f36cda998043d8745857a.png)

I have noticed a ‘/’ at the end of the request URL - might that be causing issues? How would I remove that?  
  
Thanks,  
Stewart

---

<div class="post-metadata">

### Author: ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)
#### Post date: [May 20, 2022, 5:10pm UTC](https://connective.celigo.com/t/shopify-graphql/764/4 "2022-05-20T17:10:25Z")

</div>

@pangaiaadmin

Your screenshot shows the preview is successful, though it returns 0 record. If you click on the parsed output tab, you'll see the records.

Where do you see the syntax error message?

 ![5301043caa20740200000001-cca81e12c3b943f5a73d91996a857b22.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/40c556db409512fa0a3e3de9cc076efd92beaddd.png)

Thanks

---

<div class="post-metadata">

### Author: ![pangaiaadmin](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pangaiaadmin](https://connective.celigo.com/u/pangaiaadmin)
#### Post date: [May 20, 2022, 6:44pm UTC](https://connective.celigo.com/t/shopify-graphql/764/5 "2022-05-20T18:44:56Z")

</div>

Hi Viliandy, we see the syntax error here:

 ![5301043caa20740200000001-17fd0eb0339840f695932ce4a33604ba.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/27c86b7d57eb5d612fcf848f4cff4401a7efee4b.png)

There doesn't seem to be anything in the parsed output (I tried it with accepts marketing true and false in case that was the issue).

 ![5301043caa20740200000001-03cdf3dd96574d5eb89cd5415cbb7df6.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/5/56f11737ffa37ebeff2f0ed32438e47371ef85ee.png)

Thanks,

Stewart

---

<div class="post-metadata">

### Author: ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)
#### Post date: [May 20, 2022, 9:09pm UTC](https://connective.celigo.com/t/shopify-graphql/764/6 "2022-05-20T21:09:13Z")

</div>

@pangaiaadmin

I cannot tell where the syntax issue is at. I suggest you start with a simple query then build up to a more complex query that uses variables etc, then include pagination. Here is 1 example of a simple query asking for first 10 customer records. If you can't get the simple example below to return records (assuming you have customer records), then please log a support ticket so we can help you further. Thanks

> { customers(first: 10) { edges { node { id } } }}

 ![5301043caa20740200000001-dcfc0d7a2e3d401c9890940ad2097765.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/496d202a65926c175ed0e1c5c862b4599c899659.png)

---

<div class="post-metadata">

### Author: ![pangaiaadmin](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pangaiaadmin](https://connective.celigo.com/u/pangaiaadmin)
#### Post date: [May 22, 2022, 9:27pm UTC](https://connective.celigo.com/t/shopify-graphql/764/7 "2022-05-22T21:27:38Z")

</div>

Hi,  
  
I tried this using the integrator.io instance and it worked fine.   
However, it doesn't seem to work on the eu.integrator.io instance - so maybe the issue is to do with that? I noticed that the UI looks different as well - the eu.integrator.io instance has a section for Request URL which integrator.io didn't seem to. Would you be able to get someone to look into that please?  
  
Thanks,  
Stewart

---

<div class="post-metadata">

### Author: ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)
#### Post date: [May 23, 2022, 3:21pm UTC](https://connective.celigo.com/t/shopify-graphql/764/8 "2022-05-23T15:21:54Z")

</div>

@pangaiaadmin

Hi Stewart, I noted that you logged a support ticket for eu.integrator.io instance question and a support has accepted your ticket. Support team will follow up with your question via the support ticket.

Thank you

---

<div class="post-metadata">

### Author: ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)
#### Post date: [May 25, 2022, 7:44pm UTC](https://connective.celigo.com/t/shopify-graphql/764/9 "2022-05-25T19:44:09Z")

</div>

@pangaiaadmin

Hi Steve, fyi, we just published this guide to help with building the GraphQL request on our connector. [https://docs.celigo.com/hc/en-us/articles/6177684981787-Build-GraphQL-queries](https://docs.celigo.com/hc/en-us/articles/6177684981787-Build-GraphQL-queries)

Thanks
