MCPcopy Create free account
hub / github.com/Shopify/function-examples / run

Function run

checkout/rust/delivery-customization/default/src/run.rs:17–28  ·  view source on GitHub ↗
(input: input::ResponseData)

Source from the content-addressed store, hash-verified

15
16#[shopify_function_target(query_path = "src/run.graphql", schema_path = "schema.graphql")]
17fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
18 let no_changes = output::FunctionRunResult { operations: vec![] };
19
20 let _config = match input.delivery_customization.metafield {
21 Some(input::InputDeliveryCustomizationMetafield { value }) => {
22 Configuration::from_str(&value)
23 }
24 None => return Ok(no_changes),
25 };
26
27 Ok(output::FunctionRunResult { operations: vec![] })
28}
29
30#[cfg(test)]
31mod tests {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected