Skip to content

Commit ef75dce

Browse files
committed
Update codegen tests for 1.93 Rust
1 parent fe207e3 commit ef75dce

File tree

60 files changed

+125
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+125
-31
lines changed

tests/codegen/fail/enum/derive_name_double_underscored.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system.
22
· note: https://spec.graphql.org/October2021#sec-Schema
3+
34
--> fail/enum/derive_name_double_underscored.rs:4:6
45
|
56
4 | enum __Test {

tests/codegen/fail/enum/derive_variant_with_field.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: GraphQL enum no fields allowed for non-ignored variants
22
· note: https://spec.graphql.org/October2021#sec-Enums
3+
34
--> fail/enum/derive_variant_with_field.rs:5:12
45
|
56
5 | Variant(i32),

tests/codegen/fail/input_object/enum/derive_default_value.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: GraphQL input object field cannot have default value in `@oneOf` input object
22
· note: https://spec.graphql.org/October2021#sec-Input-Objects
3+
34
--> fail/input_object/enum/derive_default_value.rs:5:15
45
|
56
5 | #[graphql(default)]

tests/codegen/fail/input_object/enum/derive_ignored_with_default_value.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
error: GraphQL input object `default` attribute argument has no meaning for ignored variants, as they are never constructed
22
· note: https://spec.graphql.org/October2021#sec-Input-Objects
3+
34
--> fail/input_object/enum/derive_ignored_with_default_value.rs:6:23
45
|
56
6 | #[graphql(ignore, default = "none")]
67
| ^^^^^^^
78

89
error: GraphQL input object `default` attribute argument has no meaning for ignored variants, as they are never constructed
910
· note: https://spec.graphql.org/October2021#sec-Input-Objects
11+
1012
--> fail/input_object/enum/derive_ignored_with_default_value.rs:8:21
1113
|
1214
8 | #[graphql(skip, default)]

tests/codegen/fail/input_object/enum/derive_no_underscore.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system.
22
· note: https://spec.graphql.org/October2021#sec-Schema
3+
34
--> fail/input_object/enum/derive_no_underscore.rs:5:5
45
|
56
5 | #[graphql(name = "__test")]

tests/codegen/fail/input_object/struct/derive_no_underscore.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system.
22
· note: https://spec.graphql.org/October2021#sec-Schema
3+
34
--> fail/input_object/struct/derive_no_underscore.rs:5:5
45
|
56
5 | #[graphql(name = "__test")]

tests/codegen/fail/interface/struct/attr_field_double_underscored.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system.
22
· note: https://spec.graphql.org/October2021#sec-Schema
3+
34
--> fail/interface/struct/attr_field_double_underscored.rs:5:5
45
|
56
5 | __id: String,

tests/codegen/fail/interface/struct/attr_fields_duplicate.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
error: GraphQL interface must have a different name for each field
22
· note: https://spec.graphql.org/October2021#sec-Interfaces
3+
34
--> fail/interface/struct/attr_fields_duplicate.rs:4:1
45
|
56
4 | struct Character {

tests/codegen/fail/interface/struct/attr_implementers_duplicate_pretty.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: duplicated attribute argument found
44
9 | #[graphql_interface(for = [ObjA, ObjA])]
55
| ^^^^
66

7-
error[E0412]: cannot find type `CharacterValue` in this scope
7+
error[E0425]: cannot find type `CharacterValue` in this scope
88
--> fail/interface/struct/attr_implementers_duplicate_pretty.rs:4:18
99
|
1010
4 | #[graphql(impl = CharacterValue)]

tests/codegen/fail/interface/struct/attr_missing_field.stderr

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ error[E0277]: the trait bound `ObjA: reflect::Field<__S, 11301463986558097276003
3636
11 | id: String,
3737
| ^^ unsatisfied trait bound
3838
|
39-
= help: the trait `Field<__S, 11301463986558097276003903130001171064>` is not implemented for `ObjA`
40-
but trait `Field<__S, 140650918148392961738240285796466530725>` is implemented for it
39+
help: the trait `Field<__S, 11301463986558097276003903130001171064>` is not implemented for `ObjA`
40+
but trait `Field<__S, 140650918148392961738240285796466530725>` is implemented for it
41+
--> fail/interface/struct/attr_missing_field.rs:3:10
42+
|
43+
3 | #[derive(GraphQLObject)]
44+
| ^^^^^^^^^^^^^
45+
= note: this error originates in the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info)
4146

4247
error[E0080]: evaluation panicked: Failed to implement interface `Character` on `ObjA`: field `id` isn't implemented on `ObjA`
4348
--> fail/interface/struct/attr_missing_field.rs:11:5
@@ -53,8 +58,13 @@ error[E0277]: the trait bound `ObjA: AsyncField<__S, 113014639865580972760039031
5358
11 | id: String,
5459
| ^^ unsatisfied trait bound
5560
|
56-
= help: the trait `AsyncField<__S, 11301463986558097276003903130001171064>` is not implemented for `ObjA`
57-
but trait `AsyncField<__S, 140650918148392961738240285796466530725>` is implemented for it
61+
help: the trait `AsyncField<__S, 11301463986558097276003903130001171064>` is not implemented for `ObjA`
62+
but trait `AsyncField<__S, 140650918148392961738240285796466530725>` is implemented for it
63+
--> fail/interface/struct/attr_missing_field.rs:3:10
64+
|
65+
3 | #[derive(GraphQLObject)]
66+
| ^^^^^^^^^^^^^
67+
= note: this error originates in the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info)
5868

5969
error[E0080]: evaluation panicked: Failed to implement interface `Character` on `ObjA`: field `id` isn't implemented on `ObjA`
6070
--> fail/interface/struct/attr_missing_field.rs:11:5

0 commit comments

Comments
 (0)