Commit Graph
37 Commits
Author SHA1 Message Date
Ruslan Bakiev 31fc8cbc34 Move graph routing into route engine
Build Docker Image / build (push) Successful in 1m56s
2026-02-07 11:41:12 +07:00
Ruslan Bakiev 4ec6506633 Unify graph routing analyzer
Build Docker Image / build (push) Successful in 1m53s
2026-02-07 11:28:16 +07:00
Ruslan Bakiev e99cbf4882 Unify hub offer queries and drop radius filters
Build Docker Image / build (push) Successful in 2m7s
2026-02-07 11:05:52 +07:00
Ruslan Bakiev 3648366ebe feat(geo): graph-based hubs for product
Build Docker Image / build (push) Successful in 1m52s
2026-02-07 10:14:18 +07:00
Ruslan Bakiev eb73c5b1a1 feat(geo): filter clustered nodes by product/hub/supplier
Build Docker Image / build (push) Successful in 2m42s
2026-02-07 08:27:54 +07:00
Ruslan Bakiev f5f261ff89 Add quote calculations query
Build Docker Image / build (push) Successful in 1m53s
2026-02-06 18:57:24 +07:00
Ruslan Bakiev 443dc7fa5d Fix nearest hubs fallback when source missing
Build Docker Image / build (push) Successful in 1m32s
2026-02-05 20:10:11 +07:00
Ruslan Bakiev 09324bb25e Filter hubs to rail/sea and add graph-based nearest
Build Docker Image / build (push) Successful in 3m9s
2026-02-05 18:41:07 +07:00
Ruslan Bakiev 387abf03e4 Remove cluster cache and query by bbox
Build Docker Image / build (push) Successful in 3m0s
2026-02-05 10:26:19 +07:00
Ruslan Bakiev 9db56c5edc feat(schema): add bounds filtering to list endpoints
Build Docker Image / build (push) Successful in 1m16s
Add west, south, east, north params to:
- hubs_list
- suppliers_list
- products_list

This enables filtering by map viewport bounds for the catalog.
2026-01-26 21:35:20 +07:00
Ruslan Bakiev 17081e13e4 Fix: resolve_offer_to_hub call in resolve_route_to_coordinate (same graphene self=None bug)
Build Docker Image / build (push) Successful in 1m27s
2026-01-26 16:28:39 +07:00
Ruslan Bakiev 0c19135c49 Fix: resolve_offer_to_hub call in resolve_nearest_offers (self is None in graphene)
Build Docker Image / build (push) Successful in 1m26s
2026-01-26 16:17:27 +07:00
Ruslan Bakiev 9ff7927463 Add hubsList, suppliersList, productsList resolvers and update nearestOffers
Build Docker Image / build (push) Successful in 1m24s
- Add hubsList resolver for paginated hub list
- Add suppliersList resolver for paginated supplier list
- Add productsList resolver for paginated product list
- Update nearestOffers to support hubUuid parameter with route calculation
- Add OfferWithRouteType for offers with embedded routes
- Add supplier_name to OfferNodeType
2026-01-26 13:55:02 +07:00
Ruslan Bakiev 81f86b6538 Fix nodes_count query bind_vars - only add bounds when present
Build Docker Image / build (push) Successful in 1m16s
2026-01-25 22:01:54 +07:00
Ruslan Bakiev 2e7f5e7863 Fix nodes query bind_vars - only add bounds when all coordinates present
Build Docker Image / build (push) Successful in 1m16s
2026-01-25 21:54:22 +07:00
Ruslan Bakiev 64f7e4bdba Fix GraphQL types - add distance_km field
Build Docker Image / build (push) Successful in 1m17s
- Add distance_km field to NodeType (used by nearestHubs)
- Add distance_km field to OfferNodeType (used by nearestOffers)
- Expand SupplierType with name, latitude, longitude, distance_km
- Fix nearestSuppliers to return full supplier info from nodes collection
- Fix nearestHubs and nearestOffers to pass distance_km to constructors

This fixes 8 failed integration tests for nearest* endpoints.

Resolves: Cannot query field 'distanceKm' on type 'NodeType/OfferNodeType'
2026-01-25 21:33:12 +07:00
Ruslan BakievandClaude Sonnet 4.5 56df2ab37b Fix OfferNodeType initialization error
Build Docker Image / build (push) Successful in 1m19s
Remove supplier_name field from OfferNodeType constructor in resolve_nearest_offers - this field does not exist in the type definition and causes 400 errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 20:49:22 +07:00
Ruslan Bakiev 46c87c7caa Add coordinate-based nearest endpoints to geo API
- Add nearestHubs(lat, lon, radius, productUuid?) - hubs near coordinates
- Add nearestOffers(lat, lon, radius, productUuid?) - offers near coordinates
- Add nearestSuppliers(lat, lon, radius, productUuid?) - suppliers near coordinates
- Add routeToCoordinate(offerUuid, lat, lon) - route from offer to coordinates

