shopify_draft_proxy/proxy/orders
Incremental Orders-domain port.
This module is being expanded slice-by-slice from executable parity fixtures. Broad order creation/payment, order editing, fulfillment creation, and returns remain intentionally narrow until their lifecycle effects are modeled together.
Types
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), )
pub type OrdersError {
ParseFailed(root_field.RootFieldError)
}
Constructors
-
ParseFailed(root_field.RootFieldError)
Values
pub fn handle_query_request(
proxy: proxy_state.DraftProxy,
request: proxy_state.Request,
parsed: parse_operation.ParsedOperation,
primary_root_field: String,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> #(proxy_state.Response, proxy_state.DraftProxy)
Pattern 1 for cold LiveHybrid orders reads: if no local staged orders state can affect the result, forward the read verbatim to the cassette/upstream. Snapshot mode and locally staged order/draft-order lifecycles stay local.
pub fn is_orders_mutation_root(name: String) -> Bool
pub fn is_orders_query_root(name: String) -> Bool
pub fn process(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, OrdersError)
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, OrdersError)
pub fn process_mutation_with_upstream(
store: store.Store,
identity: synthetic_identity.SyntheticIdentityRegistry,
request_path: String,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
upstream: upstream_query.UpstreamContext,
) -> Result(MutationOutcome, OrdersError)