@@ -18,49 +18,36 @@ Syntax to validate:
18
18
19
19
*/
20
20
21
- struct Interface ;
22
-
23
21
struct CustomName ;
22
+ graphql_object ! ( CustomName : ( ) as "ACustomNamedType" |& self | {
23
+ field simple( ) -> i32 { 0 }
24
+ } ) ;
24
25
25
26
#[ allow( dead_code) ]
26
27
struct WithLifetime < ' a > {
27
28
data : PhantomData < & ' a i32 > ,
28
29
}
30
+ graphql_object ! ( <' a> WithLifetime <' a>: ( ) as "WithLifetime" |& self | {
31
+ field simple( ) -> i32 { 0 }
32
+ } ) ;
29
33
30
34
#[ allow( dead_code) ]
31
35
struct WithGenerics < T > {
32
36
data : T ,
33
37
}
34
-
35
- struct DescriptionFirst ;
36
- struct FieldsFirst ;
37
- struct InterfacesFirst ;
38
-
39
- struct CommasWithTrailing ;
40
- struct CommasOnMeta ;
41
-
42
- struct Root ;
43
-
44
- graphql_object ! ( CustomName : ( ) as "ACustomNamedType" |& self | {
45
- field simple( ) -> i32 { 0 }
46
- } ) ;
47
-
48
- graphql_object ! ( <' a> WithLifetime <' a>: ( ) as "WithLifetime" |& self | {
49
- field simple( ) -> i32 { 0 }
50
- } ) ;
51
-
52
38
graphql_object ! ( <T > WithGenerics <T >: ( ) as "WithGenerics" |& self | {
53
39
field simple( ) -> i32 { 0 }
54
40
} ) ;
55
41
42
+ struct Interface ;
43
+ struct DescriptionFirst ;
56
44
graphql_interface ! ( Interface : ( ) |& self | {
57
45
field simple( ) -> i32 { 0 }
58
46
59
47
instance_resolvers: |_| {
60
48
DescriptionFirst => Some ( DescriptionFirst { } ) ,
61
49
}
62
50
} ) ;
63
-
64
51
graphql_object ! ( DescriptionFirst : ( ) |& self | {
65
52
description: "A description"
66
53
@@ -69,6 +56,7 @@ graphql_object!(DescriptionFirst: () |&self| {
69
56
interfaces: [ Interface ]
70
57
} ) ;
71
58
59
+ struct FieldsFirst ;
72
60
graphql_object ! ( FieldsFirst : ( ) |& self | {
73
61
field simple( ) -> i32 { 0 }
74
62
@@ -77,6 +65,7 @@ graphql_object!(FieldsFirst: () |&self| {
77
65
interfaces: [ Interface ]
78
66
} ) ;
79
67
68
+ struct InterfacesFirst ;
80
69
graphql_object ! ( InterfacesFirst : ( ) |& self | {
81
70
interfaces: [ Interface ]
82
71
@@ -85,6 +74,7 @@ graphql_object!(InterfacesFirst: ()|&self| {
85
74
description: "A description"
86
75
} ) ;
87
76
77
+ struct CommasWithTrailing ;
88
78
graphql_object ! ( CommasWithTrailing : ( ) |& self | {
89
79
interfaces: [ Interface ] ,
90
80
@@ -93,13 +83,17 @@ graphql_object!(CommasWithTrailing: () |&self| {
93
83
description: "A description" ,
94
84
} ) ;
95
85
86
+ struct CommasOnMeta ;
87
+
96
88
graphql_object ! ( CommasOnMeta : ( ) |& self | {
97
89
interfaces: [ Interface ] ,
98
90
description: "A description" ,
99
91
100
92
field simple( ) -> i32 { 0 }
101
93
} ) ;
102
94
95
+ struct Root ;
96
+
103
97
struct InnerContext ;
104
98
impl Context for InnerContext { }
105
99
0 commit comments