shopify_draft_proxy/proxy/media
Files API and staged-upload port of src/proxy/media.ts.
Types
pub type MediaError {
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_media_query(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, MediaError)
pub fn is_media_mutation_root(name: String) -> Bool
pub fn is_media_query_root(name: String) -> Bool
pub fn process(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, MediaError)
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, MediaError)
pub fn process_mutation_with_upstream(
store: store.Store,
identity: synthetic_identity.SyntheticIdentityRegistry,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
upstream: upstream_query.UpstreamContext,
) -> Result(MutationOutcome, MediaError)