Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ObjectID = graphql.NewScalar(graphql.ScalarConfig{ Name: "BSON", Description: "bson scalar type represents a BSON Object", Serialize: func(value interface{}) interface{} { switch value := value.(type) { case primitive.ObjectID: return value.Hex() case *primitive.ObjectID: v := value return v.Hex() default: return nil } }, ParseValue: func(value interface{}) interface{} { switch value := value.(type) { case string: id, _ := primitive.ObjectIDFromHex(value) return id case *string: id, _ := primitive.ObjectIDFromHex(*value) return id default: return nil } }, ParseLiteral: func(valueAST ast.Value) interface{} { switch valueAST := valueAST.(type) { case *ast.StringValue: id, _ := primitive.ObjectIDFromHex(valueAST.Value) return id } return nil }, })
View Source
var TodoList []todo.Todo
Functions ¶
func ExecuteQueryGraphql ¶
func ExecuteQueryGraphql(w http.ResponseWriter, r *http.Request)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.