Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

thosakwe
Copy link
Contributor

This PR allows Rust Functions to use the new MetaField.jsonValue field, of type JSON!:

https://shopify.dev/changelog/new-metafield-jsonvalue-field

Without this, you get the following errors from cargo:

error[E0412]: cannot find type `JSON` in module `super`
  --> PATH_TO_FUNCTION_FILE.rs:7:1
   |
7  | / generate_types!(
8  | |     query_path = "PATH_TO_INPUT_QUERY.graphql",
9  | |     schema_path = "PATH_TO_SCHEMA.graphql"
10 | | );
   | |_^ not found in `super`
   |
note: type alias `crate::input::JSON` exists but is inaccessible
  --> PATH_TO_FUNCTION_FILE.rs:28:1
   |
28 | / generate_types!(
29 | |     query_path = "PATH_TO_INPUT_QUERY.graphql",
30 | |     schema_path = "PATH_TO_SCHEMA.graphql"
31 | | );
   | |_^ not accessible
   = note: this error originates in the derive macro `graphql_client::GraphQLQuery` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0369]: binary operation `==` cannot be applied to type `std::option::Option<input::InputDiscountNodeMetafield>`
  --> PATH_TO_FUNCTION_FILE.rs:7:1
   |
7  | / generate_types!(
8  | |     query_path = "PATH_TO_INPUT_QUERY.graphql",
9  | |     schema_path = "PATH_TO_SCHEMA.graphql"
10 | | );
   | |_^
   |
   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

@andrewhassan andrewhassan requested a review from adampetro October 7, 2024 13:36
@andrewhassan andrewhassan merged commit 9db2794 into Shopify:main Oct 8, 2024
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.

3 participants