---
title: "How to Get Shopify Orders with Remix and GraphQL?"
url: "https://magecomp.com/blog/get-shopify-orders-with-remix-graphql/"
date: "2025-03-26T12:25:16+00:00"
modified: "2025-06-03T06:39:01+00:00"
author:
  name: "Bharat Desai"
  url: "https://magecomp.com"
categories:
  - "Remix"
  - "Shopify"
word_count: 430
reading_time: "3 min read"
summary: "Shopify provides powerful APIs to interact with store data, and GraphQL is the preferred way to fetch data efficiently. When building a Shopify app with Remix, using GraphQL queries to fetch orders..."
description: "Learn how to fetch Shopify orders using Remix and GraphQL."
keywords: "Remix, Shopify"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Customize Shopify Thank You Page for Increased Sales?"
    url: "https://magecomp.com/blog/customize-shopify-thank-you-page/"
  - title: "Mastering Shopify App Proxy Components in Remix: A Beginner-Friendly Guide"
    url: "https://magecomp.com/blog/shopify-app-proxy-components-in-remix/"
  - title: "What is Product Bundles in Shopify?"
    url: "https://magecomp.com/blog/product-bundles-shopify/"
---

# How to Get Shopify Orders with Remix and GraphQL?

_Published: March 26, 2025_  
_Author: Bharat Desai_  

![How to Get Shopify Orders with Remix and GraphQL](https://magecomp.com/blog/wp-content/uploads/2025/03/How-to-Get-Shopify-Orders-with-Remix-and-GraphQL-1024x512.webp)

Shopify provides powerful APIs to interact with store data, and GraphQL is the preferred way to fetch data efficiently. When building a Shopify app with Remix, using GraphQL queries to fetch orders is an optimal approach for performance and flexibility.

Learn – **[How to Check Orders in Shopify?](https://magecomp.com/blog/how-to-check-orders-in-shopify/)**

[![Shopify Development Services](https://magecomp.com/blog/wp-content/uploads/2025/01/Shopify-Development-Services.webp)](https://magecomp.com/services/shopify-development-service/)In this blog post, we’ll show you how to get Shopify order details with Remix and GraphQL.

## Steps to Get Shopify Orders with Remix and GraphQL:
**Step 1:** Firstly, you need to have read_orders and write_orders access scopes.

To get Shopify orders with Remix and GraphQL, you need to add read_orders and wrire_orders access scopes to your app.toml file.

Make sure to add other required access scopes if you are getting additional details with orders. For example, if you are getting customer details, then you need to add the read_customer and write_customers access scopes.

**Step 2:** Create a code file for it.

After checking the access scopes, you need to generate a code file that will be executed in the app.

Here is a code example :

```
import { json } from "@remix-run/node";
import { authenticate } from "../shopify.server";
import { useLoaderData } from "@remix-run/react";
import { Page, Card, Box } from "@shopify/polaris";

export async function loader({ request }) {
    const { admin } = await authenticate.admin(request);
    const orderData = await admin.graphql(`
        {
            orders(first: 10) {
                edges {
                    node {
                        id
                        confirmed
                        createdAt
                        fullyPaid
                    }
                }
            }
        }
    `);
    const data = await orderData.json();
    console.log("data:", data);

    return json({ orders: data.data.orders.edges });
}

export default function Index() {
    const loaderData = useLoaderData();
    const orders = loaderData.orders || [];

    console.log("Orders:", orders);

    return (
        <Page title="Orders">
            {orders.length === 0 ? (
                <p>No orders found.</p>
            ) : (
                orders.map((item) => {
                    const { id, confirmed, createdAt, fullyPaid } = item.node;
                    return (
                        <Box paddingBlockStart={100}>
                            <Card key={id} title={`Order ID: ${id}`} sectioned>
                                <p><strong>Order ID: </strong> {id}</p>
                                <p><strong>Confirmed:</strong> {confirmed ? "Yes" : "No"}</p>
                                <p><strong>Created At:</strong> {new Date(createdAt).toLocaleString()}</p>
                                <p><strong>Fully Paid:</strong> {fullyPaid ? "Yes" : "No"}</p>
                            </Card>
                        </Box>
                    );
                })
            )}
        </Page>
    );
}
```

**Output:**

You will get details of the first 10 orders, which include the order ID, order is confirmed or not, the order creation date, and order is fully paid or not.

Here is the screenshot of the output:

![shopify orders using remix and graphql](https://magecomp.com/blog/wp-content/uploads/2025/03/shopify-orders-using-remix-and-graphql-1024x517.webp)

## Conclusion:
In this blog, we learnt how to get Shopify order data in your Shopify Remix app. Using this, you can manage orders from your Shopify app, and you can also make it dynamic code from this code example provided in the blog.

[![Shopify Mobile App Builder](https://magecomp.com/blog/wp-content/uploads/2024/12/Shopify-Mobile-App-Builder-3-1024x284.webp)](https://apps.shopify.com/mobile-app-builder-by-magecomp)


---

_View the original post at: [https://magecomp.com/blog/get-shopify-orders-with-remix-graphql/](https://magecomp.com/blog/get-shopify-orders-with-remix-graphql/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-20 21:33:30 UTC_  
