Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct {
}
type Config ¶
type Config = graphql.Config[ResolverRoot, DirectiveRoot, ComplexityRoot]
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type LegacyFilters ¶
type LegacyFilters struct {
Name *string `json:"name,omitempty"`
}
func UnmarshalLegacyFilters ¶
func UnmarshalLegacyFilters(ctx context.Context, raw any) (*LegacyFilters, error)
UnmarshalLegacyFilters unmarshals raw into the LegacyFilters input type, using the unmarshaler bound to ctx's request. Call it from a resolver to decode an input object that was not passed as a field argument.
ctx must come from a gqlgen request; outside one there is no unmarshaler to use and the returned error says so.
type QueryResolver ¶
type QueryResolver interface {
Search(ctx context.Context, filters SearchFilters) (string, error)
Legacy(ctx context.Context, filters LegacyFilters) (string, error)
}
type Resolver ¶
type Resolver struct{}
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface {
Query() QueryResolver
}
type SearchFilters ¶
type SearchFilters struct {
Name *string `json:"name,omitempty"`
Limit *int `json:"limit,omitempty"`
}
func UnmarshalSearchFilters ¶
func UnmarshalSearchFilters(ctx context.Context, raw any) (*SearchFilters, error)
UnmarshalSearchFilters unmarshals raw into the SearchFilters input type, using the unmarshaler bound to ctx's request. Call it from a resolver to decode an input object that was not passed as a field argument.
ctx must come from a gqlgen request; outside one there is no unmarshaler to use and the returned error says so.