
* Use generated hooks in apps * Remove unused files * Use proper types in apps * Use generated hooks in attributes * Use generated hooks in auth module * Use generated hooks in categories * Use generated hooks in channels * Use generated types in collections * Remove legacy types from background tasks * Use generated hooks in customers * Use generated hooks in discounts * Use generated hook in file upload * Use generated types in gift cards * Use generated types in home * Use generated hooks in navigation * Use generated hooks in orders * Use generated hooks in pages * Use generated hooks in page types * Use generated hooks in permission groups * Use generated hooks in plugins * Use generated hooks in products * Use fragment to mark product variants * Improve code a bit * Use generated hooks in page types * Use generated types in searches * Use generated hooks in shipping * Use generated hooks in site settings * Use generated hooks in staff members * Use generated hooks in taxes * Place all gql generated files in one directory * Use generated hooks in translations * Use global types from new generated module * Use generated hooks in warehouses * Use generated hooks in webhooks * Use generated fragment types * Unclutter types * Remove hoc components * Split hooks and types * Fetch introspection file * Delete obsolete schema file * Fix rebase artifacts * Fix autoreplace * Fix auth provider tests * Fix urls * Remove leftover types * Fix rebase artifacts
102 lines
1.7 KiB
TypeScript
102 lines
1.7 KiB
TypeScript
import { gql } from "@apollo/client";
|
|
|
|
export const shippingZoneFragment = gql`
|
|
fragment ShippingZone on ShippingZone {
|
|
...Metadata
|
|
id
|
|
countries {
|
|
code
|
|
country
|
|
}
|
|
name
|
|
description
|
|
}
|
|
`;
|
|
|
|
export const shippingMethodWithPostalCodesFragment = gql`
|
|
fragment ShippingMethodWithPostalCodes on ShippingMethodType {
|
|
id
|
|
postalCodeRules {
|
|
id
|
|
inclusionType
|
|
start
|
|
end
|
|
}
|
|
}
|
|
`;
|
|
export const shippingMethodTypeFragment = gql`
|
|
fragment ShippingMethodType on ShippingMethodType {
|
|
...ShippingMethodWithPostalCodes
|
|
...Metadata
|
|
minimumOrderWeight {
|
|
unit
|
|
value
|
|
}
|
|
maximumOrderWeight {
|
|
unit
|
|
value
|
|
}
|
|
minimumDeliveryDays
|
|
maximumDeliveryDays
|
|
name
|
|
description
|
|
type
|
|
channelListings {
|
|
id
|
|
channel {
|
|
id
|
|
name
|
|
currencyCode
|
|
}
|
|
price {
|
|
...Money
|
|
}
|
|
minimumOrderPrice {
|
|
...Money
|
|
}
|
|
maximumOrderPrice {
|
|
...Money
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
export const shippingMethodWithExcludedProductsFragment = gql`
|
|
fragment ShippingMethodWithExcludedProducts on ShippingMethodType {
|
|
...ShippingMethodType
|
|
excludedProducts(
|
|
before: $before
|
|
after: $after
|
|
first: $first
|
|
last: $last
|
|
) {
|
|
pageInfo {
|
|
hasNextPage
|
|
hasPreviousPage
|
|
endCursor
|
|
startCursor
|
|
}
|
|
edges {
|
|
node {
|
|
id
|
|
name
|
|
thumbnail {
|
|
url
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const shippingZoneDetailsFragment = gql`
|
|
fragment ShippingZoneDetails on ShippingZone {
|
|
...ShippingZone
|
|
shippingMethods {
|
|
...ShippingMethodType
|
|
}
|
|
warehouses {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
`;
|