File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
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(`
2
+ // // make a request
3
+ // req := graphql.NewRequest(`
6
4
// query ($key: String!) {
7
5
// items (id:$key) {
8
6
// field1
11
9
// }
12
10
// }
13
11
// `)
14
- // r.Var("key", "value")
12
+ //
13
+ // // set any variables
14
+ // req.Var("key", "value")
15
+ //
16
+ // // get a context
17
+ // ctx := context.Background()
18
+ // ctx := graphql.NewContext(ctx, "https://machinebox.io/graphql")
19
+ //
20
+ // // run it and capture the response
15
21
// var respData ResponseStruct
16
- // if err := r .Run(ctx, &respData); err != nil {
22
+ // if err := req .Run(ctx, &respData); err != nil {
17
23
// log.Fatalln(err)
18
24
// }
19
25
package graphql
You can’t perform that action at this time.
0 commit comments