Created
December 31, 2018 12:40
-
-
Save karthikraobr/ede4a389f00ebb3cb6ab99f0d1f2df22 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
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Query", | |
Fields: graphql.Fields{ | |
"account": &graphql.Field{ | |
Resolve: func(p graphql.ResolveParams) (interface{}, error) { | |
return mydb.FindBriefById(p.Args["id"].(int)) | |
}, | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment