@@ -354,13 +354,6 @@ fn variables_in_const_contexts() {
354
354
) ;
355
355
let errors = schema. validate ( ) . unwrap_err ( ) . errors ;
356
356
let expected = expect_test:: expect![ [ r#"
357
- Error: variable `$x` is not defined
358
- ╭─[input.graphql:3:34]
359
- │
360
- 3 │ arg: InputObj = {x: ["x"]} @dir2(arg: "x")
361
- │ ─┬─
362
- │ ╰─── not found in this scope
363
- ───╯
364
357
Error: variable `$x` is not defined
365
358
╭─[input.graphql:3:51]
366
359
│
@@ -403,13 +396,6 @@ fn variables_in_const_contexts() {
403
396
│ ─┬─
404
397
│ ╰─── not found in this scope
405
398
────╯
406
- Error: variable `$x` is not defined
407
- ╭─[input.graphql:43:39]
408
- │
409
- 43 │ arg2: InputObj = {x: ["x"]} @dir(arg: {x: ["x"]})
410
- │ ─┬─
411
- │ ╰─── not found in this scope
412
- ────╯
413
399
Error: variable `$x` is not defined
414
400
╭─[input.graphql:43:60]
415
401
│
@@ -438,13 +424,6 @@ fn variables_in_const_contexts() {
438
424
│ ─┬─
439
425
│ ╰─── not found in this scope
440
426
────╯
441
- Error: variable `$x` is not defined
442
- ╭─[input.graphql:51:39]
443
- │
444
- 51 │ arg2: InputObj = {x: ["x"]} @dir(arg: {x: ["x"]})
445
- │ ─┬─
446
- │ ╰─── not found in this scope
447
- ────╯
448
427
Error: variable `$x` is not defined
449
428
╭─[input.graphql:51:60]
450
429
│
@@ -515,13 +494,6 @@ fn variables_in_const_contexts() {
515
494
│ ─┬─
516
495
│ ╰─── not found in this scope
517
496
────╯
518
- Error: variable `$x` is not defined
519
- ╭─[input.graphql:66:28]
520
- │
521
- 66 │ x: [String] = ["x"] @dir2(arg: "x")
522
- │ ─┬─
523
- │ ╰─── not found in this scope
524
- ────╯
525
497
Error: variable `$x` is not defined
526
498
╭─[input.graphql:66:44]
527
499
│
@@ -538,10 +510,19 @@ fn variables_in_const_contexts() {
538
510
────╯
539
511
"# ] ] ;
540
512
expected. assert_eq ( & errors. to_string ( ) ) ;
541
- let expected_schema_errors = 26 ;
513
+ let expected_schema_errors = 22 ;
542
514
assert_eq ! ( errors. len( ) , expected_schema_errors) ;
515
+
516
+ // Default values not validated yet: https://github.com/apollographql/apollo-rs/issues/928
517
+ // * @dir(arg:)
518
+ // * Query.field(arg2:)
519
+ // * Inter.field(arg2:)
520
+ // * InputObj.x
521
+ let input_default_values_not_yet_validated = 4 ;
543
522
assert_eq ! (
544
523
input. matches( "\" x\" " ) . count( ) ,
545
- expected_schema_errors + expected_executable_errors
524
+ expected_schema_errors
525
+ + expected_executable_errors
526
+ + input_default_values_not_yet_validated
546
527
)
547
528
}
0 commit comments