Skip to content

Commit

Permalink
fix: export composite query correctly (#419)
Browse files Browse the repository at this point in the history
* fix: export composite query correctly

* changelog
  • Loading branch information
chenyan-dfinity authored Aug 23, 2023
1 parent 0f674bd commit e64b923
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/ic-cdk-macros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

### Fixed

- Export composite_query to Candid. (#419)

## [0.7.1] - 2023-07-27

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions src/ic-cdk-macros/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ fn dfn_macro(

#[cfg(feature = "export_candid")]
let candid_method_attr = match method {
MethodType::Query => {
quote! { #[::candid::candid_method(query, rename = #function_name)] }
MethodType::Query if attrs.composite => {
quote! { #[::candid::candid_method(composite_query, rename = #function_name)] }
}
MethodType::Query => quote! { #[::candid::candid_method(query, rename = #function_name)] },
MethodType::Update => {
quote! { #[::candid::candid_method(update, rename = #function_name)] }
}
Expand Down

0 comments on commit e64b923

Please sign in to comment.