diff options
| author | Eugen Wissner <belka@caraus.de> | 2019-12-27 09:14:12 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2019-12-27 09:14:12 +0100 |
| commit | 78ee76f9d5bd59e6fe97dfb39ca690a473b256b1 (patch) | |
| tree | e23e9fbd9cd19566edc8bdfd215141eed89d5124 /src/Language/GraphQL/AST/DirectiveLocation.hs | |
| parent | 56d88310df7c92a1721cc0dfa08a1d232c47c14b (diff) | |
| download | graphql-78ee76f9d5bd59e6fe97dfb39ca690a473b256b1.tar.gz | |
Define schema AST.
Large parts of the schema aren't exported publically. They will be made
public during writing the parser.
Fixes #6.
Diffstat (limited to 'src/Language/GraphQL/AST/DirectiveLocation.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/DirectiveLocation.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Language/GraphQL/AST/DirectiveLocation.hs b/src/Language/GraphQL/AST/DirectiveLocation.hs index 12c7e18..5b7a36f 100644 --- a/src/Language/GraphQL/AST/DirectiveLocation.hs +++ b/src/Language/GraphQL/AST/DirectiveLocation.hs @@ -1,14 +1,20 @@ +-- | Various parts of a GraphQL document can be annotated with directives. +-- This module describes locations in a document where directives can appear. module Language.GraphQL.AST.DirectiveLocation - ( DirectiveLocation - , ExecutableDirectiveLocation - , TypeSystemDirectiveLocation + ( DirectiveLocation(..) + , ExecutableDirectiveLocation(..) + , TypeSystemDirectiveLocation(..) ) where +-- | All directives can be splitted in two groups: directives used to annotate +-- various parts of executable definitions and the ones used in the schema +-- definition. data DirectiveLocation = ExecutableDirectiveLocation ExecutableDirectiveLocation | TypeSystemDirectiveLocation TypeSystemDirectiveLocation deriving (Eq, Show) +-- | Where directives can appear in an executable definition, like a query. data ExecutableDirectiveLocation = Query | Mutation @@ -19,6 +25,7 @@ data ExecutableDirectiveLocation | InlineFragment deriving (Eq, Show) +-- | Where directives can appear in a type system definition. data TypeSystemDirectiveLocation = Schema | Scalar |
