Koxiaet
47259548c4
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
c055736101
Rustfmt
2020-09-06 07:16:36 +01:00
Koxiaet
81d85c2535
Rewrite async-graphql-parser
2020-09-06 06:38:31 +01:00
Sunli
6a38057a22
Implements Default for Schema.
2020-08-28 14:19:35 +08:00
Sunli
c35eecd90d
Merge subscriptions #243
2020-08-27 15:35:48 +08:00
Sunli
6bf9718225
Update docs
2020-08-10 14:57:45 +08:00
Sunli
b0403f4e99
Add Default impl for MergedObject. #231
2020-08-10 10:47:30 +08:00
Sunli
4b6bb38e83
Add MergedObject type. #231
2020-08-09 15:03:10 +08:00
Sunli
2cf350a5c8
Removes code about streaming requests.
2020-07-31 10:10:03 +08:00
Sunli
4d3851e1b5
Replace log crate with xlog.
2020-07-15 18:05:24 +08:00
Sunli
665b337bf2
Remove all datasource-related code and update the documentation.
2020-06-15 14:17:19 +08:00
Sunli
1b8de3b433
Remove connection::DataSource
2020-06-15 12:06:15 +08:00
Sunli
7b09aaf70b
Fix slice support #165
2020-06-09 18:45:22 +08:00
William Myers
422337fd1e
Add docs about into_read being blocking
...
Addresses #151
2020-06-07 20:44:01 -06:00
Sunli
1820e1b723
Clippy cleanup
2020-06-06 10:10:10 +08:00
Coenen Benjamin
437a677948
Update FnMut to FnOnce for query closure
2020-06-06 02:00:21 +02:00
Sunli
37943fa30a
Fix relay @defer requires a label in the second chunk. #146
2020-06-05 12:20:23 +08:00
Sunli
ef6ed9aae5
Update connection::query docs
2020-06-02 21:43:08 +08:00
Sunli
c41dba50bc
Add example for connection::query
2020-06-02 19:12:28 +08:00
Sunli
2452a44484
Add connection::query function
2020-06-02 17:43:13 +08:00
Sunli
9eff1da4ae
Remove premature generic constraints of DataSource type.
2020-05-29 12:42:58 +08:00
Sunli
dba575d4a5
Add Connection::map and Connection::map_node functions
2020-05-29 12:19:08 +08:00
Sunli
6361bc4532
Update connection_type.rs
2020-05-29 11:56:12 +08:00
Sunli
38db0cbec5
Update DataSource example
2020-05-29 11:54:16 +08:00
Sunli
a2239fd51c
Rename Connection::new_with_additional_fields to Connection::with_additional_fields and Edge::new_with_additional_fields to Edge::with_additional_fields
2020-05-29 10:28:18 +08:00
Sunli
6cc92458e1
Add Connection::try_append and Connection::try_append_stream
2020-05-29 09:24:31 +08:00
sunli
e98327ae5e
Update some docs
2020-05-28 22:18:15 +08:00
Sunli
43c8daa132
Add MaybeUndefined type ( #123 )
...
* Add MaybeUndefined type
2020-05-28 15:00:55 +08:00
Sunli
76ff909ccd
New data source ( #105 )
...
* New data source
2020-05-28 08:02:00 +08:00
sunli
d53eb1a9ff
Fix Service type name error.
2020-05-27 18:07:38 +08:00
Sunli
a9d3ac9cf8
Implement a type-safe default value definition for InputValue. #111
2020-05-26 20:43:53 +08:00
Samuel Hurel
f9249e403f
Add proper count for Stream DataSource impl
2020-05-21 14:02:21 +02:00
Samuel Hurel
d58fd6e942
Remove StreamDataSource wrapper
2020-05-21 13:10:36 +02:00
Samuel Hurel
a7a17a43ad
Add doc
2020-05-21 11:45:15 +02:00
Samuel Hurel
1f4b732615
Fix tests & impl From<Stream> for StreamDataSource
2020-05-21 10:22:36 +02:00
Samuel Hurel
3aac2160e0
Remove StreamDataSource mapping closure
2020-05-21 09:55:49 +02:00
Samuel Hurel
02de780921
Stream connection
2020-05-21 09:40:42 +02:00
Sunli
bcd39f4df8
Remove Clone bound for Deferred and Streamed
2020-05-21 15:38:26 +08:00
Sunli
326fac2799
Add @stream directive
2020-05-21 10:12:54 +08:00
sunli
6f924efcf4
Add defer tests
2020-05-20 13:42:55 +08:00
Sunli
75bfba057a
Add Deferred type and @defer directive. #51
2020-05-19 20:53:29 +08:00
Sunli
d00e3e8c25
The scalar name and description attributes are placed on the process macro attributes. #97
2020-05-19 13:27:01 +08:00
sunli
c16d239b65
Remove some unsafe code
2020-05-16 21:14:26 +08:00
sunli
10a8b71adb
Preserve field order for introspection. #89
2020-05-16 10:05:48 +08:00
Sunli
f74652e61a
Modify some type names (internal types)
2020-05-15 10:08:37 +08:00
sunli
8299a54456
Improve GraphQL query parser performance. #76
2020-05-12 16:27:06 +08:00
sunli
8e9aff105e
Support Upload Stream #15
...
I think the previous implementation is not elegant enough, the `QueryBuilder::set_files_holder` function looks disgusting, so I refactored it.
By the way, the performance of parsing InputValue has been optimized, and unnecessary clones have been removed.
2020-05-11 21:47:24 +08:00
Sunli
0e371afb3c
It not finished yet.
2020-05-11 17:13:50 +08:00
Samuel Hurel
05cac5854f
impl From<ID> for Cursor
2020-05-10 16:25:16 +02:00
Samuel Hurel
c810764e7e
Simplify ID conversion
2020-05-10 15:52:47 +02:00