File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
graphql_client_codegen/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
use constants:: * ;
2
2
use graphql_parser:: query:: SelectionSet ;
3
3
4
+ /// A single object field as part of a selection.
4
5
#[ derive( Clone , Debug , PartialEq ) ]
5
6
pub struct SelectionField {
6
7
pub alias : Option < String > ,
7
8
pub name : String ,
8
9
pub fields : Selection ,
9
10
}
10
11
12
+ /// A spread fragment in a selection (e.g. `...MyFragment`).
11
13
#[ derive( Clone , Debug , PartialEq ) ]
12
14
pub struct SelectionFragmentSpread {
13
15
pub fragment_name : String ,
14
16
}
15
17
18
+ /// An inline fragment as part of a selection (e.g. `...on MyThing { name }`).
16
19
#[ derive( Clone , Debug , PartialEq ) ]
17
20
pub struct SelectionInlineFragment {
18
21
pub on : String ,
19
22
pub fields : Selection ,
20
23
}
21
24
25
+ /// An element in a query selection.
22
26
#[ derive( Clone , Debug , PartialEq ) ]
23
27
pub enum SelectionItem {
24
28
Field ( SelectionField ) ,
@@ -124,7 +128,7 @@ mod tests {
124
128
}
125
129
126
130
#[ test]
127
- fn selection_extract_typename_in_fragemnt ( ) {
131
+ fn selection_extract_typename_in_fragment ( ) {
128
132
let mut selection = Selection :: new_empty ( ) ;
129
133
selection
130
134
. 0
You can’t perform that action at this time.
0 commit comments