File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
{-# LANGUAGE FlexibleContexts #-}
3
3
{-# LANGUAGE ScopedTypeVariables #-}
4
4
5
+ -- | Basic WAI handlers for graphql-api
5
6
module GraphQL.Wai
6
7
( toApplication
7
8
) where
8
9
9
10
import Protolude
10
11
11
12
import GraphQL (interpretAnonymousQuery )
13
+ import GraphQL.API (HasObjectDefinition )
12
14
import GraphQL.Resolver (HasResolver , Handler )
13
15
import Network.Wai (Application , queryString , responseLBS )
14
16
import GraphQL.Value.ToValue (toValue )
@@ -23,7 +25,9 @@ import qualified Data.Aeson as Aeson
23
25
--
24
26
-- If you have a 'Cat' type and a corresponding 'catHandler' then you
25
27
-- can use "toApplication @Cat catHandler".
26
- toApplication :: forall r . (HasResolver IO r ) => Handler IO r -> Application
28
+ toApplication
29
+ :: forall r . (HasResolver IO r , HasObjectDefinition r )
30
+ => Handler IO r -> Application
27
31
toApplication handler = app
28
32
where
29
33
app req respond =
You can’t perform that action at this time.
0 commit comments