resolver

package
v0.0.0-...-312545f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	DB *database.DB
}

Resolver is the root resolver for the graphql query

func (*Resolver) User

func (r *Resolver) User(ctx context.Context, args struct{ ID graphql.ID }) (*UserResolver, error)

User finds the user by their id

type UserResolver

type UserResolver struct {
	// contains filtered or unexported fields
}

UserResolver contains the database and the user model to resolve the graphql query against

func (*UserResolver) Email

func (u *UserResolver) Email(ctx context.Context) string

Email resolves the email attribute of the user

func (*UserResolver) ID

func (u *UserResolver) ID(ctx context.Context) graphql.ID

ID resolves the ID attribute of the user

func (*UserResolver) Name

func (u *UserResolver) Name(ctx context.Context) *string

Name resolves the full name of the user

func (*UserResolver) NameFirst

func (u *UserResolver) NameFirst(ctx context.Context) *string

NameFirst resolves the first name of the user

func (*UserResolver) NameLast

func (u *UserResolver) NameLast(ctx context.Context) *string

NameLast resolves the last name of the user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL