New Shopify Certification now available: Liquid Storefronts for Theme Developers

GraphQL Query Error

Solved
vishnuAcodez
Shopify Partner
2 1 0
const graphqlClient = new shopify.api.clients.Graphql({ session });
try {
const data = await graphqlClient.query({
data: `query {
shopLocales {
locale
primary
published
}
}`,
});
console.log(data?.body?.data);
} catch (error) {
console.log(error);
}
 
I'm getting "GraphqlQueryError: GraphQL query returned errors" while using the above code , Any solution for fix?
Accepted Solution (1)
vishnuAcodez
Shopify Partner
2 1 0

This is an accepted solution.

read_locales scope was not given

View solution in original post

Reply 1 (1)
vishnuAcodez
Shopify Partner
2 1 0

This is an accepted solution.

read_locales scope was not given