internal library

Internals of sling_gql: the pieces the runtime, its tests and future adapters (persistence, subscriptions) are built from, kept out of package:sling_gql/sling_gql.dart so the app-facing surface stays small.

No stability promise: anything here can change in a minor release.

Classes

CacheWrite
Description of one manual write (launch.favorite = true), enough to undo it: the previous value is missing when the path did not exist.
ListLocator
Implemented by recorders that need to know where each object list read through them lives in the cache (CacheScope.list uses it to edit the list its selector returned). Accessor.list reports every read: the list's cache path and the value it returned to the caller.
MutationScope
Recorder for one mutate call. Misses are expected (nothing is cached before the mutation runs) and never trigger a fetch.
NormalizedCache
Entity-normalized store: { "ROOT_QUERY": {...}, "Launch:launch-181": {...} }.
Ref
A reference to a normalized entity, stored in place of the object itself.
RowScope
A sub-scope of a QueryScope for one part of its tree — typically one row of a long list — that rebuilds on its own (SlingRow is the widget form).
SubscriptionScope
Recorder for one SlingClient.subscribeWith call. The body runs once to record the selection (misses are expected and never fetch); the same scope is then used to compute each event's value from the cache.

Constants

missing → const _Missing
Sentinel returned by Cache.read when a path does not exist.

Functions

debugOwnerLabel(BuildContext context) → String?
Debug-mode name for a sling widget's scope: the type of the nearest enclosing app widget (LaunchesScreen), found by walking up to the SlingScope past render/proxy widgets and sling's own. null in release builds (type names are minified there), when the widget sits right under the SlingScope, or when there is none.
depKey(String entity, String field) → String
Dependency key for field on entity entity — the currency used to tell scopes what changed (ROOT_QUERY.launches_c0y93u18lig6v, Launch:launch-181.name).
elementDepKey(String entity, String field, int index) → String
Dependency key for element index of the list held by field on entity (Launch:launch-181.links[2]): what a read through an inline element (not a Ref) records instead of depKey, so a change to one element rebuilds its readers only. Readers through a Ref element keep depKey. Lists nested deeper (in an element, in an inline object) are part of the element / field holding them.
lengthDepKey(String entity, String field) → String
Dependency key for the length of the list held by field on entity (Launch:launch-181.links[length]): what Accessor.list of inline objects records instead of depKey — it builds one accessor per index and reads nothing else. Touched when the length changes or the list is replaced by something else.