Optimize catalog loading: backend bounds filtering + early returns
All checks were successful
Build Docker Image / build (push) Successful in 4m12s
All checks were successful
Build Docker Image / build (push) Successful in 4m12s
- Add bounds (west/south/east/north) parameters to GetNodes query - Add setBoundsFilter to useCatalogHubs, useCatalogSuppliers, useCatalogProducts - Replace client-side bounds filtering with backend query - Add early return to setProductFilter to avoid redundant fetches - Watch filterByBounds to trigger backend refetch when checkbox changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
query GetNodes($limit: Int, $offset: Int, $transportType: String, $country: String) {
|
||||
nodes(limit: $limit, offset: $offset, transportType: $transportType, country: $country) {
|
||||
query GetNodes($limit: Int, $offset: Int, $transportType: String, $country: String, $west: Float, $south: Float, $east: Float, $north: Float) {
|
||||
nodes(limit: $limit, offset: $offset, transportType: $transportType, country: $country, west: $west, south: $south, east: $east, north: $north) {
|
||||
uuid
|
||||
name
|
||||
latitude
|
||||
@@ -9,5 +9,5 @@ query GetNodes($limit: Int, $offset: Int, $transportType: String, $country: Stri
|
||||
syncedAt
|
||||
transportTypes
|
||||
}
|
||||
nodesCount(transportType: $transportType, country: $country)
|
||||
nodesCount(transportType: $transportType, country: $country, west: $west, south: $south, east: $east, north: $north)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user