feat: use filtered geo queries for catalog pages
All checks were successful
Build Docker Image / build (push) Successful in 4m57s
All checks were successful
Build Docker Image / build (push) Successful in 4m57s
- /hubs/[id]: use findProductsForHub to show only deliverable products - /offers/[productId]: use findHubsForProduct to show only reachable hubs - /suppliers/[id]/[productId]: use findSupplierProductHubs for supplier-specific hubs - Add new GraphQL operations for geo queries
This commit is contained in:
11
graphql/operations/public/geo/FindHubsForProduct.graphql
Normal file
11
graphql/operations/public/geo/FindHubsForProduct.graphql
Normal file
@@ -0,0 +1,11 @@
|
||||
query FindHubsForProduct($productUuid: String!) {
|
||||
findHubsForProduct(productUuid: $productUuid) {
|
||||
uuid
|
||||
name
|
||||
latitude
|
||||
longitude
|
||||
country
|
||||
countryCode
|
||||
transportTypes
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
query FindOffersForHubByProduct($hubUuid: String!, $productUuid: String!, $limitSources: Int) {
|
||||
findOffersForHubByProduct(
|
||||
hubUuid: $hubUuid
|
||||
productUuid: $productUuid
|
||||
limitSources: $limitSources
|
||||
) {
|
||||
sourceUuid
|
||||
sourceName
|
||||
sourceLat
|
||||
sourceLon
|
||||
distanceKm
|
||||
routes {
|
||||
totalDistanceKm
|
||||
totalTimeSeconds
|
||||
stages {
|
||||
fromUuid
|
||||
fromName
|
||||
fromLat
|
||||
fromLon
|
||||
toUuid
|
||||
toName
|
||||
toLat
|
||||
toLon
|
||||
distanceKm
|
||||
travelTimeSeconds
|
||||
transportType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
graphql/operations/public/geo/FindProductsForHub.graphql
Normal file
3
graphql/operations/public/geo/FindProductsForHub.graphql
Normal file
@@ -0,0 +1,3 @@
|
||||
query FindProductsForHub($hubUuid: String!) {
|
||||
findProductsForHub(hubUuid: $hubUuid)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
query FindSupplierProductHubs($supplierUuid: String!, $productUuid: String!) {
|
||||
findSupplierProductHubs(supplierUuid: $supplierUuid, productUuid: $productUuid) {
|
||||
uuid
|
||||
name
|
||||
latitude
|
||||
longitude
|
||||
country
|
||||
countryCode
|
||||
transportTypes
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user