File tree 6 files changed +17
-26
lines changed
6 files changed +17
-26
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ const itsApi = introspect.openApi({
16
16
kind : "file" ,
17
17
filePath : "./openapi.yaml" ,
18
18
} ,
19
- //baseURL: "http://localhost:8090/",
20
19
} ) ;
20
+
21
21
// configureWunderGraph emits the configuration
22
22
configureWunderGraphApplication ( {
23
23
apis : [ itsApi ] ,
@@ -35,7 +35,9 @@ configureWunderGraphApplication({
35
35
cors : {
36
36
...cors . allowAll ,
37
37
allowedOrigins :
38
- process . env . NODE_ENV === "production" ? [ "https://*" ] : [ "http://*" ] ,
38
+ process . env . NODE_ENV === "production"
39
+ ? [ "https://wg-livemap.vercel.app/" ]
40
+ : [ "http://*" ] ,
39
41
/**
40
42
* Please configure CORS carefully to make sure that your users are protected.
41
43
* Allowing all origins is usually the worst possible configuration.
Original file line number Diff line number Diff line change 1
- import { GraphQLObjectType , GraphQLSchema , GraphQLString } from ' graphql' ;
2
- import { configureWunderGraphServer } from ' @wundergraph/sdk/server' ;
3
- import type { HooksConfig } from ' ./generated/wundergraph.hooks' ;
4
- import type { InternalClient } from ' ./generated/wundergraph.internal.client' ;
1
+ import { GraphQLObjectType , GraphQLSchema , GraphQLString } from " graphql" ;
2
+ import { configureWunderGraphServer } from " @wundergraph/sdk/server" ;
3
+ import type { HooksConfig } from " ./generated/wundergraph.hooks" ;
4
+ import type { InternalClient } from " ./generated/wundergraph.internal.client" ;
5
5
6
6
export default configureWunderGraphServer < HooksConfig , InternalClient > ( ( ) => ( {
7
- hooks : {
8
- queries : { } ,
9
- mutations : { } ,
10
- } ,
11
- graphqlServers : [ ] ,
7
+ hooks : {
8
+ queries : { } ,
9
+ mutations : { } ,
10
+ } ,
11
+ graphqlServers : [ ] ,
12
12
} ) ) ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export interface AuthProvider {
47
47
}
48
48
49
49
export const defaultClientConfig : ClientConfig = {
50
- applicationHash : "c9e5c89c " ,
50
+ applicationHash : "551dfb21 " ,
51
51
baseURL : "http://localhost:9991" ,
52
52
sdkVersion : "0.137.4" ,
53
53
} ;
@@ -119,7 +119,6 @@ export type Queries = {
119
119
input ?: undefined ;
120
120
data : LocationResponseData ;
121
121
requiresAuthentication : false ;
122
- liveQuery : boolean ;
123
122
} ;
124
123
"users/get" : {
125
124
input : UsersGetInput ;
@@ -151,12 +150,6 @@ export type Subscriptions = {
151
150
} ;
152
151
153
152
export type LiveQueries = {
154
- Location : {
155
- input ?: undefined ;
156
- data : LocationResponseData ;
157
- liveQuery : true ;
158
- requiresAuthentication : false ;
159
- } ;
160
153
"users/get" : {
161
154
input : UsersGetInput ;
162
155
data : UsersGetResponseData ;
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ export interface LocationResponseData {
80
80
} ;
81
81
directionRef ?: string ;
82
82
operatorRef ?: string ;
83
- vehicleRef ?: string ;
84
83
lineRef ?: string ;
85
84
} ;
86
85
} [ ] ;
Original file line number Diff line number Diff line change 15
15
"test:playwright" : " npx -- playwright test"
16
16
},
17
17
"dependencies" : {
18
- "@wundergraph/nextjs" : " ^0.9.4 " ,
19
- "@wundergraph/sdk" : " ^0.137.4 " ,
18
+ "@wundergraph/nextjs" : " ^0.9.6 " ,
19
+ "@wundergraph/sdk" : " ^0.139.0 " ,
20
20
"graphql" : " ^16.3.0" ,
21
21
"mapbox-gl" : " ^2.13.0" ,
22
22
"maplibre-gl" : " ^2.4.0" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ const Home: NextPage = () => {
20
20
const locations = useQuery ( {
21
21
operationName : "Location" ,
22
22
liveQuery : true ,
23
- revalidateOnFocus : false ,
24
23
} ) ;
25
24
26
25
return (
@@ -95,7 +94,7 @@ const Home: NextPage = () => {
95
94
{ locations . data &&
96
95
locations . data . getVehicleActivity ?. body ?. map (
97
96
( location , index ) => {
98
- const { vehicleLocation, bearing, lineRef } =
97
+ const { vehicleLocation, bearing } =
99
98
location . monitoredVehicleJourney ! ;
100
99
return (
101
100
< Marker
@@ -106,10 +105,8 @@ const Home: NextPage = () => {
106
105
>
107
106
< Pin
108
107
onMouseMove = { ( e ) => {
109
- // e.stopPropagation();
110
108
//@ts -ignore
111
109
const { layerX : x , layerY : y } = e . nativeEvent ;
112
-
113
110
setPopupInfo (
114
111
location && {
115
112
feature : location ,
You can’t perform that action at this time.
0 commit comments