Skip to content

Commit bafdf76

Browse files
committed
simplified files
1 parent 0c03e08 commit bafdf76

File tree

3 files changed

+30
-31
lines changed

3 files changed

+30
-31
lines changed

doc.go

-31
This file was deleted.

client.go renamed to graphql.go

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
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))
131
package graphql
232

333
import (
File renamed without changes.

0 commit comments

Comments
 (0)