Documentation ¶
Overview ¶
Package gqlsingleton provides singleton objects in GraphQL server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance interface { comparable io.Closer }
Instance is the type constraint of Singleton.
type Singleton ¶
Singleton represents a single instance GraphQL object.
func (*Singleton[T]) CreateWith ¶
func (s *Singleton[T]) CreateWith(f func(p graphql.ResolveParams) (value T, e error)) graphql.FieldResolveFn
CreateWith wraps a create object mutation resolver with singleton lock.
func (*Singleton[T]) NodeConfig ¶
func (s *Singleton[T]) NodeConfig() (nc gqlserver.NodeConfig[T])
NodeConfig returns NodeConfig with callback functions.
Click to show internal directories.
Click to hide internal directories.