Skip to content

Commit 7991ca6

Browse files
committed
Update operation selection logic in graphql_query_derive
1 parent 64fc31b commit 7991ca6

File tree

1 file changed

+1
-6
lines changed
  • graphql_query_derive/src

1 file changed

+1
-6
lines changed

graphql_query_derive/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ fn build_graphql_client_derive_options(
5454
) -> Result<GraphQLClientCodegenOptions, failure::Error> {
5555
let response_derives = attributes::extract_attr(input, "response_derives").ok();
5656

57-
let selected_operation_name: String = attributes::extract_attr(input, "selected_operation")
58-
.context("Extracting selected operation name")
59-
.ok()
60-
.unwrap_or_else(|| input.ident.to_string());
61-
6257
let mut options = GraphQLClientCodegenOptions::new_default();
6358
options.set_query_file(query_path);
6459

@@ -73,7 +68,7 @@ fn build_graphql_client_derive_options(
7368

7469
options.set_struct_ident(input.ident.clone());
7570
options.set_module_visibility(input.vis.clone());
76-
options.set_operation_name(selected_operation_name);
71+
options.set_operation_name(input.ident.to_string());
7772

7873
Ok(options)
7974
}

0 commit comments

Comments
 (0)