diff options
| author | Eugen Wissner <belka@caraus.de> | 2019-11-16 11:41:40 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2019-11-16 11:41:40 +0100 |
| commit | 7b92e5bcfded2a592b9be25d0865d26320421570 (patch) | |
| tree | a7b7a42fbacd71c1349d3fa58518c18d9f638b5b /src/Language/GraphQL/Execute.hs | |
| parent | 115aa026724a688bc7ca57d622c83d0ccb2d2bb2 (diff) | |
| download | graphql-7b92e5bcfded2a592b9be25d0865d26320421570.tar.gz | |
Rewrite selections into a Sequence. Fix #21
Diffstat (limited to 'src/Language/GraphQL/Execute.hs')
| -rw-r--r-- | src/Language/GraphQL/Execute.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Language/GraphQL/Execute.hs b/src/Language/GraphQL/Execute.hs index 9228dd5..59e85bf 100644 --- a/src/Language/GraphQL/Execute.hs +++ b/src/Language/GraphQL/Execute.hs @@ -8,6 +8,7 @@ module Language.GraphQL.Execute import Control.Monad.IO.Class (MonadIO) import qualified Data.Aeson as Aeson +import Data.Foldable (toList) import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import Data.Text (Text) @@ -71,6 +72,6 @@ operation :: MonadIO m -> AST.Core.Operation -> m Aeson.Value operation schema (AST.Core.Query _ flds) - = runCollectErrs (Schema.resolve (NE.toList schema) (NE.toList flds)) + = runCollectErrs (Schema.resolve (toList schema) flds) operation schema (AST.Core.Mutation _ flds) - = runCollectErrs (Schema.resolve (NE.toList schema) (NE.toList flds)) + = runCollectErrs (Schema.resolve (toList schema) flds) |
