Commit Graph

46 Commits

Author SHA1 Message Date
Eugen Wissner a6bd2370b6 Parse type extensions
Signed-off-by: Eugen Wissner <belka@caraus.de>
2020-01-26 11:55:15 +01:00
Eugen Wissner b4a3c98114 Parse schema extensions 2020-01-25 16:45:39 +01:00
Eugen Wissner 3ef27f9d11 Add "extend symbol" lexer to parse extensions 2020-01-17 12:29:06 +01:00
Eugen Wissner ba710a3c96 Parse complete TypeSystemDefinition 2020-01-15 20:20:50 +01:00
Eugen Wissner d257d05d4e Parse enum and input object type definitions 2020-01-13 08:21:02 +01:00
Eugen Wissner 8efb08fda1 Parse ObjectDefinition 2020-01-13 08:21:02 +01:00
Eugen Wissner dd8f312cb3 Rewrite argument list to argument map 2020-01-01 10:58:11 +01:00
Eugen Wissner d82d5a36b3 Retrieve resolver arguments from the reader 2019-12-31 08:29:03 +01:00
Eugen Wissner 44dc80bb37 Replace substitution function with a map
It makes using variables with queries more approachable, but some work
still has to be done.
- The type `Subs` should be renamed and moved out of `Schema`, together with
`AST.Core.Value` probably.
- Some kind of conversion should be possible from a user-defined input
type T to the Value. So the final HashMap should have a type like
`HashMap name a`, where a is an instance of a potential typeclass
InputType.
2019-12-30 18:26:24 +01:00
Eugen Wissner fdf5914626 Move AST to AST.Document 2019-12-28 07:07:58 +01:00
Eugen Wissner 56d88310df Add definition module 2019-12-26 13:07:21 +01:00
Eugen Wissner e3a495a778 Add changelog header and versioning policy 2019-12-26 13:05:17 +01:00
Eugen Wissner 62f3c34bfe Replace AST.Selection data constructors 2019-12-25 06:45:29 +01:00
Eugen Wissner bdf711d69f Release 0.6.1.0 2019-12-23 06:35:32 +01:00
Eugen Wissner b215e1a4a7 Pretify multi-line string arguments as block strings
Fixes #10.
2019-12-21 09:25:05 +01:00
Eugen Wissner 9a5d54c035 Escape non-source characters in the encoder 2019-12-19 06:59:27 +01:00
Eugen Wissner 3c1a5c800f Support directives (skip and include)
Fixes #24.
2019-12-06 22:52:24 +01:00
Eugen Wissner fc9ad9c4a1 Consider __typename when evaluating fragments
Fixes #30.
2019-12-02 07:43:19 +01:00
Sam Nolan def52ddc20 Fix strings not consuming spaces
Fixes #28
2019-11-28 19:09:26 +11:00
Eugen Wissner 3497784984 Release 0.6.0.0 2019-11-27 08:26:51 +01:00
Eugen Wissner 587aab005e Add a reader instance to the resolvers
The Reader contains a Name/Value hashmap, which will contain resolver
arguments.
2019-11-23 09:49:12 +01:00
Eugen Wissner 625d7100ca Try type parsers in a different order 2019-11-22 08:00:50 +01:00
Eugen Wissner 31c516927d Support nested fragments in any order
Fix #19.
2019-11-12 10:47:10 +01:00
Eugen Wissner 1dd6b7b013 Support nested fragments
... without forward lookup.
2019-11-09 23:24:31 +01:00
Eugen Wissner 73fc334bf8 Move related modules to Language.GraphQL.AST
Fixes #18.

- `Language.GraphQL.Encoder` moved to `Language.GraphQL.AST.Encoder`.
- `Language.GraphQL.Parser` moved to `Language.GraphQL.AST.Parser`.
- `Language.GraphQL.Lexer` moved to `Language.GraphQL.AST.Lexer`.
- All `Language.GraphQL.AST.Value` data constructor prefixes were removed. The
  module should be imported qualified.
- All `Language.GraphQL.AST.Core.Value` data constructor prefixes were removed.
  The module should be imported qualified.
- `Language.GraphQL.AST.Transform` is now isn't exposed publically anymore.
2019-11-03 11:00:18 +01:00
Eugen Wissner 75bc3b8509 Release 0.5.1.0 2019-10-22 07:07:54 +02:00
Eugen Wissner 37254c8c95 Inline fragments without type
Fixes #11.
2019-10-11 23:28:55 +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 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 a3354e7f58 Make all encoder functions return lazy text 2019-08-05 09:00:11 +02:00
Eugen Wissner 989e418cc2 Put spaces between tokens in the pretty printer 2019-08-02 13:52:51 +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
Danny Navarro 6ce2004264 Version Bump
This also includes updates to CHANGELOG, TODO and README.
2015-09-22 14:27:10 +02:00
Danny Navarro dac6721f02 Version bump and CHANGELOG 2015-09-16 11:16:16 +02:00
Danny Navarro 7cf2b59331 Version bump, CHANGELOG and some gardening 2015-09-14 17:25:18 +02:00
Danny Navarro 5af7136893 Initial commit
This includes a rough port of the data types at
https://github.com/graphql/graphql-js/blob/master/src/language/ast.js
2015-09-12 12:54:05 +02:00