Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error[K comparable] interface { error Key() K }
type Fetcher ¶
type Fetcher[K comparable, V any] func([]K) (map[K]V, error)
The Fetcher function should take a list of keys and return a map of keys to values. This may involve network requests or other slow or expensive calls.
type Loader ¶
type Loader[K comparable, V any] struct { // contains filtered or unexported fields }
Loader is a generic implementation of the GraphQL "data loader" pattern that collapses several individual lookups by a key into one lookup as a list.
Click to show internal directories.
Click to hide internal directories.