shopify_draft_proxy/proxy/store_properties
Store Properties domain port.
Mirrors the shop/read and shopPolicyUpdate local-staging slice from
src/proxy/store-properties.ts. Other Store Properties roots remain
on the TypeScript side until their state slices are ported.
Types
pub type MutationOutcome {
MutationOutcome(
data: json.Json,
store: store.Store,
identity: synthetic_identity.SyntheticIdentityRegistry,
staged_resource_ids: List(String),
)
}
Constructors
-
MutationOutcome( data: json.Json, store: store.Store, identity: synthetic_identity.SyntheticIdentityRegistry, staged_resource_ids: List(String), )
pub type StorePropertiesError {
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)
Store Properties reads are mostly Pattern 1 under cassette-backed LiveHybrid: forward cold shop/business/location reads verbatim, but keep reads local once a mutation has staged shop, location, or publishable state. Snapshot mode continues to use the local empty null/array behavior.
pub fn is_store_properties_mutation_root(name: String) -> Bool
pub fn is_store_properties_query_root(name: String) -> Bool
pub fn primary_domain_for_id(
store: store.Store,
id: String,
) -> option.Option(types.ShopDomainRecord)
pub fn process(
store: store.Store,
document: String,
variables: dict.Dict(String, root_field.ResolvedValue),
) -> Result(json.Json, StorePropertiesError)
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, StorePropertiesError)
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, StorePropertiesError)
pub fn serialize_location_node_by_id(
store: store.Store,
id: String,
selections: List(ast.Selection),
fragments: dict.Dict(String, ast.Definition),
) -> json.Json
pub fn serialize_shop_address_node_by_id(
store: store.Store,
id: String,
selections: List(ast.Selection),
fragments: dict.Dict(String, ast.Definition),
) -> json.Json
pub fn serialize_shop_node_by_id(
store: store.Store,
id: String,
selections: List(ast.Selection),
fragments: dict.Dict(String, ast.Definition),
) -> json.Json
pub fn serialize_shop_policy_node_by_id(
store: store.Store,
id: String,
selections: List(ast.Selection),
fragments: dict.Dict(String, ast.Definition),
) -> json.Json
pub fn shop_domain_source(
domain: types.ShopDomainRecord,
) -> graphql_helpers.SourceValue
pub fn shop_source(
shop: types.ShopRecord,
) -> graphql_helpers.SourceValue