blob: cfa1c9c7c9498294cbf791e8bb065543261f02ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
module Data.GraphQL.Schema where
import Data.Text (Text)
import Data.HashMap.Lazy (HashMap)
data Schema = Schema QueryRoot MutationRoot
type QueryRoot = ObjectOutput
type MutationRoot = ObjectOutput
type ObjectOutput = HashMap Text Output
type ObjectInput = HashMap Text Input
data Type = TypeScalar Scalar
| TypeOutputObject ObjectOutput
| TypeInterface Interface
| TypeUnion Union
| TypeEnum Scalar
| TypeInputObject ObjectInput
| TypeList List
| TypeNonNull NonNull
data Output = OutputScalar Scalar
| OutputObject ObjectOutput
| OutputInterface Interface
| OutputUnion Union
| OutputEnum Scalar
| OutputList List
| OutputNonNull NonNull
data Input = InputScalar Scalar
| InputObject ObjectInput
| InputEnum Scalar
| InputList List
| InputNonNull NonNull
data Scalar = ScalarInt Int
| ScalarFloat Double
| ScalarString Text
| ScalarBool Bool
| ScalarID Text
newtype Interface = Interface (HashMap Text Output)
newtype Union = Union [ObjectOutput]
type List = [Type]
type NonNull = Type
|