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>(
1616 options : & ' a GraphQLClientCodegenOptions ,
1717 query : BoundQuery < ' schema > ,
1818) -> 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 ( ) ) ;
2426 let normalization = options. normalization ( ) ;
2527
2628 all_used_types. enums ( query. schema )
You can’t perform that action at this time.
0 commit comments