Tag: graphql-go

  • Graphql-go Has No Built-In Validation For Argument/Variables Passed On?

    Graphql-go Has No Built-In Validation For Argument/Variables Passed On?

    1 I am building golang graphql endpoint with graphql-go https://github.com/graphql-go/graphql Here is chunk of my resolver.go func GetRootMutation(db *gorm.DB, req *http.Request) *graphql.Object { rootMutation := graphql.NewObject(graphql.ObjectConfig{ Name: "RootMutation", Fields: graphql.Fields{ "send_otp_email": SendOtpEmail(db, req), }, }) return rootMutation } func SendOtpEmail(db *gorm.DB, req *http.Request) *graphql.Field { return &graphql.Field{ Type: graphqlGlobal.ResultType, Description: "Send OTP to user’s email.",…