Closed teh closed 7 years ago
The following bit of code:
import qualified Data.GraphQL.AST as AST import Data.GraphQL.Parser (document) import GraphQL.Value (Value) import Data.Attoparsec.Text (parseOnly, endOfInput) query :: Text -> AST.SelectionSet query q = let Right (AST.Document [AST.DefinitionOperation (AST.Query (AST.Node _ _ _ selectionSet))]) = parseOnly (document <* endOfInput) q in selectionSet
could got into a function that returns a CanonicalQuery (whose type we can refine at a later stage).
CanonicalQuery
Going to track the rest of the bits of this in more specific tickets.
The following bit of code:
could got into a function that returns a
CanonicalQuery
(whose type we can refine at a later stage).