@@ -28,8 +28,8 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForInterface(t *testing.T) {
28
28
29
29
petType := graphql .NewInterface (graphql.InterfaceConfig {
30
30
Name : "Pet" ,
31
- Fields : graphql.FieldConfigMap {
32
- "name" : & graphql.FieldConfig {
31
+ Fields : graphql.Fields {
32
+ "name" : & graphql.Field {
33
33
Type : graphql .String ,
34
34
},
35
35
},
@@ -45,19 +45,19 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForInterface(t *testing.T) {
45
45
_ , ok := value .(* testDog )
46
46
return ok
47
47
},
48
- Fields : graphql.FieldConfigMap {
49
- "name" : & graphql.FieldConfig {
48
+ Fields : graphql.Fields {
49
+ "name" : & graphql.Field {
50
50
Type : graphql .String ,
51
- Resolve : func (p graphql.GQLFRParams ) interface {} {
51
+ Resolve : func (p graphql.ResolveParams ) interface {} {
52
52
if dog , ok := p .Source .(* testDog ); ok {
53
53
return dog .Name
54
54
}
55
55
return nil
56
56
},
57
57
},
58
- "woofs" : & graphql.FieldConfig {
58
+ "woofs" : & graphql.Field {
59
59
Type : graphql .Boolean ,
60
- Resolve : func (p graphql.GQLFRParams ) interface {} {
60
+ Resolve : func (p graphql.ResolveParams ) interface {} {
61
61
if dog , ok := p .Source .(* testDog ); ok {
62
62
return dog .Woofs
63
63
}
@@ -76,19 +76,19 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForInterface(t *testing.T) {
76
76
_ , ok := value .(* testCat )
77
77
return ok
78
78
},
79
- Fields : graphql.FieldConfigMap {
80
- "name" : & graphql.FieldConfig {
79
+ Fields : graphql.Fields {
80
+ "name" : & graphql.Field {
81
81
Type : graphql .String ,
82
- Resolve : func (p graphql.GQLFRParams ) interface {} {
82
+ Resolve : func (p graphql.ResolveParams ) interface {} {
83
83
if cat , ok := p .Source .(* testCat ); ok {
84
84
return cat .Name
85
85
}
86
86
return nil
87
87
},
88
88
},
89
- "meows" : & graphql.FieldConfig {
89
+ "meows" : & graphql.Field {
90
90
Type : graphql .Boolean ,
91
- Resolve : func (p graphql.GQLFRParams ) interface {} {
91
+ Resolve : func (p graphql.ResolveParams ) interface {} {
92
92
if cat , ok := p .Source .(* testCat ); ok {
93
93
return cat .Meows
94
94
}
@@ -100,10 +100,10 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForInterface(t *testing.T) {
100
100
schema , err := graphql .NewSchema (graphql.SchemaConfig {
101
101
Query : graphql .NewObject (graphql.ObjectConfig {
102
102
Name : "Query" ,
103
- Fields : graphql.FieldConfigMap {
104
- "pets" : & graphql.FieldConfig {
103
+ Fields : graphql.Fields {
104
+ "pets" : & graphql.Field {
105
105
Type : graphql .NewList (petType ),
106
- Resolve : func (p graphql.GQLFRParams ) interface {} {
106
+ Resolve : func (p graphql.ResolveParams ) interface {} {
107
107
return []interface {}{
108
108
& testDog {"Odie" , true },
109
109
& testCat {"Garfield" , false },
@@ -145,7 +145,7 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForInterface(t *testing.T) {
145
145
Errors : nil ,
146
146
}
147
147
148
- result := graphql .Graphql (graphql.Params {
148
+ result := graphql .Do (graphql.Params {
149
149
Schema : schema ,
150
150
RequestString : query ,
151
151
})
@@ -165,19 +165,19 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForUnion(t *testing.T) {
165
165
_ , ok := value .(* testDog )
166
166
return ok
167
167
},
168
- Fields : graphql.FieldConfigMap {
169
- "name" : & graphql.FieldConfig {
168
+ Fields : graphql.Fields {
169
+ "name" : & graphql.Field {
170
170
Type : graphql .String ,
171
- Resolve : func (p graphql.GQLFRParams ) interface {} {
171
+ Resolve : func (p graphql.ResolveParams ) interface {} {
172
172
if dog , ok := p .Source .(* testDog ); ok {
173
173
return dog .Name
174
174
}
175
175
return nil
176
176
},
177
177
},
178
- "woofs" : & graphql.FieldConfig {
178
+ "woofs" : & graphql.Field {
179
179
Type : graphql .Boolean ,
180
- Resolve : func (p graphql.GQLFRParams ) interface {} {
180
+ Resolve : func (p graphql.ResolveParams ) interface {} {
181
181
if dog , ok := p .Source .(* testDog ); ok {
182
182
return dog .Woofs
183
183
}
@@ -192,19 +192,19 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForUnion(t *testing.T) {
192
192
_ , ok := value .(* testCat )
193
193
return ok
194
194
},
195
- Fields : graphql.FieldConfigMap {
196
- "name" : & graphql.FieldConfig {
195
+ Fields : graphql.Fields {
196
+ "name" : & graphql.Field {
197
197
Type : graphql .String ,
198
- Resolve : func (p graphql.GQLFRParams ) interface {} {
198
+ Resolve : func (p graphql.ResolveParams ) interface {} {
199
199
if cat , ok := p .Source .(* testCat ); ok {
200
200
return cat .Name
201
201
}
202
202
return nil
203
203
},
204
204
},
205
- "meows" : & graphql.FieldConfig {
205
+ "meows" : & graphql.Field {
206
206
Type : graphql .Boolean ,
207
- Resolve : func (p graphql.GQLFRParams ) interface {} {
207
+ Resolve : func (p graphql.ResolveParams ) interface {} {
208
208
if cat , ok := p .Source .(* testCat ); ok {
209
209
return cat .Meows
210
210
}
@@ -232,10 +232,10 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForUnion(t *testing.T) {
232
232
schema , err := graphql .NewSchema (graphql.SchemaConfig {
233
233
Query : graphql .NewObject (graphql.ObjectConfig {
234
234
Name : "Query" ,
235
- Fields : graphql.FieldConfigMap {
236
- "pets" : & graphql.FieldConfig {
235
+ Fields : graphql.Fields {
236
+ "pets" : & graphql.Field {
237
237
Type : graphql .NewList (petType ),
238
- Resolve : func (p graphql.GQLFRParams ) interface {} {
238
+ Resolve : func (p graphql.ResolveParams ) interface {} {
239
239
return []interface {}{
240
240
& testDog {"Odie" , true },
241
241
& testCat {"Garfield" , false },
@@ -277,7 +277,7 @@ func TestIsTypeOfUsedToResolveRuntimeTypeForUnion(t *testing.T) {
277
277
Errors : nil ,
278
278
}
279
279
280
- result := graphql .Graphql (graphql.Params {
280
+ result := graphql .Do (graphql.Params {
281
281
Schema : schema ,
282
282
RequestString : query ,
283
283
})
@@ -297,8 +297,8 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
297
297
var humanType * graphql.Object
298
298
petType := graphql .NewInterface (graphql.InterfaceConfig {
299
299
Name : "Pet" ,
300
- Fields : graphql.FieldConfigMap {
301
- "name" : & graphql.FieldConfig {
300
+ Fields : graphql.Fields {
301
+ "name" : & graphql.Field {
302
302
Type : graphql .String ,
303
303
},
304
304
},
@@ -318,10 +318,10 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
318
318
319
319
humanType = graphql .NewObject (graphql.ObjectConfig {
320
320
Name : "Human" ,
321
- Fields : graphql.FieldConfigMap {
322
- "name" : & graphql.FieldConfig {
321
+ Fields : graphql.Fields {
322
+ "name" : & graphql.Field {
323
323
Type : graphql .String ,
324
- Resolve : func (p graphql.GQLFRParams ) interface {} {
324
+ Resolve : func (p graphql.ResolveParams ) interface {} {
325
325
if human , ok := p .Source .(* testHuman ); ok {
326
326
return human .Name
327
327
}
@@ -339,19 +339,19 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
339
339
_ , ok := value .(* testDog )
340
340
return ok
341
341
},
342
- Fields : graphql.FieldConfigMap {
343
- "name" : & graphql.FieldConfig {
342
+ Fields : graphql.Fields {
343
+ "name" : & graphql.Field {
344
344
Type : graphql .String ,
345
- Resolve : func (p graphql.GQLFRParams ) interface {} {
345
+ Resolve : func (p graphql.ResolveParams ) interface {} {
346
346
if dog , ok := p .Source .(* testDog ); ok {
347
347
return dog .Name
348
348
}
349
349
return nil
350
350
},
351
351
},
352
- "woofs" : & graphql.FieldConfig {
352
+ "woofs" : & graphql.Field {
353
353
Type : graphql .Boolean ,
354
- Resolve : func (p graphql.GQLFRParams ) interface {} {
354
+ Resolve : func (p graphql.ResolveParams ) interface {} {
355
355
if dog , ok := p .Source .(* testDog ); ok {
356
356
return dog .Woofs
357
357
}
@@ -369,19 +369,19 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
369
369
_ , ok := value .(* testCat )
370
370
return ok
371
371
},
372
- Fields : graphql.FieldConfigMap {
373
- "name" : & graphql.FieldConfig {
372
+ Fields : graphql.Fields {
373
+ "name" : & graphql.Field {
374
374
Type : graphql .String ,
375
- Resolve : func (p graphql.GQLFRParams ) interface {} {
375
+ Resolve : func (p graphql.ResolveParams ) interface {} {
376
376
if cat , ok := p .Source .(* testCat ); ok {
377
377
return cat .Name
378
378
}
379
379
return nil
380
380
},
381
381
},
382
- "meows" : & graphql.FieldConfig {
382
+ "meows" : & graphql.Field {
383
383
Type : graphql .Boolean ,
384
- Resolve : func (p graphql.GQLFRParams ) interface {} {
384
+ Resolve : func (p graphql.ResolveParams ) interface {} {
385
385
if cat , ok := p .Source .(* testCat ); ok {
386
386
return cat .Meows
387
387
}
@@ -393,10 +393,10 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
393
393
schema , err := graphql .NewSchema (graphql.SchemaConfig {
394
394
Query : graphql .NewObject (graphql.ObjectConfig {
395
395
Name : "Query" ,
396
- Fields : graphql.FieldConfigMap {
397
- "pets" : & graphql.FieldConfig {
396
+ Fields : graphql.Fields {
397
+ "pets" : & graphql.Field {
398
398
Type : graphql .NewList (petType ),
399
- Resolve : func (p graphql.GQLFRParams ) interface {} {
399
+ Resolve : func (p graphql.ResolveParams ) interface {} {
400
400
return []interface {}{
401
401
& testDog {"Odie" , true },
402
402
& testCat {"Garfield" , false },
@@ -445,7 +445,7 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
445
445
},
446
446
}
447
447
448
- result := graphql .Graphql (graphql.Params {
448
+ result := graphql .Do (graphql.Params {
449
449
Schema : schema ,
450
450
RequestString : query ,
451
451
})
@@ -461,10 +461,10 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
461
461
462
462
humanType := graphql .NewObject (graphql.ObjectConfig {
463
463
Name : "Human" ,
464
- Fields : graphql.FieldConfigMap {
465
- "name" : & graphql.FieldConfig {
464
+ Fields : graphql.Fields {
465
+ "name" : & graphql.Field {
466
466
Type : graphql .String ,
467
- Resolve : func (p graphql.GQLFRParams ) interface {} {
467
+ Resolve : func (p graphql.ResolveParams ) interface {} {
468
468
if human , ok := p .Source .(* testHuman ); ok {
469
469
return human .Name
470
470
}
@@ -479,19 +479,19 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
479
479
_ , ok := value .(* testDog )
480
480
return ok
481
481
},
482
- Fields : graphql.FieldConfigMap {
483
- "name" : & graphql.FieldConfig {
482
+ Fields : graphql.Fields {
483
+ "name" : & graphql.Field {
484
484
Type : graphql .String ,
485
- Resolve : func (p graphql.GQLFRParams ) interface {} {
485
+ Resolve : func (p graphql.ResolveParams ) interface {} {
486
486
if dog , ok := p .Source .(* testDog ); ok {
487
487
return dog .Name
488
488
}
489
489
return nil
490
490
},
491
491
},
492
- "woofs" : & graphql.FieldConfig {
492
+ "woofs" : & graphql.Field {
493
493
Type : graphql .Boolean ,
494
- Resolve : func (p graphql.GQLFRParams ) interface {} {
494
+ Resolve : func (p graphql.ResolveParams ) interface {} {
495
495
if dog , ok := p .Source .(* testDog ); ok {
496
496
return dog .Woofs
497
497
}
@@ -506,19 +506,19 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
506
506
_ , ok := value .(* testCat )
507
507
return ok
508
508
},
509
- Fields : graphql.FieldConfigMap {
510
- "name" : & graphql.FieldConfig {
509
+ Fields : graphql.Fields {
510
+ "name" : & graphql.Field {
511
511
Type : graphql .String ,
512
- Resolve : func (p graphql.GQLFRParams ) interface {} {
512
+ Resolve : func (p graphql.ResolveParams ) interface {} {
513
513
if cat , ok := p .Source .(* testCat ); ok {
514
514
return cat .Name
515
515
}
516
516
return nil
517
517
},
518
518
},
519
- "meows" : & graphql.FieldConfig {
519
+ "meows" : & graphql.Field {
520
520
Type : graphql .Boolean ,
521
- Resolve : func (p graphql.GQLFRParams ) interface {} {
521
+ Resolve : func (p graphql.ResolveParams ) interface {} {
522
522
if cat , ok := p .Source .(* testCat ); ok {
523
523
return cat .Meows
524
524
}
@@ -548,10 +548,10 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
548
548
schema , err := graphql .NewSchema (graphql.SchemaConfig {
549
549
Query : graphql .NewObject (graphql.ObjectConfig {
550
550
Name : "Query" ,
551
- Fields : graphql.FieldConfigMap {
552
- "pets" : & graphql.FieldConfig {
551
+ Fields : graphql.Fields {
552
+ "pets" : & graphql.Field {
553
553
Type : graphql .NewList (petType ),
554
- Resolve : func (p graphql.GQLFRParams ) interface {} {
554
+ Resolve : func (p graphql.ResolveParams ) interface {} {
555
555
return []interface {}{
556
556
& testDog {"Odie" , true },
557
557
& testCat {"Garfield" , false },
@@ -600,7 +600,7 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
600
600
},
601
601
}
602
602
603
- result := graphql .Graphql (graphql.Params {
603
+ result := graphql .Do (graphql.Params {
604
604
Schema : schema ,
605
605
RequestString : query ,
606
606
})
0 commit comments