Skip to content

Support Wasm API #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
May 16, 2025
Merged

Support Wasm API #130

merged 31 commits into from
May 16, 2025

Conversation

adampetro
Copy link
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.

```rust
#[typegen("./schema.graphql")]
pub mod schema {
#[query("./input.graphlq")]
Copy link
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")]

Copy link
Member

@saulecabrera saulecabrera left a comment

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.

@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