--- title: catalogs - GraphQL Admin description: The catalogs belonging to the shop. api_version: unstable api_name: admin source_url: html: 'https://shopify.dev/docs/api/admin-graphql/unstable/queries/catalogs' md: 'https://shopify.dev/docs/api/admin-graphql/unstable/queries/catalogs.md' --- # catalogs query The catalogs belonging to the shop. ## CatalogConnection arguments [CatalogConnection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/CatalogConnection) * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * app\_id id - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * company\_id id * company\_location\_id id * * id id * managed\_country\_id id - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * market\_id id * status string * title string * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Catalog​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CatalogSortKeys) Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). * type [Catalog​Type](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CatalogType) Default:null The type of the catalogs to be returned. *** ## Possible returns * edges [\[Catalog​Edge!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CatalogEdge) non-null The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. * nodes [\[Catalog!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Catalog) non-null A list of nodes that are contained in CatalogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. * page​Info [Page​Info!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/PageInfo) non-null An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. *** ## Examples * ### Filter catalogs by type #### Query ```graphql query { catalogs(first: 3, type: MARKET) { nodes { id title status } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { catalogs(first: 3, type: MARKET) { nodes { id title status } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }`, }); ``` #### Response ```json { "catalogs": { "nodes": [ { "id": "gid://shopify/MarketCatalog/1068177673", "title": "NA Market", "status": "ACTIVE" }, { "id": "gid://shopify/MarketCatalog/1068177676", "title": "Asia Market", "status": "DRAFT" }, { "id": "gid://shopify/MarketCatalog/1068177677", "title": "Scandinavia Market", "status": "ARCHIVED" } ] } } ``` * ### List the first three catalogs in the shop #### Query ```graphql query { catalogs(first: 3) { nodes { id title status } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { catalogs(first: 3) { nodes { id title status } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { catalogs(first: 3) { nodes { id title status } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { catalogs(first: 3) { nodes { id title status } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { catalogs(first: 3) { nodes { id title status } } }`, }); ``` #### Response ```json { "catalogs": { "nodes": [ { "id": "gid://shopify/MarketCatalog/1068177679", "title": "NA Market", "status": "ACTIVE" }, { "id": "gid://shopify/CompanyLocationCatalog/1068177680", "title": "B2B Example 1", "status": "DRAFT" }, { "id": "gid://shopify/AppCatalog/1068177681", "title": "App Catalog Example", "status": "ARCHIVED" } ] } } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20%7B%0A%20%20catalogs\(first%3A%203%2C%20type%3A%20MARKET\)%20%7B%0A%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20title%0A%20%20%20%20%20%20status%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }`, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` query { catalogs(first: 3, type: MARKET) { nodes { id title status } } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }" }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }`, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { catalogs(first: 3, type: MARKET) { nodes { id title status } } }`, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { catalogs(first: 3, type: MARKET) { nodes { id title status } } } QUERY response = client.query(query: query) ``` ## Response JSON ```json { "catalogs": { "nodes": [ { "id": "gid://shopify/MarketCatalog/1068177673", "title": "NA Market", "status": "ACTIVE" }, { "id": "gid://shopify/MarketCatalog/1068177676", "title": "Asia Market", "status": "DRAFT" }, { "id": "gid://shopify/MarketCatalog/1068177677", "title": "Scandinavia Market", "status": "ARCHIVED" } ] } } ```