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:
@@ -17,7 +17,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { Map as MapboxMapType } from 'mapbox-gl'
|
||||
import { LngLatBounds } from 'mapbox-gl'
|
||||
import type { ClusterPointType } from '~/composables/graphql/public/geo-generated'
|
||||
import type { ClusterPoint } from '~/composables/graphql/public/geo-generated'
|
||||
|
||||
interface MapItem {
|
||||
uuid?: string | null
|
||||
@@ -43,8 +43,8 @@ interface HoveredItem {
|
||||
const props = withDefaults(defineProps<{
|
||||
mapId: string
|
||||
items?: MapItem[]
|
||||
clusteredPoints?: ClusterPointType[]
|
||||
clusteredPointsByType?: Partial<Record<'offer' | 'hub' | 'supplier', ClusterPointType[]>>
|
||||
clusteredPoints?: ClusterPoint[]
|
||||
clusteredPointsByType?: Partial<Record<'offer' | 'hub' | 'supplier', ClusterPoint[]>>
|
||||
useServerClustering?: boolean
|
||||
hoveredItemId?: string | null
|
||||
hoveredItem?: HoveredItem | null
|
||||
@@ -227,7 +227,7 @@ const serverClusteredGeoJson = computed(() => ({
|
||||
id: point!.id,
|
||||
name: point!.name,
|
||||
count: point!.count ?? 1,
|
||||
expansionZoom: point!.expansionZoom,
|
||||
expansionZoom: point!.expansion_zoom,
|
||||
isCluster: (point!.count ?? 1) > 1
|
||||
},
|
||||
geometry: {
|
||||
@@ -238,7 +238,7 @@ const serverClusteredGeoJson = computed(() => ({
|
||||
}))
|
||||
|
||||
const serverClusteredGeoJsonByType = computed(() => {
|
||||
const build = (points: ClusterPointType[] | undefined, type: 'offer' | 'hub' | 'supplier') => ({
|
||||
const build = (points: ClusterPoint[] | undefined, type: 'offer' | 'hub' | 'supplier') => ({
|
||||
type: 'FeatureCollection' as const,
|
||||
features: (points || []).filter(Boolean).map(point => ({
|
||||
type: 'Feature' as const,
|
||||
@@ -246,7 +246,7 @@ const serverClusteredGeoJsonByType = computed(() => {
|
||||
id: point!.id,
|
||||
name: point!.name,
|
||||
count: point!.count ?? 1,
|
||||
expansionZoom: point!.expansionZoom,
|
||||
expansionZoom: point!.expansion_zoom,
|
||||
isCluster: (point!.count ?? 1) > 1,
|
||||
type
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user