Skip to content

Commit 54b0a67

Browse files
authored
Merge pull request #167 from haskell-graphql/99-module-hierarchy
Clean up module structure
2 parents 0e04745 + 9fea1f1 commit 54b0a67

30 files changed

+1400
-1221
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Breaking changes
1212
* You must use protolude 0.2.1 or later
1313
* ``Defaultable`` must now be imported from ``GraphQL.API``, rather than ``GraphQL.Resolver``,
1414
this moves ``GraphQL.API`` closer to being sufficient for API definition. (see `#149`_)
15+
* ``GraphQL.Value.ToValue`` and ``GraphQL.Value.FromValue`` modules have been removed.
16+
Import ``ToValue(..)`` and ``FromValue(..)`` from ``GraphQL.Value`` directly.
1517

1618
Improvements
1719
------------

graphql-api.cabal

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
-- see: https://github.com/sol/hpack
44
--
5-
-- hash: 2160ff0226a0b10f7166ddbcf09ec6f79dfddfd66c81244898fb1afabe36bcf8
5+
-- hash: 244f60f8e2def55fa21d6d61b793b76e26ffbe6fea3b5a4b9fee01127d32358d
66

77
name: graphql-api
88
version: 0.3.0
@@ -51,22 +51,25 @@ library
5151
exposed-modules:
5252
GraphQL
5353
GraphQL.API
54-
GraphQL.API.Enum
54+
GraphQL.Internal.API
55+
GraphQL.Internal.API.Enum
5556
GraphQL.Internal.Arbitrary
5657
GraphQL.Internal.Execution
5758
GraphQL.Internal.Name
5859
GraphQL.Internal.OrderedMap
5960
GraphQL.Internal.Output
61+
GraphQL.Internal.Resolver
6062
GraphQL.Internal.Schema
6163
GraphQL.Internal.Syntax.AST
6264
GraphQL.Internal.Syntax.Encoder
6365
GraphQL.Internal.Syntax.Parser
6466
GraphQL.Internal.Syntax.Tokens
6567
GraphQL.Internal.Validation
68+
GraphQL.Internal.Value
69+
GraphQL.Internal.Value.FromValue
70+
GraphQL.Internal.Value.ToValue
6671
GraphQL.Resolver
6772
GraphQL.Value
68-
GraphQL.Value.FromValue
69-
GraphQL.Value.ToValue
7073
other-modules:
7174
Paths_graphql_api
7275
default-language: Haskell2010

graphql-wai/src/GraphQL/Wai.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ module GraphQL.Wai
99

1010
import Protolude
1111

12-
import GraphQL (interpretAnonymousQuery)
13-
import GraphQL.API (HasObjectDefinition)
14-
import GraphQL.Resolver (HasResolver, Handler)
12+
import qualified Data.Aeson as Aeson
1513
import Network.Wai (Application, queryString, responseLBS)
16-
import GraphQL.Value.ToValue (toValue)
1714
import Network.HTTP.Types.Header (hContentType)
1815
import Network.HTTP.Types.Status (status200, status400)
19-
import qualified Data.Aeson as Aeson
16+
17+
import GraphQL (interpretAnonymousQuery)
18+
import GraphQL.API (HasObjectDefinition)
19+
import GraphQL.Resolver (HasResolver, Handler)
20+
import GraphQL.Value (toValue)
2021

2122

2223
-- | Adapt a GraphQL handler to a WAI application. This is really just

0 commit comments

Comments
 (0)