Commit Graph

16 Commits

Author SHA1 Message Date
Sunli
5c644de219 Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
Sunli
09b0a83660 Add Context::field function. #346 2020-11-30 19:41:35 +08:00
Koxiaet
d34ac0ba08 Make imports consistent 2020-10-15 07:38:10 +01:00
Sunli
2ca10e0ded Add parse_value and from_value funcntions. 2020-10-11 20:24:31 +08:00
Koxiaet
0880be3e0b Move some validations to parser
This commit moves the single anonymous and duplicated operation name
validation rules into the parser, allowing for a nicer format to be
exposed by it. It also adds better error messages to the parser.
2020-09-22 19:59:48 +01:00
Sunli
322e296a24 Remove the GQL prefix of all macros. #208 2020-09-18 09:10:24 +08:00
Koxiaet
42c3cfc17c Improve lookahead 2020-09-13 08:02:14 +01:00
Sunli
f530d01bf4 Remove all attribute macros that can be replaced by derive. 2020-09-13 11:41:15 +08:00
Sunli
c88747dfe4 Make all tests passed (async-graphql). 2020-09-10 19:35:48 +08:00
Koxiaet
ed5acdcf18 Support service parsing in async-graphql-parser
- Instead of adding a separate module `schema` like there was before,
since service parsing and executable parsing have a fair amount of
overlap I put them as two submodules `executable` and `service` in both
`parse` and `types`. Also, the grammar is unified under one `.pest`
file.
- Added const equivalents to `Value`, `Directive` etc
- Change the reexport `async_graphql::Value` from
`async_graphql_parser::types::Value` to
`async_graphql_parser::types::ConstValue` since in 99% of cases in this library
a const value is wanted instead of a value.
- Added consistent usage of executable/service instead of the ambiguous
query/schema.
- Some of the tests actually had invalid GraphQL so the new more correct
grammar made them fail, that was fixed.
- Added a `Name` newtype to refer to GraphQL names
(`[A-Za-z_][A-Za-z_0-9]*`) since they are used so frequently.
2020-09-08 09:21:27 +01:00
Koxiaet
3bf5f3a16c Rustfmt 2020-09-06 07:16:36 +01:00
Koxiaet
e3e58d261d Rewrite async-graphql-parser 2020-09-06 06:38:31 +01:00
Sunli
c8409e1a00 Remove ref attribute for SimpleObject fields, and add owned attribute. 2020-06-23 14:42:57 +08:00
sunli
1c78341ce8 Remove some unsafe code 2020-05-16 21:14:26 +08:00
Sunli
14312ba472 Rename async_graphql_parser::ast to async_graphql_parser::query 2020-05-15 10:38:48 +08:00
sunli
ad8ba68d44 Add Context::look_ahead 2020-05-14 22:13:28 +08:00