graph

package
v0.0.0-...-d57fdd4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GqlNewCartItemToProto

func GqlNewCartItemToProto(item *model.NewCartItem, userId string) *proto.NewCartItem

func GqlNewProductToProto

func GqlNewProductToProto(product *model.NewProduct) *proto.NewProduct

func GqlNewUserToProto

func GqlNewUserToProto(user *model.NewUser) *proto.NewUser

func ProtoCartItemToGql

func ProtoCartItemToGql(item *proto.CartItem) *model.CartItem

func ProtoLoginResponseToGql

func ProtoLoginResponseToGql(res *proto.LoginResponse) *model.LoginResponse

func ProtoProductToGql

func ProtoProductToGql(product *proto.Product) *model.Product

func ProtoUserToGql

func ProtoUserToGql(user *proto.User) *model.User

Types

type ContextKey

type ContextKey string
var (
	JwtContextKey ContextKey = "jwt-context-key"
)

type DirectiveFunc

type DirectiveFunc func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func IsAuthenticated

func IsAuthenticated(userService proto.UserServiceClient) DirectiveFunc

type Resolver

type Resolver struct {
	Tracer               opentracing.Tracer
	UserServiceClient    proto.UserServiceClient
	ProductServiceClient proto.ProductServiceClient
	CartServiceClient    proto.CartServiceClient
}

func (*Resolver) CartItem

func (r *Resolver) CartItem() generated.CartItemResolver

CartItem returns generated.CartItemResolver implementation.

func (*Resolver) Mutation

func (r *Resolver) Mutation() generated.MutationResolver

Mutation returns generated.MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() generated.QueryResolver

Query returns generated.QueryResolver implementation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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