Development Environment
- Framework: Remix + TypeScript + Shopify CLI
- Execution Method:
shopify app dev
(local development) - App Type: Public App (development)
- Shopify CLI Version: [Check version:
shopify version
]
Problem Description
Getting the following error when querying order data via GraphQL Admin API:
Access denied for orders field.
Attempted Solutions
Completed Tasks:
- Scope Configuration Verified
toml
# shopify.app.toml
[access_scopes]
scopes = "read_orders,write_orders,read_products"
- Environment Variables Set
env
SCOPES=read_orders,write_orders,read_products
- App Reinstallation Completed
- Restarted
shopify app dev
- Reinstalled app using new installation URL
- Confirmed order access permissions in authorization screen
- GraphQL Query Verified
graphql
query getOrders($first: Int!) {
orders(first: $first) {
edges {
node {
id
name
displayFinancialStatus
displayFulfillmentStatus
}
}
}
}
Current Code
typescript
export const loader = async ({ request }: LoaderFunctionArgs) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(`
#graphql
query getOrders($first: Int!) {
orders(first: $first) {
edges {
node {
id
name
displayFinancialStatus
}
}
}
}
`, { variables: { first: 10 } });
// "Access denied for orders field" error occurs here
};
Error Log Details
javascript
errors: {
networkStatusCode: 200,
message: "GraphQL Client: An error occurred while fetching from the API. Review 'graphQLErrors' for details.",
graphQLErrors: [Array],
response: Response {
status: 200,
statusText: 'OK',
headers: Headers {
'x-shopify-api-version': '2025-01',
// ... other headers
}
}
}
Questions
- Local Development Environment: Why is orders data access denied even when running with
shopify app dev
? - Development Store Settings: Are there additional permissions or configurations required for development stores?
- Shopify CLI 3.x: Are there any special considerations for Shopify CLI 3.x versions?
- Partners Dashboard: Are there any additional settings required in the Partners Dashboard?
Additional Information
products
query works fine in the same environment- Confirmed test orders exist in the development store
- Browser network tab shows only permission errors in GraphQL responses
- HTTP request returns 200 OK but contains GraphQL errors in response body
Looking for quick resolution from anyone who has experienced this issue!
Specific Help Needed
- Understanding why local development apps can’t access orders despite proper scopes
- Identifying missing configuration steps for Shopify CLI apps
- Best practices for debugging GraphQL permission issues in development environment