feat(saleor): Phase 1 - GraphQL Client Setup

- Add Apollo Client for Saleor GraphQL API
- Create GraphQL fragments (Product, Variant, Checkout)
- Create GraphQL queries (Products, Checkout)
- Create GraphQL mutations (Checkout operations)
- Add TypeScript types for Saleor entities
- Add product helper functions
- Install @apollo/client and graphql dependencies

Part of WordPress/WooCommerce → Saleor migration
This commit is contained in:
Unchained
2026-03-21 12:36:21 +02:00
parent db1914d69b
commit 7b94537670
27 changed files with 7879 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
import { gql } from "@apollo/client";
import { CHECKOUT_FRAGMENT } from "../fragments/Checkout";
export const GET_CHECKOUT = gql`
query GetCheckout($token: UUID!) {
checkout(token: $token) {
...CheckoutFragment
}
}
${CHECKOUT_FRAGMENT}
`;
export const GET_CHECKOUT_BY_ID = gql`
query GetCheckoutById($id: ID!) {
checkout(id: $id) {
...CheckoutFragment
}
}
${CHECKOUT_FRAGMENT}
`;
`;