File tree 3 files changed +30
-31
lines changed
3 files changed +30
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Package graphql provides a low level GraphQL client.
2
+ //
3
+ // // create a client (safe to share across requests)
4
+ // client := graphql.NewClient("https://machinebox.io/graphql")
5
+ //
6
+ // // make a request
7
+ // req := graphql.NewRequest(`
8
+ // query ($key: String!) {
9
+ // items (id:$key) {
10
+ // field1
11
+ // field2
12
+ // field3
13
+ // }
14
+ // }
15
+ // `)
16
+ //
17
+ // // set any variables
18
+ // req.Var("key", "value")
19
+ //
20
+ // // run it and capture the response
21
+ // var respData ResponseStruct
22
+ // if err := client.Run(ctx, req, &respData); err != nil {
23
+ // log.Fatal(err)
24
+ // }
25
+ //
26
+ // Specify client
27
+ //
28
+ // To specify your own http.Client, use the WithHTTPClient option:
29
+ // httpclient := &http.Client{}
30
+ // client := graphql.NewClient("https://machinebox.io/graphql", graphql.WithHTTPClient(httpclient))
1
31
package graphql
2
32
3
33
import (
File renamed without changes.
You can’t perform that action at this time.
0 commit comments