saleor-dashboard/src/fragments/warehouses.ts

38 lines
746 B
TypeScript
Raw Normal View History

import { gql } from "@apollo/client";
import { fragmentAddress } from "./address";
export const warehouseFragment = gql`
fragment WarehouseFragment on Warehouse {
id
name
}
`;
export const warehouseWithShippingFragment = gql`
${warehouseFragment}
fragment WarehouseWithShippingFragment on Warehouse {
...WarehouseFragment
shippingZones(first: 100) {
edges {
node {
id
name
}
}
}
}
`;
export const warehouseDetailsFragment = gql`
${fragmentAddress}
${warehouseWithShippingFragment}
fragment WarehouseDetailsFragment on Warehouse {
isPrivate
clickAndCollectOption
...WarehouseWithShippingFragment
address {
...AddressFragment
}
}
`;