diff options
Diffstat (limited to 'Data/GraphQL.hs')
| -rw-r--r-- | Data/GraphQL.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Data/GraphQL.hs b/Data/GraphQL.hs index d18ff2f..2da8a46 100644 --- a/Data/GraphQL.hs +++ b/Data/GraphQL.hs @@ -12,5 +12,9 @@ import Data.GraphQL.Parser import Data.GraphQL.Schema graphql :: (Alternative m, Monad m) => Schema m -> Text -> m Aeson.Value -graphql schema = either (const empty) (execute schema) - . Attoparsec.parseOnly document +graphql = flip graphqlSubs $ const Nothing + +graphqlSubs :: (Alternative m, Monad m) => Schema m -> Subs -> Text -> m Aeson.Value +graphqlSubs schema f = + either (const empty) (execute schema f) + . Attoparsec.parseOnly document |
