Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CartGraphQL = graphql.NewObject( graphql.ObjectConfig{ Name: "Cart", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.Int, }, "items_id": &graphql.Field{ Type: graphql.Int, }, "quantity": &graphql.Field{ Type: graphql.Int, }, "updated_at": &graphql.Field{ Type: graphql.DateTime, }, "created_at": &graphql.Field{ Type: graphql.DateTime, }, }, }, )
CartGraphQL holds order information with graphql object
View Source
var OrderGraphQL = graphql.NewObject( graphql.ObjectConfig{ Name: "Order", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.Int, }, "total_price": &graphql.Field{ Type: graphql.Float, }, "updated_at": &graphql.Field{ Type: graphql.DateTime, }, "created_at": &graphql.Field{ Type: graphql.DateTime, }, }, }, )
OrderGraphQL holds order information with graphql object
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver interface { Placeholder(params graphql.ResolveParams) (interface{}, error) AddCart(params graphql.ResolveParams) (interface{}, error) ConfirmOrder(params graphql.ResolveParams) (interface{}, error) }
func NewResolver ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
Schema is struct which has method for Query and Mutation. Please init this struct using constructor function.
Click to show internal directories.
Click to hide internal directories.