Fix geo GraphQL schema mismatch: camelCase → snake_case
All checks were successful
Build Docker Image / build (push) Successful in 5m46s

All geo .graphql operations and consuming code updated to match
server schema which uses snake_case field/argument names.
Removed non-existent QuoteCalculations query, using NearestOffers instead.
This commit is contained in:
Ruslan Bakiev
2026-03-09 21:45:57 +07:00
parent 15563991df
commit 25f946b293
34 changed files with 504 additions and 744 deletions

View File

@@ -1,6 +1,6 @@
query GetAutoRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
autoRoute(fromLat: $fromLat, fromLon: $fromLon, toLat: $toLat, toLon: $toLon) {
distanceKm
auto_route(from_lat: $fromLat, from_lon: $fromLon, to_lat: $toLat, to_lon: $toLon) {
distance_km
geometry
}
}

View File

@@ -6,27 +6,21 @@ query GetClusteredNodes(
$zoom: Int!
$transportType: String
$nodeType: String
$productUuid: String
$hubUuid: String
$supplierUuid: String
) {
clusteredNodes(
clustered_nodes(
west: $west
south: $south
east: $east
north: $north
zoom: $zoom
transportType: $transportType
nodeType: $nodeType
productUuid: $productUuid
hubUuid: $hubUuid
supplierUuid: $supplierUuid
transport_type: $transportType
node_type: $nodeType
) {
id
latitude
longitude
count
expansionZoom
expansion_zoom
name
}
}

View File

@@ -1,3 +1,3 @@
query GetHubCountries {
hubCountries
hub_countries
}

View File

@@ -5,7 +5,7 @@ query GetNode($uuid: String!) {
latitude
longitude
country
countryCode
transportTypes
country_code
transport_types
}
}

View File

@@ -1,6 +1,6 @@
query GetRailRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
railRoute(fromLat: $fromLat, fromLon: $fromLon, toLat: $toLat, toLon: $toLon) {
distanceKm
rail_route(from_lat: $fromLat, from_lon: $fromLon, to_lat: $toLat, to_lon: $toLon) {
distance_km
geometry
}
}

View File

@@ -1,11 +1,11 @@
query HubsList($limit: Int, $offset: Int, $country: String, $transportType: String, $west: Float, $south: Float, $east: Float, $north: Float) {
hubsList(limit: $limit, offset: $offset, country: $country, transportType: $transportType, west: $west, south: $south, east: $east, north: $north) {
hubs_list(limit: $limit, offset: $offset, country: $country, transport_type: $transportType, west: $west, south: $south, east: $east, north: $north) {
uuid
name
latitude
longitude
country
countryCode
transportTypes
country_code
transport_types
}
}

View File

@@ -1,18 +1,17 @@
query NearestHubs($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int, $useGraph: Boolean) {
nearestHubs(
query NearestHubs($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
nearest_hubs(
lat: $lat
lon: $lon
radius: $radius
productUuid: $productUuid
product_uuid: $productUuid
limit: $limit
useGraph: $useGraph
) {
uuid
name
latitude
longitude
country
countryCode
transportTypes
country_code
transport_types
}
}

View File

@@ -1,34 +1,34 @@
query NearestOffers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String, $limit: Int) {
nearestOffers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, hubUuid: $hubUuid, limit: $limit) {
nearest_offers(lat: $lat, lon: $lon, radius: $radius, product_uuid: $productUuid, hub_uuid: $hubUuid, limit: $limit) {
uuid
productUuid
productName
supplierUuid
supplierName
product_uuid
product_name
supplier_uuid
supplier_name
latitude
longitude
country
countryCode
pricePerUnit
country_code
price_per_unit
currency
quantity
unit
distanceKm
distance_km
routes {
totalDistanceKm
totalTimeSeconds
total_distance_km
total_time_seconds
stages {
fromUuid
fromName
fromLat
fromLon
toUuid
toName
toLat
toLon
distanceKm
travelTimeSeconds
transportType
from_uuid
from_name
from_lat
from_lon
to_uuid
to_name
to_lat
to_lon
distance_km
travel_time_seconds
transport_type
}
}
}

View File

@@ -1,5 +1,5 @@
query NearestSuppliers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
nearestSuppliers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, limit: $limit) {
nearest_suppliers(lat: $lat, lon: $lon, radius: $radius, product_uuid: $productUuid, limit: $limit) {
uuid
}
}

View File

@@ -1,7 +1,7 @@
query ProductsList($limit: Int, $offset: Int, $west: Float, $south: Float, $east: Float, $north: Float) {
productsList(limit: $limit, offset: $offset, west: $west, south: $south, east: $east, north: $north) {
products_list(limit: $limit, offset: $offset, west: $west, south: $south, east: $east, north: $north) {
uuid
name
offersCount
offers_count
}
}

View File

@@ -1,37 +0,0 @@
query QuoteCalculations($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String, $quantity: Float, $limit: Int) {
quoteCalculations(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, hubUuid: $hubUuid, quantity: $quantity, limit: $limit) {
offers {
uuid
productUuid
productName
supplierUuid
supplierName
latitude
longitude
country
countryCode
pricePerUnit
currency
quantity
unit
distanceKm
routes {
totalDistanceKm
totalTimeSeconds
stages {
fromUuid
fromName
fromLat
fromLon
toUuid
toName
toLat
toLon
distanceKm
travelTimeSeconds
transportType
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
query SuppliersList($limit: Int, $offset: Int, $country: String, $west: Float, $south: Float, $east: Float, $north: Float) {
suppliersList(limit: $limit, offset: $offset, country: $country, west: $west, south: $south, east: $east, north: $north) {
suppliers_list(limit: $limit, offset: $offset, country: $country, west: $west, south: $south, east: $east, north: $north) {
uuid
name
latitude