File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
graphql_client_codegen/src/codegen Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ pub(super) fn generate_enum_definitions<'a, 'schema: 'a>(
16
16
options : & ' a GraphQLClientCodegenOptions ,
17
17
query : BoundQuery < ' schema > ,
18
18
) -> impl Iterator < Item = TokenStream > + ' a {
19
- let derives = render_derives (
20
- options
21
- . all_response_derives ( )
22
- . filter ( |d| !& [ "Serialize" , "Deserialize" , "Default" ] . contains ( d) ) ,
23
- ) ;
19
+ let traits = options
20
+ . all_response_derives ( )
21
+ . chain ( options. all_variable_derives ( ) )
22
+ . filter ( |d| !& [ "Serialize" , "Deserialize" , "Default" ] . contains ( d) )
23
+ // Use BTreeSet instead of HashSet for a stable ordering.
24
+ . collect :: < std:: collections:: BTreeSet < _ > > ( ) ;
25
+ let derives = render_derives ( traits. into_iter ( ) ) ;
24
26
let normalization = options. normalization ( ) ;
25
27
26
28
all_used_types. enums ( query. schema )
You can’t perform that action at this time.
0 commit comments