Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RoleType = graphql.NewObject(graphql.ObjectConfig{ Name: "Role", Fields: graphql.Fields{ "id": &graphql.Field{Type: graphql.Int}, "name": &graphql.Field{Type: graphql.String}, }, })
RoleType is the GraphQL schema for the user type.
View Source
var UserType = graphql.NewObject(graphql.ObjectConfig{ Name: "User", Fields: graphql.Fields{ "id": &graphql.Field{Type: graphql.Int}, "firstname": &graphql.Field{Type: graphql.String}, "lastname": &graphql.Field{Type: graphql.String}, "roles": &graphql.Field{ Type: graphql.NewList(RoleType), Resolve: func(params graphql.ResolveParams) (interface{}, error) { var roles []Role return roles, nil }, }, }, })
UserType is the GraphQL schema for the user type.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.