@@ -3,6 +3,9 @@ import * as ApolloReactCommon from '@apollo/client';
3
3
import * as ApolloReactHooks from '@apollo/client' ;
4
4
export type Maybe < T > = T | null ;
5
5
export type Exact < T extends { [ key : string ] : unknown } > = { [ K in keyof T ] : T [ K ] } ;
6
+ export type MakeOptional < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] ?: Maybe < T [ SubKey ] > } ;
7
+ export type MakeMaybe < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] : Maybe < T [ SubKey ] > } ;
8
+ const defaultOptions = { }
6
9
/** All built-in and custom scalars, mapped to their actual values */
7
10
export type Scalars = {
8
11
ID : string ;
@@ -22,7 +25,8 @@ export type Endpoint = {
22
25
export type Lab = {
23
26
__typename ?: 'Lab' ;
24
27
id : Scalars [ 'String' ] ;
25
- endpoints : Array < Endpoint > ;
28
+ wsEndpoints : Array < Endpoint > ;
29
+ tcpEndpoints : Array < Endpoint > ;
26
30
resources : Array < ResourceWithTranslation > ;
27
31
} ;
28
32
@@ -38,11 +42,12 @@ export type LabInstance = {
38
42
lang : Scalars [ 'String' ] ;
39
43
name : Scalars [ 'String' ] ;
40
44
content : Scalars [ 'String' ] ;
41
- endpoints : Array < Endpoint > ;
45
+ wsEndpoints : Array < Endpoint > ;
46
+ tcpEndpoints : Array < Endpoint > ;
42
47
} ;
43
48
44
49
export type Practice = {
45
- __typename ?: 'nav.practice ' ;
50
+ __typename ?: 'Practice ' ;
46
51
labCategories : Array < LabCategory > ;
47
52
} ;
48
53
@@ -77,10 +82,13 @@ export type EndpointFragment = (
77
82
& Pick < Endpoint , 'host' | 'port' >
78
83
) ;
79
84
80
- export type LabWithoutEndpointFragment = (
85
+ export type LabWithEndpointFragment = (
81
86
{ __typename ?: 'Lab' }
82
87
& Pick < Lab , 'id' >
83
- & { endpoints : Array < (
88
+ & { wsEndpoints : Array < (
89
+ { __typename ?: 'Endpoint' }
90
+ & EndpointFragment
91
+ ) > , tcpEndpoints : Array < (
84
92
{ __typename ?: 'Endpoint' }
85
93
& EndpointFragment
86
94
) > , resources : Array < (
@@ -97,12 +105,12 @@ export type LabCategoryFragment = (
97
105
& TranslationFragment
98
106
) > , labs : Array < (
99
107
{ __typename ?: 'Lab' }
100
- & LabWithoutEndpointFragment
108
+ & LabWithEndpointFragment
101
109
) > }
102
110
) ;
103
111
104
112
export type PracticeFragment = (
105
- { __typename ?: 'nav.practice ' }
113
+ { __typename ?: 'Practice ' }
106
114
& { labCategories : Array < (
107
115
{ __typename ?: 'LabCategory' }
108
116
& LabCategoryFragment
@@ -112,7 +120,10 @@ export type PracticeFragment = (
112
120
export type LabInstanceFragment = (
113
121
{ __typename ?: 'LabInstance' }
114
122
& Pick < LabInstance , 'lang' | 'name' | 'content' >
115
- & { endpoints : Array < (
123
+ & { wsEndpoints : Array < (
124
+ { __typename ?: 'Endpoint' }
125
+ & EndpointFragment
126
+ ) > , tcpEndpoints : Array < (
116
127
{ __typename ?: 'Endpoint' }
117
128
& EndpointFragment
118
129
) > }
@@ -142,7 +153,7 @@ export type PracticesQueryVariables = Exact<{ [key: string]: never; }>;
142
153
export type PracticesQuery = (
143
154
{ __typename ?: 'Query' }
144
155
& { practice : (
145
- { __typename ?: 'nav.practice ' }
156
+ { __typename ?: 'Practice ' }
146
157
& PracticeFragment
147
158
) }
148
159
) ;
@@ -180,10 +191,13 @@ export const ResourceWithTranslationFragmentDoc = gql`
180
191
name
181
192
}
182
193
` ;
183
- export const LabWithoutEndpointFragmentDoc = gql `
184
- fragment LabWithoutEndpoint on Lab {
194
+ export const LabWithEndpointFragmentDoc = gql `
195
+ fragment LabWithEndpoint on Lab {
185
196
id
186
- endpoints {
197
+ wsEndpoints {
198
+ ...Endpoint
199
+ }
200
+ tcpEndpoints {
187
201
...Endpoint
188
202
}
189
203
resources {
@@ -199,11 +213,11 @@ export const LabCategoryFragmentDoc = gql`
199
213
...Translation
200
214
}
201
215
labs {
202
- ...LabWithoutEndpoint
216
+ ...LabWithEndpoint
203
217
}
204
218
}
205
219
${ TranslationFragmentDoc }
206
- ${ LabWithoutEndpointFragmentDoc } `;
220
+ ${ LabWithEndpointFragmentDoc } `;
207
221
export const PracticeFragmentDoc = gql `
208
222
fragment Practice on Practice {
209
223
labCategories {
@@ -216,7 +230,10 @@ export const LabInstanceFragmentDoc = gql`
216
230
lang
217
231
name
218
232
content
219
- endpoints {
233
+ wsEndpoints {
234
+ ...Endpoint
235
+ }
236
+ tcpEndpoints {
220
237
...Endpoint
221
238
}
222
239
}
@@ -243,10 +260,12 @@ export const HelloDocument = gql`
243
260
* });
244
261
*/
245
262
export function useHelloQuery ( baseOptions ?: ApolloReactHooks . QueryHookOptions < HelloQuery , HelloQueryVariables > ) {
246
- return ApolloReactHooks . useQuery < HelloQuery , HelloQueryVariables > ( HelloDocument , baseOptions ) ;
263
+ const options = { ...defaultOptions , ...baseOptions }
264
+ return ApolloReactHooks . useQuery < HelloQuery , HelloQueryVariables > ( HelloDocument , options ) ;
247
265
}
248
266
export function useHelloLazyQuery ( baseOptions ?: ApolloReactHooks . LazyQueryHookOptions < HelloQuery , HelloQueryVariables > ) {
249
- return ApolloReactHooks . useLazyQuery < HelloQuery , HelloQueryVariables > ( HelloDocument , baseOptions ) ;
267
+ const options = { ...defaultOptions , ...baseOptions }
268
+ return ApolloReactHooks . useLazyQuery < HelloQuery , HelloQueryVariables > ( HelloDocument , options ) ;
250
269
}
251
270
export type HelloQueryHookResult = ReturnType < typeof useHelloQuery > ;
252
271
export type HelloLazyQueryHookResult = ReturnType < typeof useHelloLazyQuery > ;
@@ -275,10 +294,12 @@ export const PracticesDocument = gql`
275
294
* });
276
295
*/
277
296
export function usePracticesQuery ( baseOptions ?: ApolloReactHooks . QueryHookOptions < PracticesQuery , PracticesQueryVariables > ) {
278
- return ApolloReactHooks . useQuery < PracticesQuery , PracticesQueryVariables > ( PracticesDocument , baseOptions ) ;
297
+ const options = { ...defaultOptions , ...baseOptions }
298
+ return ApolloReactHooks . useQuery < PracticesQuery , PracticesQueryVariables > ( PracticesDocument , options ) ;
279
299
}
280
300
export function usePracticesLazyQuery ( baseOptions ?: ApolloReactHooks . LazyQueryHookOptions < PracticesQuery , PracticesQueryVariables > ) {
281
- return ApolloReactHooks . useLazyQuery < PracticesQuery , PracticesQueryVariables > ( PracticesDocument , baseOptions ) ;
301
+ const options = { ...defaultOptions , ...baseOptions }
302
+ return ApolloReactHooks . useLazyQuery < PracticesQuery , PracticesQueryVariables > ( PracticesDocument , options ) ;
282
303
}
283
304
export type PracticesQueryHookResult = ReturnType < typeof usePracticesQuery > ;
284
305
export type PracticesLazyQueryHookResult = ReturnType < typeof usePracticesLazyQuery > ;
@@ -309,11 +330,13 @@ export const LabDocument = gql`
309
330
* },
310
331
* });
311
332
*/
312
- export function useLabQuery ( baseOptions ?: ApolloReactHooks . QueryHookOptions < LabQuery , LabQueryVariables > ) {
313
- return ApolloReactHooks . useQuery < LabQuery , LabQueryVariables > ( LabDocument , baseOptions ) ;
333
+ export function useLabQuery ( baseOptions : ApolloReactHooks . QueryHookOptions < LabQuery , LabQueryVariables > ) {
334
+ const options = { ...defaultOptions , ...baseOptions }
335
+ return ApolloReactHooks . useQuery < LabQuery , LabQueryVariables > ( LabDocument , options ) ;
314
336
}
315
337
export function useLabLazyQuery ( baseOptions ?: ApolloReactHooks . LazyQueryHookOptions < LabQuery , LabQueryVariables > ) {
316
- return ApolloReactHooks . useLazyQuery < LabQuery , LabQueryVariables > ( LabDocument , baseOptions ) ;
338
+ const options = { ...defaultOptions , ...baseOptions }
339
+ return ApolloReactHooks . useLazyQuery < LabQuery , LabQueryVariables > ( LabDocument , options ) ;
317
340
}
318
341
export type LabQueryHookResult = ReturnType < typeof useLabQuery > ;
319
342
export type LabLazyQueryHookResult = ReturnType < typeof useLabLazyQuery > ;
0 commit comments