shopify_draft_proxy/proxy/marketing
Mirrors the locally staged core of src/proxy/marketing.ts.
This port moves Marketing beyond the empty-read stub: activity/event reads are backed by the normalized store, connection filters/sorting are evaluated locally, and supported Marketing mutations stage activity, event, and engagement records without runtime Shopify writes.
Types
pub type MarketingError {
ParseFailed(root_field.RootFieldError)
}
Constructors
-
ParseFailed(root_field.RootFieldError)
pub type MutationOutcome {
MutationOutcome(
data: json.Json,
store: store.Store,
identity: synthetic_identity.SyntheticIdentityRegistry,
staged_resource_ids: List(String),
log_drafts: List(mutation_helpers.LogDraft),
)
}
Constructors
-
MutationOutcome( data: json.Json, store: store.Store, identity: synthetic_identity.SyntheticIdentityRegistry, staged_resource_ids: List(String), log_drafts: List(mutation_helpers.LogDraft), )
Values
pub fn handle_marketing_query(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, MarketingError)
pub fn hydrate_marketing_from_upstream_payload(
store: store.Store,
payload: graphql_helpers.SourceValue,
) -> store.Store
pub fn is_marketing_mutation_root(name: String) -> Bool
pub fn is_marketing_query_root(name: String) -> Bool
pub fn process(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, MarketingError)
pub fn process_mutation(
store: store.Store,
identity: synthetic_identity.SyntheticIdentityRegistry,
request_path: String,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(MutationOutcome, MarketingError)