Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ $ go get github.com/machinebox/graphql
```go
import "context"

type Items {
field1 string
field2 string
field2 string
ID string `json:"_id"` // GQL fields may be renamed as per normal json
}

type ResponseStruct struct {
items Items
}

// create a client (safe to share across requests)
client := graphql.NewClient("https://machinebox.io/graphql")

Expand All @@ -31,6 +42,7 @@ req := graphql.NewRequest(`
field1
field2
field3
_id
}
}
`)
Expand Down