graph

package
v0.0.0-...-161b44b Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: MIT Imports: 11 Imported by: 0

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 {
	Dive struct {
		SensorId   func(childComplexity int) int
		StartTime  func(childComplexity int) int
		EndTime    func(childComplexity int) int
		StartPoint func(childComplexity int) int
		EndPoint   func(childComplexity int) int
		SensorData func(childComplexity int) int
	}

	GeoPoint struct {
		Lat  func(childComplexity int) int
		Long func(childComplexity int) int
	}

	Query struct {
		Dives func(childComplexity int) int
	}

	SensorData struct {
		Depth       func(childComplexity int) int
		RawPressure func(childComplexity int) int
		RawTemp     func(childComplexity int) int
		Temp        func(childComplexity int) int
		Time        func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type DiveResolver

type DiveResolver interface {
	StartTime(ctx context.Context, obj *model.Dive) (int, error)
	EndTime(ctx context.Context, obj *model.Dive) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Dives(ctx context.Context) ([]*model.Dive, error)
}

type Resolver

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

func NewResolver

func NewResolver(diveInt model.DiveInterface) Resolver

NewResolver will return a resolver with all the necessary dependencies

func (*Resolver) Dive

func (r *Resolver) Dive() DiveResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

type ResolverRoot

type ResolverRoot interface {
	Dive() DiveResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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