mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
24 lines
671 B
Plaintext
24 lines
671 B
Plaintext
|
module Hasura.GraphQL.Parser.Internal.Parser where
|
||
|
|
||
|
import Hasura.Prelude
|
||
|
|
||
|
import qualified Data.Kind as K
|
||
|
|
||
|
import Language.GraphQL.Draft.Syntax
|
||
|
|
||
|
|
||
|
import {-# SOURCE #-} Hasura.GraphQL.Parser.Class
|
||
|
import Hasura.GraphQL.Parser.Schema
|
||
|
|
||
|
type role Parser nominal representational nominal
|
||
|
data Parser (k :: Kind) (m :: K.Type -> K.Type) (a :: K.Type)
|
||
|
|
||
|
runParser :: Parser k m a -> ParserInput k -> m a
|
||
|
|
||
|
type family ParserInput k where
|
||
|
ParserInput 'Both = InputValue Variable
|
||
|
ParserInput 'Input = InputValue Variable
|
||
|
ParserInput 'Output = SelectionSet NoFragments Variable
|
||
|
|
||
|
boolean :: MonadParse m => Parser 'Both m Bool
|