Documentation ¶
Index ¶
- func MakeExecutableSchema(resolvers Resolvers) graphql.ExecutableSchema
- func MarshalID(id external.ObjectID) graphql.Marshaler
- func MarshalTimestamp(t time.Time) graphql.Marshaler
- func UnmarshalID(v interface{}) (external.ObjectID, error)
- func UnmarshalTimestamp(v interface{}) (time.Time, error)
- type Address
- type Banned
- type Point
- type Resolver
- func (r *Resolver) Query_search(ctx context.Context, input SearchArgs) ([]User, error)
- func (r *Resolver) Query_user(ctx context.Context, id external.ObjectID) (*User, error)
- func (r *Resolver) User_customResolver(ctx context.Context, obj *User) (Point, error)
- func (r *Resolver) User_primitiveResolver(ctx context.Context, obj *User) (string, error)
- type Resolvers
- type SearchArgs
- type Tier
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeExecutableSchema ¶
func MakeExecutableSchema(resolvers Resolvers) graphql.ExecutableSchema
func MarshalTimestamp ¶
if the type referenced in types.json is a function that returns a marshaller we can use it to encode and decode onto any existing go type.
func UnmarshalID ¶
And the same for the unmarshaler
func UnmarshalTimestamp ¶
Unmarshal{Typename} is only required if the scalar appears as an input. The raw values have already been decoded from json into int/float64/bool/nil/map[string]interface/[]interface
Types ¶
type Point ¶
Point is serialized as a simple array, eg [1, 2]
func (Point) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface
func (*Point) UnmarshalGQL ¶
type Resolver ¶
type Resolver struct { }
func (*Resolver) Query_search ¶
func (*Resolver) Query_user ¶
func (*Resolver) User_customResolver ¶
type Resolvers ¶
type Resolvers interface { Query_user(ctx context.Context, id external.ObjectID) (*User, error) Query_search(ctx context.Context, input SearchArgs) ([]User, error) User_primitiveResolver(ctx context.Context, obj *User) (string, error) User_customResolver(ctx context.Context, obj *User) (Point, error) }
type SearchArgs ¶
func UnmarshalSearchArgs ¶
func UnmarshalSearchArgs(v interface{}) (SearchArgs, error)
type Tier ¶
type Tier uint
A custom enum that uses integers to represent the values in memory but serialize as string for graphql
func TierForStr ¶
func (Tier) MarshalGQL ¶
func (*Tier) UnmarshalGQL ¶
Click to show internal directories.
Click to hide internal directories.