package graphql import "gshopper.com/gshopify/customer/graphql/generated" var ( ErrTokenNotExists = ErrToken("access token does not exist") ErrTokenExpired = ErrToken("access token has been expired") ErrToken = func(s string) *generated.UserError { return &generated.UserError{ Field: []string{"customerAccessToken"}, Message: s, } } ) func CustomerError(code generated.CustomerErrorCode, err error, fields ...string) *generated.CustomerUserError { return &generated.CustomerUserError{ Code: &code, Field: fields, Message: err.Error(), } }