Development discussions around Shopify APIs
Hi there, I am currently working on a practice app on a test store. I am currently querying a list of customers and displaying them with ResourceList, and my query looks like this:
const GET_CUSTOMERS = gql`
query {
customers(first: 10) {
edges {
node {
id
displayName
email
}
}
}
}
`;
This all works fine, however the issue arises when I try retrieving the customers' orders.
const GET_CUSTOMERS = gql`
query {
customers(first: 10) {
edges {
node {
id
displayName
email
orders(first: 3, reverse: true) {
edges {
node {
id
}
}
}
}
}
}
}
`;
I changed the query to include orders, and even though this works fine on the Shopify GraphiQL App, it always returns Access Denied when I run it on my actual app. I'm pretty sure I've set all the necessary scopes like 'read_orders' and 'write_orders', so what else could I be missing? I'd really appreciate any help.
When did you set the scopes, if you set the scopes after authenticate then remove the app and authenticate the app again. And for getting data of customer you have to add `read_customers` scope. Thanks
User | RANK |
---|---|
8 | |
7 | |
3 | |
3 | |
3 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By