shurcooL / graphql

Package graphql provides a GraphQL client implementation.
MIT License
708 stars 282 forks source link

Add methods allowing user-defined query. #14

Closed eric-am closed 6 years ago

eric-am commented 6 years ago

Sometimes you want to use a wide variety of queries with the same types. In this case, the queries generated from the existing types and their tags are not quite what you want. So, while writing the queries manually is less fun than letting the query generator take care of it for you, it can still be useful! This change adds methods to the client with both an object to populate, and an already-made query string.

The operationType enum is removed, because all uses of it coincidentally disappeared when we moved the query generation calls out from the 'do' func.