Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Message string `json:"message"`
Path []interface{} `json:"path,omitempty"`
}
Error represents a GraphQL error
type FieldResolveFn ¶
type FieldResolveFn func(p ResolveParams) (interface{}, error)
FieldResolveFn is a function that resolves a field value
type ModuleResolvers ¶
type ModuleResolvers interface {
QueryResolvers() map[string]FieldResolveFn
MutationResolvers() map[string]FieldResolveFn
SubscriptionResolvers() map[string]SubscriptionResolveFn
TypeResolvers() map[string]map[string]FieldResolveFn
}
ModuleResolvers is the interface that all module resolvers must implement This provides a clean, modular approach to organizing resolvers
type ResolveInfo ¶
type ResolveInfo struct {
FieldName string
Path []string
ParentType string
ReturnType string
SelectionSet interface{} // Will be wundergraph AST selection set
}
ResolveInfo contains metadata about the field being resolved
type ResolveParams ¶
type ResolveParams struct {
Source interface{}
Args map[string]interface{}
Context context.Context
Info ResolveInfo
}
ResolveParams contains all the information for resolving a field
type Result ¶
type Result struct {
Data interface{} `json:"data,omitempty"`
Errors []Error `json:"errors,omitempty"`
}
Result represents the result of a GraphQL operation
type SubscriptionResolveFn ¶
type SubscriptionResolveFn func(p ResolveParams) (<-chan interface{}, error)
SubscriptionResolveFn is a function that resolves a subscription field It returns a channel that emits values over time
Click to show internal directories.
Click to hide internal directories.