Created
September 23, 2025 11:28
-
-
Save richardsweeney/dc6ae9cd01ef968dc5a824883bdac3f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const accessToken = "ACCESS_TOKEN_HERE"; | |
| const query = ` | |
| query { | |
| collections(first: 50) { | |
| edges { | |
| node { | |
| id | |
| title | |
| handle | |
| description | |
| descriptionHtml | |
| productsCount { | |
| count | |
| } | |
| image { | |
| url(transform: {maxWidth: 400}) | |
| altText | |
| } | |
| seo { | |
| title | |
| description | |
| } | |
| } | |
| } | |
| } | |
| } | |
| `; | |
| fetch( | |
| `https://paper-collective-com.myshopify.com/admin/api/2023-10/graphql.json`, | |
| { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/json", | |
| "X-Shopify-Storefront-Access-Token": accessToken, | |
| }, | |
| body: JSON.stringify({ query }), | |
| }, | |
| ) | |
| .then((response) => response.json()) | |
| .then((data) => console.dir(data, { depth: null })); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment