diff --git a/README.md b/README.md index 2836c7e..cce8c66 100644 --- a/README.md +++ b/README.md @@ -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") @@ -31,6 +42,7 @@ req := graphql.NewRequest(` field1 field2 field3 + _id } } `)