shopify_draft_proxy/proxy/bulk_operations
Mirrors the locally staged foundation of src/proxy/bulk-operations.ts.
This pass ports the BulkOperation state/read/cancel/run-query/import
foundation: singular reads, catalog reads with cursor windows, current
operation derivation, local bulkOperationCancel, product/productVariant
JSONL query exports, and local bulkOperationRunMutation replay for
product-domain inner mutations.
Types
pub type BulkOperationsError {
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), )
pub type UserError {
UserError(
field: option.Option(List(String)),
message: String,
code: option.Option(String),
)
}
Constructors
-
UserError( field: option.Option(List(String)), message: String, code: option.Option(String), )
Values
pub fn handle_bulk_operations_query(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, BulkOperationsError)
pub fn is_bulk_operations_mutation_root(name: String) -> Bool
pub fn is_bulk_operations_query_root(name: String) -> Bool
pub fn process(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, BulkOperationsError)
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, BulkOperationsError)
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, BulkOperationsError)