Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
/ grotesque Public archive

An implementation of GraphQL in Haskell.

License

Notifications You must be signed in to change notification settings

tfausak/grotesque

Repository files navigation

Grotesque

Build badge

A style of ornamentation characterized by fanciful combinations of intertwined forms.

Grotesque is an implementation of GraphQL in Haskell. It is a work in progress. Currently it can parse and pretty-print GraphQL queries and schemas. For example:

:set -XOverloadedStrings
:module + Grotesque

let Right document = parseDocument "{ field }"
-- Document { documentValue =
--   [ DefinitionOperation OperationDefinition
--     { operationDefinitionOperationType = OperationTypeQuery
--     , operationDefinitionName = Nothing
--     , operationDefinitionVariableDefinitions = Nothing
--     , operationDefinitionDirectives = Nothing
--     , operationDefinitionSelectionSet = SelectionSet { selectionSetValue =
--       [ SelectionField Field
--         { fieldAlias = Nothing
--         , fieldName = Name { nameValue = "field" }
--         , fieldArguments = Nothing
--         , fieldDirectives = Nothing
--         , fieldSelectionSet = Nothing } ] } } ] }

prettyPrintDocument document
-- "query {field}"

If you're looking for a production-ready implementation, check out the reference implementation in JavaScript or the C++ query parser.

If you're looking for a more mature or featureful Haskell implementation, check out jdnavarro/graphql-haskell, dropbox/datagraph, or jml/graphql-api.

About

An implementation of GraphQL in Haskell.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published