Fix geo GraphQL schema mismatch: camelCase → snake_case
All checks were successful
Build Docker Image / build (push) Successful in 5m46s
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:
@@ -71,7 +71,7 @@
|
||||
<script setup lang="ts">
|
||||
import { HubsListDocument, type HubsListQueryResult } from '~/composables/graphql/public/geo-generated'
|
||||
|
||||
type HubItem = NonNullable<NonNullable<HubsListQueryResult['hubsList']>[number]>
|
||||
type HubItem = NonNullable<NonNullable<HubsListQueryResult['hubs_list']>[number]>
|
||||
type HubWithDistance = HubItem & { distance?: string }
|
||||
|
||||
interface TeamAddress {
|
||||
@@ -96,7 +96,7 @@ const calculateDistance = (lat: number, lng: number) => {
|
||||
// Load logistics hubs
|
||||
const { data: locationsDataRaw, pending, error, refresh } = await useServerQuery('locations', HubsListDocument, { limit: 100 }, 'public', 'geo')
|
||||
const locationsData = computed<HubWithDistance[]>(() => {
|
||||
return (locationsDataRaw.value?.hubsList || [])
|
||||
return (locationsDataRaw.value?.hubs_list || [])
|
||||
.filter((location): location is HubItem => location !== null)
|
||||
.map((location) => ({
|
||||
...location,
|
||||
|
||||
Reference in New Issue
Block a user