diff options
Diffstat (limited to 'src/Language/GraphQL/Encoder.hs')
| -rw-r--r-- | src/Language/GraphQL/Encoder.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Language/GraphQL/Encoder.hs b/src/Language/GraphQL/Encoder.hs index 11115b1..b3ec655 100644 --- a/src/Language/GraphQL/Encoder.hs +++ b/src/Language/GraphQL/Encoder.hs @@ -31,11 +31,11 @@ data Formatter = Minified | Pretty Word --- Constructs a formatter for pretty printing. +-- | Constructs a formatter for pretty printing. pretty :: Formatter pretty = Pretty 0 --- Constructs a formatter for minifying. +-- | Constructs a formatter for minifying. minified :: Formatter minified = Minified @@ -67,11 +67,11 @@ operationDefinition formatter (OperationDefinition Mutation name vars dirs sels) = "mutation " <> node formatter name vars dirs sels node :: Formatter - -> Maybe Name - -> VariableDefinitions - -> Directives - -> SelectionSet - -> Text + -> Maybe Name + -> [VariableDefinition] + -> [Directive] + -> SelectionSet + -> Text node formatter name vars dirs sels = Text.Lazy.fromStrict (fold name) <> optempty (variableDefinitions formatter) vars @@ -170,7 +170,7 @@ directive :: Formatter -> Directive -> Text directive formatter (Directive name args) = "@" <> Text.Lazy.fromStrict name <> optempty (arguments formatter) args -directives :: Formatter -> Directives -> Text +directives :: Formatter -> [Directive] -> Text directives formatter@(Pretty _) = Text.Lazy.cons ' ' . spaces (directive formatter) directives Minified = spaces (directive Minified) |