These unified endpoints work with coordinates instead of UUIDs, simplifying
the frontend logic by removing the need for entity-specific queries like
GetProductsNearHub, GetHubsNearOffer, etc.
2026-01-25 17:10:32 +07:00
Ruslan Bakiev 27b05cf362 Add bounds filtering to nodes query for map-based selection
Build Docker Image / build (push) Successful in 1m10s
2026-01-24 12:13:29 +07:00
Ruslan Bakiev e342d68197 Add suppliersForProduct and hubsForProduct queries for cascading filters
Build Docker Image / build (push) Successful in 1m14s
2026-01-24 11:54:24 +07:00
Ruslan Bakiev 3a24f4a9cd Fix supplier query - aggregate through offers
Build Docker Image / build (push) Successful in 1m21s
Only show suppliers that have active offers.
2026-01-23 11:23:54 +07:00
Ruslan Bakiev 0106c84daf Add offers_count field to ProductType
Build Docker Image / build (push) Successful in 1m16s
2026-01-22 17:22:05 +07:00
Ruslan Bakiev 596bdbf1c5 Add node_type parameter to clusteredNodes for unified server-side clustering
Build Docker Image / build (push) Successful in 1m31s
2026-01-16 17:29:42 +07:00
Ruslan Bakiev 07f89ba5fb refactor(geo): Clean up queries - rename offers_to_hub to offers_by_hub, add offer_to_hub
Build Docker Image / build (push) Successful in 1m24s
- Remove find_routes, find_product_routes, delivery_to_hub queries
- Rename offers_to_hub → offers_by_hub with proper phase-based routing (auto → rail* → auto)
- Add offer_to_hub query for single offer to hub connection
- Both new queries use Dijkstra-like search with transport phases
2026-01-16 16:54:00 +07:00
Ruslan Bakiev 5112f52722 Fix _build_routes call in deliveryToHub
Build Docker Image / build (push) Successful in 1m18s
2026-01-16 16:03:26 +07:00
Ruslan Bakiev 339db65514 Fix resolve_offers_to_hub to use DISTANCE() instead of graph traversal
Build Docker Image / build (push) Successful in 1m23s
2026-01-16 15:56:25 +07:00
Ruslan Bakiev b6f9b2d70b Replace graph traversal queries with DISTANCE() queries
Build Docker Image / build (push) Successful in 1m53s
- Add new resolvers: products, offersByProduct, hubsNearOffer, suppliers,
  productsBySupplier, offersBySupplierProduct, productsNearHub, offersToHub, deliveryToHub
- Remove broken queries that caused OOM on 234k edges
- Use DISTANCE() for geographic proximity instead of graph traversal
2026-01-16 15:39:55 +07:00
Ruslan Bakiev a3b0b5ff79 Use supplier_uuid instead of team_uuid in findSupplierProductHubs
Build Docker Image / build (push) Successful in 1m27s
2026-01-16 10:50:16 +07:00
Ruslan Bakiev 6084333704 Fix findSupplierProductHubs: use team_uuid instead of supplier_uuid
Build Docker Image / build (push) Successful in 1m39s
2026-01-16 10:35:17 +07:00
Ruslan Bakiev b510dd54d6 feat: add catalog navigation queries
Build Docker Image / build (push) Successful in 1m34s
- findProductsForHub: find products deliverable to a hub
- findHubsForProduct: find hubs where product can be delivered
- findSupplierProductHubs: find hubs for supplier's product
- findOffersForHubByProduct: find offers with routes (wrapper for findProductRoutes)
2026-01-16 01:32:55 +07:00
Ruslan Bakiev fd7e10c193 Filter offer edges from route stages
Build Docker Image / build (push) Successful in 1m42s
Offer edges connect offer nodes to locations and are not
transport stages. Filter them out in _build_route_from_edges()
to avoid showing 0km "offer" steps in the route stepper.
2026-01-15 00:32:57 +07:00
Ruslan Bakiev 0330203a58 Replace pysupercluster with h3 for clustering
Build Docker Image / build (push) Successful in 1m38s
2026-01-14 10:24:40 +07:00
Ruslan Bakiev 7efa753092 Add server-side clustering with pysupercluster
Build Docker Image / build (push) Failing after 2m14s
2026-01-14 10:12:39 +07:00
Ruslan Bakiev e15976382e Add hubCountries query and country filter for nodes
Build Docker Image / build (push) Successful in 1m45s
2026-01-08 10:42:34 +07:00
Ruslan Bakiev 5d5e0fa4b5 Add nearestNodes query for coordinate-based search
Build Docker Image / build (push) Successful in 1m39s
2026-01-08 00:36:16 +07:00
Ruslan Bakiev 5f040426a2 feat: add search parameter to nodes query
Build Docker Image / build (push) Successful in 1m43s
2026-01-07 22:01:31 +07:00
Ruslan Bakiev eb2ffd50f2 Initial commit from monorepo 2026-01-07 09:17:51 +07:00