shopify_draft_proxy/proxy/online_store

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

pub type OnlineStoreError {
  ParseFailed(root_field.RootFieldError)
}

Constructors

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)

Online-store cold catalog/search reads use Pattern 1 in LiveHybrid: when no local content state is staged or hydrated, forward the captured read verbatim; once content exists locally, keep the read local so staged synthetic IDs and read-after-write overlays remain visible. Counts are the exception below: local lifecycle reads add a narrow upstream baseline count.

pub fn is_online_store_mutation_root(name: String) -> Bool
pub fn is_online_store_query_root(
  name: String,
  query: String,
) -> Bool
pub fn local_has_online_store_content_id(
  proxy: proxy_state.DraftProxy,
  variables: dict.Dict(String, root_field.ResolvedValue),
) -> Bool
pub fn process(
  store: store.Store,
  document: String,
  variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, OnlineStoreError)
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, OnlineStoreError)
pub fn wrap_data(data: json.Json) -> json.Json
Search Document