Validate repeatable directives
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
-- | Various parts of a GraphQL document can be annotated with directives.
|
||||
-- | 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(..)
|
||||
|
@ -380,7 +380,11 @@ instance Show NonNullType where
|
||||
--
|
||||
-- Directives begin with "@", can accept arguments, and can be applied to the
|
||||
-- most GraphQL elements, providing additional information.
|
||||
data Directive = Directive Name [Argument] Location deriving (Eq, Show)
|
||||
data Directive = Directive
|
||||
{ name :: Name
|
||||
, arguments :: [Argument]
|
||||
, location :: Location
|
||||
} deriving (Eq, Show)
|
||||
|
||||
-- * Type System
|
||||
|
||||
|
@ -277,7 +277,7 @@ pipeList :: Foldable t => Formatter -> t Lazy.Text -> Lazy.Text
|
||||
pipeList Minified = (" " <>) . Lazy.Text.intercalate " | " . toList
|
||||
pipeList (Pretty _) = Lazy.Text.concat
|
||||
. fmap (("\n" <> indentSymbol <> "| ") <>)
|
||||
. toList
|
||||
. toList
|
||||
|
||||
enumValueDefinition :: Formatter -> Full.EnumValueDefinition -> Lazy.Text
|
||||
enumValueDefinition (Pretty _) enumValue =
|
||||
|
Reference in New Issue
Block a user