Last active
October 29, 2022 13:46
-
-
Save VictorKabata/e30863277eb4afd714070c1e68f25d5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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