Commit Graph

162 Commits

Author SHA1 Message Date
Eugen Wissner 417ff5da7d Propagate Maybe in the transform tree
Since the transform tree can already find some errors, it may fail here
and there. Almost all functions return a Maybe to signalize an error.
Will be replaced with an Either of course.
2019-11-02 06:24:21 +01:00
Eugen Wissner 0e3b6184be Save fragments in a hash map
Fixes #20.
2019-10-31 07:32:51 +01:00
Eugen Wissner 51d39b69e8 Remove deprecated functions and aliases 2019-10-25 09:07:45 +02:00
Eugen Wissner 75bc3b8509 Release 0.5.1.0 2019-10-22 07:07:54 +02:00
Eugen Wissner c7d5b02911 Handle top-level fragments
Fixes #17.
2019-10-19 10:00:25 +02:00
Eugen Wissner 37254c8c95 Inline fragments without type
Fixes #11.
2019-10-11 23:28:55 +02:00
Eugen Wissner 856efc5d25 Support inline fragments on types 2019-10-08 09:03:07 +02:00
Eugen Wissner b2a9ec7d82 Deprecate plural type aliases
Fixes #16. Deprecates:

- Language.GraphQL.AST.Arguments
- Language.GraphQL.AST.Directives
- Language.GraphQL.AST.VariableDefinitions
2019-10-01 07:24:25 +02:00
Eugen Wissner 0d142fb01c Set STACK_ROOT to cache dependencies in the CI
Set STACK_ROOT to cache dependencies between the builds.
2019-09-30 07:09:58 +02:00
Eugen Wissner f767f6cd40 Ignore graphql.cabal
This file is generated and for releases another version is generated
anyway.
2019-09-29 07:39:18 +02:00
Eugen Wissner eb98c36258 Introduce hspec-megaparsec
Fixes #13.
2019-09-27 10:50:38 +02:00
Eugen Wissner 70f7e1bd8e Document undocumented modules
Fixes #15.
2019-09-25 05:35:36 +02:00
Eugen Wissner 2b5c719ab0 Fix haddoc warnings
Fix #14.
2019-09-20 08:47:14 +02:00
Eugen Wissner c075a41582 Add pending inline fragment tests 2019-09-13 20:33:39 +02:00
Eugen Wissner 721cbaee17 Release 0.5.0.1 2019-09-10 10:20:40 +02:00
Eugen Wissner 1704022e74 Fix #12 2019-09-06 07:48:01 +02:00
Eugen Wissner 63d4de485d Deprecate enum, enumA, wrappedEnum, wrappedEnumA
These functions are from Language.GraphQL.Schema.
There are actually only two generic types in GraphQL: Scalars and objects.
Enum is a scalar value. According to the specification enums may be
serailized to strings. And in the current implementation they used
untyped strings anyway, so there is no point to have differently named
functions with the same implementation as their scalar counterparts.
2019-09-01 03:16:27 +02:00
Eugen Wissner 22313d05df Deprecate Language.GraphQL.Execute.Schema
It is not a schema (at least not a complete one), but a resolver list,
and the resolvers should be provided by the user separately, because the
schema can originate from a GraphQL document. Schema name should be free
to provide a data type for the real schema later.
2019-08-30 07:26:04 +02:00
Eugen Wissner c1943c1979 Document all public symbols.
Mostly basic documentation. Fixes #4.
2019-08-29 07:40:50 +02:00
Eugen Wissner 5175586def Provide more documentation on functions and types 2019-08-26 10:14:46 +02:00
Eugen Wissner f54e9451d2 Release 0.5.0.0 2019-08-14 08:49:07 +02:00
Eugen Wissner 045b6d15fb Escape special characters in the encoded strings
Fixes #2.
2019-08-13 07:24:05 +02:00
Eugen Wissner 6604fba7f4 Update stack snapshot to 14.0 2019-08-12 07:25:40 +02:00
Eugen Wissner a3354e7f58 Make all encoder functions return lazy text 2019-08-05 09:00:11 +02:00
Eugen Wissner f9dd363457 Provide more information in the REAME
Provide more information and documentation references in the README.
2019-08-04 12:38:01 +02:00
Eugen Wissner 7a8a90aba8 Implement indentation in the encoder 2019-08-03 23:57:27 +02:00
Eugen Wissner 989e418cc2 Put spaces between tokens in the pretty printer 2019-08-02 13:52:51 +02:00
Eugen Wissner 4812c8f039 Introduce formatter type for the encoder
... to distinguish between minified and pretty printing.
2019-07-31 05:40:17 +02:00
Eugen Wissner d690d22ce8 Test the encoder with the unminified document 2019-07-27 07:31:09 +02:00
Eugen Wissner 15568a3b99 Implement multiple operation support 2019-07-25 07:37:36 +02:00
Eugen Wissner 282946560e Add singleError utility function 2019-07-23 07:22:32 +02:00
Eugen Wissner 1b5094b6a3 Parse the BOM header if any 2019-07-22 05:50:00 +02:00
Eugen Wissner 9d15b83164 Make the tutorial to compile again
- Remove generated documentation leaving only documentation sources.
- Add CI job checking that the tutorial is up to date.
2019-07-20 07:11:10 +02:00
Eugen Wissner 5cf10b38ec Report parse errors with line and column numbers 2019-07-19 06:38:54 +02:00
Eugen Wissner bc6a7dddd1 Reuse common types from AST.Core 2019-07-18 05:10:02 +02:00
Eugen Wissner 74801b0483 Remove TODO
Issues should be created instead.
2019-07-17 07:06:35 +02:00
Eugen Wissner f3b8d9b74c Make all exports explicit 2019-07-14 05:58:05 +02:00
Eugen Wissner eb40810f25 Replace tasty and HUnit with Hspec 2019-07-10 05:57:35 +02:00
Eugen Wissner 61879fb124 Constrain the resolvers with MonadIO
This replaces the most usages of MonadPlus, which is not appropriate for
the resolvers, since a resolver is unambiguously chosen by the name (no
need for 'mplus'), and the resolvers are often doing IO.
2019-07-08 10:15:47 +02:00
Eugen Wissner 22d4a4e583 Change the main namespace to Language.GraphQL 2019-07-07 06:31:53 +02:00
Eugen Wissner 1431db7e63 Add licence badge 2019-07-06 07:57:18 +02:00
Eugen Wissner d7b6fd0329 Allow resolvers to return arbitrary nested lists 2019-07-05 20:05:04 +02:00
Eugen Wissner 2fa50d4f62 Update CI settings 2019-07-04 06:32:04 +02:00
Eugen Wissner 6238b2fbfa Add nullable types 2019-07-03 17:54:50 +02:00
Eugen Wissner 91679650b5 Introduce monad transformer for resolvers
Now the errors in the resolvers can be handled and 3 tests throwing
errors pass now. Another test fail but it requires distinguisching
nullable and non-nullable values.
2019-07-02 20:07:26 +02:00
Eugen Wissner 1017b728d9 Pass root field names together with resolvers 2019-07-01 07:05:10 +02:00
Eugen Wissner f64e186c60 Move the source code into src/ 2019-06-30 06:07:32 +02:00
Eugen Wissner 28aaa6a70b Remove GHCI config 2019-06-29 04:46:45 +02:00
Eugen Wissner 79c734fa62 Replace Alternative with MonadPlus 2019-06-28 11:12:28 +02:00
Eugen Wissner ae4038eb47 Restore error handling 2019-06-27 08:00:59 +02:00