Skip to content

Instantly share code, notes, and snippets.

@VictorKabata
Last active October 29, 2022 13:46
Show Gist options
  • Save VictorKabata/e30863277eb4afd714070c1e68f25d5e to your computer and use it in GitHub Desktop.
Save VictorKabata/e30863277eb4afd714070c1e68f25d5e to your computer and use it in GitHub Desktop.
func main() {
fmt.Println("Starting graphql server...")
noteType := graphql.NewObject(
graphql.ObjectConfig{
Name: "Note",
Description: "User generated note",
Fields: graphql.Fields{
"id": &graphql.Field{
Type: graphql.Int,
},
"title": &graphql.Field{
Type: graphql.String,
},
"description": &graphql.Field{
Type: graphql.String,
},
"created_at": &graphql.Field{
Type: graphql.String,
},
// Addition fields
},
},
)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment