machinebox / graphql

Simple low-level GraphQL HTTP client for Go
https://blog.machinebox.io/a-graphql-client-library-for-go-5bffd0455878
Apache License 2.0
933 stars 217 forks source link

does this library work for mutation? #45

Closed abhsinh2 closed 4 years ago

abhsinh2 commented 4 years ago

query := mutation ($activeIp: String!) { registerActive(regReq:{ active: { ip:$active } }) { status } }

req := graphql.NewRequest(query) req.Var("active", "1.1.1.1")

while sending I get: graphql: name 'json' is not defined