Selecto.Domain.Examples.Compatibility (Selecto v0.4.6)

Copy Markdown

Compatibility artifacts and expectations for canonical domain examples.

The examples themselves live in Selecto.Domain.Examples. This module adds a stable, package-neutral matrix that downstream packages can assert against without copying large JSON blobs into each repository.

Summary

Functions

Checks core query artifacts against the compatibility matrix.

Returns the canonical example domains keyed by stable domain id.

Returns the stable semantic expectations for each canonical domain.

Builds a JSON-safe core query-contract artifact for one canonical domain.

Builds JSON-safe core query-contract artifacts for all canonical domains.

Summarizes a JSON-safe query artifact into stable semantic ids.

Functions

check()

@spec check() :: :ok | {:error, [map()]}

Checks core query artifacts against the compatibility matrix.

domains()

@spec domains() :: %{required(atom()) => map()}

Returns the canonical example domains keyed by stable domain id.

expectations()

@spec expectations() :: %{required(atom()) => map()}

Returns the stable semantic expectations for each canonical domain.

query_contract_artifact(domain_id, domain, opts \\ [])

@spec query_contract_artifact(atom(), map(), keyword()) ::
  {:ok, map()} | {:error, Selecto.Domain.Diagnostics.t()}

Builds a JSON-safe core query-contract artifact for one canonical domain.

query_contract_artifacts(opts \\ [])

@spec query_contract_artifacts(keyword()) :: {:ok, map()} | {:error, map()}

Builds JSON-safe core query-contract artifacts for all canonical domains.

query_summary(artifact)

@spec query_summary(map()) :: map()

Summarizes a JSON-safe query artifact into stable semantic ids.