graphql-client
graphql-client copied to clipboard
Call and consume GraphQL APIs with type safe queries and responses
This PR switches JSON object derivation from manually creating the required JSON object to using Aeson's template haskell facilities. This opens up the door for user-defined derivation strategies via [Aeson's...
Fragments should also have their type generated, for easy reference. e.g. ```graphql query GetUser { user { ... UserFragment } } fragment UserFragment on User { ... } ``` should...
All generated modules (API + enums) should include ``` {-# OPTIONS_GHC -w #-} {-# ANN module "HLint: ignore" #-} ``` So that we don't get any GHC warnings (that could...
Queries without arguments currently render as ``` {----------------------------------------------------------------------------- * getCharacters -- result :: Object GetCharactersSchema; throws a GraphQL exception on errors result
If `apiModule` is `A.B.C`, we should default `enumsModule` to `A.B.Enums`
A query ```graphql query getFoo($input: MyInput) { ... } ``` where `MyInput` is ```graphql input MyInput { foo: Int } ``` should generate ```haskell data MyInput = MyInput { _foo...
Before: GraphQLException [GraphQLError {message = "Something went wrong!", locations = Just [GraphQLErrorLoc {errorLine = 10, errorCol = 3}], path = Just [String "my_query.graphql"], extensions = Just (Object (fromList [("complexity",Number 2.0)]))}]...
This means that `GraphQLErrors` are difficult to deal with, cannot be wrapped as a `SomeException`, and have no `displayException` function to display them nicely.