Last active
January 2, 2019 12:38
-
-
Save karthikraobr/eb249b1196b5fbd99f2f9ac95e381a00 to your computer and use it in GitHub Desktop.
GQL Schema
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)) | |
}, | |
}, | |
}, | |
}) |
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
type Query { | |
account(id: Int!): Account | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment