shopify_draft_proxy/proxy/localization

Mirrors the localization slice of src/proxy/localization.ts.

Pass 23 ships:

Types

pub type LocalizationError {
  ParseFailed(root_field.RootFieldError)
}

Constructors

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

Values

pub fn handle_localization_query(
  store_in: store.Store,
  document: String,
  variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, LocalizationError)
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 2: cold LiveHybrid localization reads need the captured upstream product/source-content slice before local translation mutations can validate digests and stage read-after-write effects. Once any localization/product state exists, stay local so staged locale and translation changes are not bypassed by passthrough.

pub fn is_localization_mutation_root(name: String) -> Bool
pub fn is_localization_query_root(name: String) -> Bool
pub fn process(
  store_in: store.Store,
  document: String,
  variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, LocalizationError)
pub fn process_mutation(
  store_in: store.Store,
  identity: synthetic_identity.SyntheticIdentityRegistry,
  request_path: String,
  document: String,
  variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(MutationOutcome, LocalizationError)
pub fn wrap_data(data: json.Json) -> json.Json
Search Document