Commit Graph
25 Commits
Author SHA1 Message Date
Ruslan Bakiev 3229a527cc Use Fastify Mercurius and GraphQL contracts
Build Docker Image / build (push) Has been cancelled
2026-06-01 00:25:27 +05:00
Ruslan Bakiev 56a7734e8e Switch from Infisical to Vault for secret loading
Build Docker Image / build (push) Failing after 2m52s
2026-03-09 11:20:34 +07:00
Ruslan Bakiev e577b41a86 Fix ARANGODB_URL env var name
Build Docker Image / build (push) Successful in 1m21s
2026-03-09 10:12:43 +07:00
Ruslan Bakiev 294f4077f0 Add Infisical secret loading at startup
Build Docker Image / build (push) Successful in 2m4s
2026-03-09 10:00:33 +07:00
Ruslan Bakiev 52cbed91f8 Migrate geo backend from Django/Graphene to Express + Apollo Server + arangojs
Build Docker Image / build (push) Successful in 1m5s
Replace Python stack with TypeScript. All 30+ GraphQL queries preserved including
phase-based routing (Dijkstra), H3 clustering, K_SHORTEST_PATHS, and external
routing services (GraphHopper, OpenRailRouting). Single public endpoint, no auth.
2026-03-09 09:45:49 +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 ca01a91019 Add integration tests for nearestOffers with hubUuid parameter
Build Docker Image / build (push) Successful in 1m18s
2026-01-26 16:37:11 +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 Bakiev 40f7f66f83 Add comprehensive tests for all geo GraphQL endpoints
Build Docker Image / build (push) Successful in 1m22s
Created test suite covering all 8 main geo service endpoints:
- Basic: products, nodes (with filters/bounds), clusteredNodes
- Nearest: nearestHubs, nearestOffers, nearestSuppliers (with product filters)
- Routing: routeToCoordinate, autoRoute, railRoute
- Edge cases: invalid coordinates, zero radius, nonexistent UUIDs

Test suite uses real API calls to production GraphQL endpoint.
16 tests total across 4 test classes.

Files:
- tests/test_graphql_endpoints.py: Main test suite (600+ lines)
- tests/README.md: Documentation and usage guide
- pytest.ini: Pytest configuration
- run_tests.sh: Convenience script to run tests
- pyproject.toml: Added pytest and requests as dev dependencies
2026-01-25 21:12:59 +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 5363b113cf Merge geo-nearest-endpoints - add coordinate-based API endpoints
Build Docker Image / build (push) Successful in 1m18s
2026-01-25 17:10:55 +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 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 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 c5c6428328 Update webhook URL
Build Docker Image / build (push) Successful in 1m40s
2026-01-07 09:45:26 +07:00
Ruslan Bakiev af046892ba Add Gitea Actions CI/CD workflow
Build Docker Image / build (push) Failing after 13s
2026-01-07 09:26:38 +07:00
Ruslan Bakiev eb2ffd50f2 Initial commit from monorepo 2026-01-07 09:17:51 +07:00