Skip to content

Commit b5b2e52

Browse files
committed
added doc
1 parent db3b688 commit b5b2e52

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Package graphql provides a low level GraphQL client.
2+
//
3+
// ctx := context.Background()
4+
// ctx = graphql.NewContext(ctx, "https://machinebox.io/graphql")
5+
// r := graphql.NewRequest(`
6+
// query ($key: String!) {
7+
// items (id:$key) {
8+
// field1
9+
// field2
10+
// field3
11+
// }
12+
// }
13+
// `)
14+
// r.Var("key", "value")
15+
// var res ResponseStruct
16+
// if err := r.Run(ctx, &resp); err != nil {
17+
// log.Fatalln(err)
18+
// }
19+
package graphql

0 commit comments

Comments
 (0)