Documentation
¶
Overview ¶
Package appsyncgraphql routes native Lambda AppSync GraphQL invocations.
Index ¶
- func AWSDate(now time.Time, timezoneOffset ...float64) (string, error)
- func AWSDateTime(now time.Time, timezoneOffset ...float64) (string, error)
- func AWSTime(now time.Time, timezoneOffset ...float64) (string, error)
- func AWSTimestamp(now time.Time) int64
- func MakeID() (string, error)
- type BatchOptions
- type Event
- type ExceptionHandler
- type Handler
- type InvalidBatchResponseException
- type NamedError
- type Options
- type Resolver
- type ResolverNotFoundException
- type Router
- func (r *Router) IncludeRouter(routers ...*Router)
- func (r *Router) OnBatchMutation(field string, handler Handler, options ...BatchOptions)
- func (r *Router) OnBatchQuery(field string, handler Handler, options ...BatchOptions)
- func (r *Router) OnBatchResolver(typeName, field string, handler Handler, options ...BatchOptions)
- func (r *Router) OnException(names []string, handler ExceptionHandler)
- func (r *Router) OnMutation(field string, handler Handler)
- func (r *Router) OnQuery(field string, handler Handler)
- func (r *Router) OnResolver(typeName, field string, handler Handler)
- type TypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSTimestamp ¶
AWSTimestamp floors seconds since the Unix epoch, including negative instants. Scalar helpers take an explicit clock value to keep applications deterministic.
Types ¶
type BatchOptions ¶
BatchOptions defaults to aggregate execution, as in TypeScript. Individual selects sequential per-event execution; failures become null unless ThrowOnError.
type Handler ¶
Handler receives arguments and the complete event. Aggregate batch handlers receive the complete event slice in both positions. Context is never replaced.
type InvalidBatchResponseException ¶
InvalidBatchResponseException reports a non-array aggregate result.
func (*InvalidBatchResponseException) Error ¶
func (e *InvalidBatchResponseException) Error() string
func (*InvalidBatchResponseException) ErrorName ¶
func (e *InvalidBatchResponseException) ErrorName() string
func (*InvalidBatchResponseException) Unwrap ¶
func (e *InvalidBatchResponseException) Unwrap() error
type NamedError ¶
NamedError supplies the reference error name without coupling to another utility.
func (*NamedError) Error ¶
func (e *NamedError) Error() string
func (*NamedError) ErrorName ¶
func (e *NamedError) ErrorName() string
func (*NamedError) Unwrap ¶
func (e *NamedError) Unwrap() error
type Resolver ¶
type Resolver struct{ *Router }
type ResolverNotFoundException ¶
ResolverNotFoundException bypasses registered exception handlers. Its concrete type name also preserves errorType in the Go Lambda Runtime API response.
func (*ResolverNotFoundException) Error ¶
func (e *ResolverNotFoundException) Error() string
func (*ResolverNotFoundException) ErrorName ¶
func (e *ResolverNotFoundException) ErrorName() string
func (*ResolverNotFoundException) Unwrap ¶
func (e *ResolverNotFoundException) Unwrap() error
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router owns ordered registries. Configure routes before serving requests. Concurrent lookups and registration are safe; inclusion copies registrations.
func (*Router) IncludeRouter ¶
IncludeRouter merges in order, replacing collisions without sharing registries.
func (*Router) OnBatchMutation ¶
func (r *Router) OnBatchMutation(field string, handler Handler, options ...BatchOptions)
func (*Router) OnBatchQuery ¶
func (r *Router) OnBatchQuery(field string, handler Handler, options ...BatchOptions)
func (*Router) OnBatchResolver ¶
func (r *Router) OnBatchResolver(typeName, field string, handler Handler, options ...BatchOptions)
func (*Router) OnException ¶
func (r *Router) OnException(names []string, handler ExceptionHandler)
OnException registers exact error names, not inheritance or predicate matching.