Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootMutation = graphql.NewObject(graphql.ObjectConfig{ Name: "RootMutation", Fields: graphql.Fields{ "setMessage": &graphql.Field{ Type: graphql.String, Args: graphql.FieldConfigArgument{ "msg": &graphql.ArgumentConfig{Type: graphql.NewNonNull(graphql.String)}, }, Resolve: func(p graphql.ResolveParams) (interface{}, error) { msg := p.Args["msg"].(string) logic.SetMessage(msg) return msg, nil }, }, }, })
RootMutation ...
View Source
var RootQuery = graphql.NewObject(graphql.ObjectConfig{ Name: "RootQuery", Fields: graphql.Fields{ "getMessage": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { msg := logic.GetMessage() return msg, nil }, }, }, })
RootQuery ...
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.