From 44dc80bb37558fc6a35b22791ac407b63956176d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 30 Dec 2019 18:26:24 +0100 Subject: Replace substitution function with a map It makes using variables with queries more approachable, but some work still has to be done. - The type `Subs` should be renamed and moved out of `Schema`, together with `AST.Core.Value` probably. - Some kind of conversion should be possible from a user-defined input type T to the Value. So the final HashMap should have a type like `HashMap name a`, where a is an instance of a potential typeclass InputType. --- src/Language/GraphQL.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Language/GraphQL.hs') diff --git a/src/Language/GraphQL.hs b/src/Language/GraphQL.hs index afce8aa..952f8ac 100644 --- a/src/Language/GraphQL.hs +++ b/src/Language/GraphQL.hs @@ -20,7 +20,7 @@ graphql :: MonadIO m => NonEmpty (Schema.Resolver m) -- ^ Resolvers. -> T.Text -- ^ Text representing a @GraphQL@ request document. -> m Aeson.Value -- ^ Response. -graphql = flip graphqlSubs $ const Nothing +graphql = flip graphqlSubs mempty -- | If the text parses correctly as a @GraphQL@ query the substitution is -- applied to the query and the query is then executed using to the given -- cgit v1.2.3