2

I'm using github.com/99designs/gqlgen to generate my server side Go code. This works correctly and I am able to interact with my queries, mutations, etc... using the built in GraphQL Playground.

Now I'm trying to write tests in Go for the server. The tests have access to all the GraphQL generated code but I can't figure out how to take advantage of that in my test: my tests in this case are acting as a client.

I've researched this in various places and the closest thing I've found is this: https://github.com/machinebox/graphql but in the only example they provide it looks like they are manually constructing the request.

This is my first GraphQL project and I'm still learning so perhaps I'm missing something here. My understanding was that using GraphQL I define a schema that then generates language specific code (go, swift, java, etc...). I then take that generated code and use it to interact with a server. Is there a GraphQL client out there that I'm just not finding?

Przemek Lach
  • 1,348
  • 2
  • 19
  • 42

0 Answers0