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 11use constants:: * ;
22use graphql_parser:: query:: SelectionSet ;
33
4+ /// A single object field as part of a selection.
45#[ derive( Clone , Debug , PartialEq ) ]
56pub struct SelectionField {
67 pub alias : Option < String > ,
78 pub name : String ,
89 pub fields : Selection ,
910}
1011
12+ /// A spread fragment in a selection (e.g. `...MyFragment`).
1113#[ derive( Clone , Debug , PartialEq ) ]
1214pub struct SelectionFragmentSpread {
1315 pub fragment_name : String ,
1416}
1517
18+ /// An inline fragment as part of a selection (e.g. `...on MyThing { name }`).
1619#[ derive( Clone , Debug , PartialEq ) ]
1720pub struct SelectionInlineFragment {
1821 pub on : String ,
1922 pub fields : Selection ,
2023}
2124
25+ /// An element in a query selection.
2226#[ derive( Clone , Debug , PartialEq ) ]
2327pub enum SelectionItem {
2428 Field ( SelectionField ) ,
@@ -124,7 +128,7 @@ mod tests {
124128 }
125129
126130 #[ test]
127- fn selection_extract_typename_in_fragemnt ( ) {
131+ fn selection_extract_typename_in_fragment ( ) {
128132 let mut selection = Selection :: new_empty ( ) ;
129133 selection
130134 . 0
You can’t perform that action at this time.
0 commit comments