Skip to content

Support Wasm API#130

Merged
adampetro merged 31 commits into
mainfrom
ap.bluejay-wasm-api
May 16, 2025
Merged

Support Wasm API#130
adampetro merged 31 commits into
mainfrom
ap.bluejay-wasm-api

Conversation

@adampetro

Copy link
Copy Markdown
Contributor

Apologies for the chaos of the commit history. I will squash this down before merging.

At a high level, this does the following:

  • removes the generate_types and shopify_function_target macros
  • adds the typegen macro as well as a Deserialize derive macro for deriving shopify_function_wasm_api::Deserialize for configuration metafield structs
  • modifies the shopify_function macro to behave more similarly to how shopify_function_target previously did, in terms of adding a separate export function instead of using main.

I am probably missing some documentation updates and exhaustiveness of tests, and I will continue to audit that, but thought I would open it up for an initial review.

The integration tests will fail until we have a 8.0.0 release of function-runner that supports the Wasm API.

Comment thread shopify_function_macro/src/lib.rs Outdated
Comment thread example_with_targets/README.md Outdated
Comment thread example_with_targets/README.md Outdated
Comment thread example_with_targets/README.md Outdated
Comment thread example/src/main.rs
Comment thread example_with_targets/src/lib.rs
Comment thread shopify_function/Cargo.toml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread shopify_function_macro/src/lib.rs Outdated
Comment thread shopify_function_macro/src/lib.rs Outdated
Comment thread shopify_function/README.md Outdated
```rust
#[typegen("./schema.graphql")]
pub mod schema {
#[query("./input.graphlq")]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[query("./input.graphlq")]
#[query("./input.graphql")]

@saulecabrera saulecabrera left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks for iterating on this. I'll leave the final approval to Andrew, since I believe there are still a couple of open items.

Comment thread shopify_function/README.md Outdated
@adampetro adampetro merged commit 977af07 into main May 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants