Documentation
¶
Overview ¶
Package selections is for internal use to share selection context between the execution engine and the public graphql package without creating an import cycle.
The execution layer stores the flattened child selection set for the field currently being resolved. The public API converts this into user-friendly helpers (SelectedFieldNames, etc.).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lazy ¶
type Lazy struct {
// contains filtered or unexported fields
}
Lazy holds raw selections and computes the flattened, deduped name list once on demand.
func FromContext ¶
FromContext retrieves the lazy wrapper (may be nil).
func (*Lazy) Args ¶
Args returns the argument map for the first occurrence of the provided dot-delimited field path under the current resolver. The boolean reports if a matching field was found. The returned map MUST NOT be mutated by callers (it is the internal map). Paths follow the same format produced by SelectedFieldNames (e.g. "books", "books.reviews").
func (*Lazy) DecodeArgsInto ¶
DecodeArgsInto decodes the argument map for the dot path into dst (pointer to struct). Returns (true,nil) if decoded, (false,nil) if path missing. Caches per path+type.