Commit Graph

69 Commits

Author SHA1 Message Date
Sunli
ca84859f46 Make all tests pass. 2020-09-06 18:53:24 +08: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
Koxiaet
02f7a5fbbc Remove dependency on serde_derive, satisfy Clippy, improve docs 2020-08-31 19:18:02 +01:00
Sunli
47174966fb Add directive @ifdef 2020-08-06 14:52:54 +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
Blaine Bublitz
c48f126fcd Use FieldResult for data(), add data_unchecked() for panic 2020-07-06 17:39:53 -07:00
Sunli
eb7a72aac6 Remove ref attribute for SimpleObject fields, and add owned attribute. 2020-06-23 14:42:57 +08:00
Sunli
7630fe1f51 Extension::Logger now provides more comprehensive error information. 2020-06-13 22:14:47 +08:00
Bryan Burgers
e21f2e6316 Allow vars to be missing when def is nullable
Allow variables to be missing when the associated variable definition is
nullable (in which case we use `null` as the default).

This fixes queries like

```graphql
query Test($var: Int) {
    test(var: $var)
}
```

```json
{}
```

which appear to be allowed according to the GraphQL spec.
2020-06-11 10:00:47 -05:00
Sunli
267620d08e Fix incorrect variable substitution. #126 2020-05-31 11:54:07 +08:00
Sunli
43c8daa132 Add MaybeUndefined type (#123)
* Add MaybeUndefined type
2020-05-28 15:00:55 +08:00
Sunli
a9d3ac9cf8 Implement a type-safe default value definition for InputValue. #111 2020-05-26 20:43:53 +08:00
Sunli
c4415f1102 Update doc for Context::data 2020-05-22 14:02:28 +08:00
Sunli
1461210df7 Add logger extension 2020-05-22 11:58:49 +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
c16d239b65 Remove some unsafe code 2020-05-16 21:14:26 +08:00
Sunli
6de85377f7 Rename async_graphql_parser::ast to async_graphql_parser::query 2020-05-15 10:38:48 +08:00
sunli
534837e1b9 Add Context::look_ahead 2020-05-14 22:13:28 +08:00
Sunli
7ab8326cbf Add Context::position 2020-05-14 17:35:25 +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
728989209f The error reason can be returned when the input value is parsed incorrectly. #70 2020-05-10 18:27:46 +08:00
sunli
bc2966bc0d Improve parser performance. 2020-05-10 10:59:51 +08:00
sunli
0d540465a5 Remove the disgusting functions json_value_to_gql_value and gql_value_to_json_value.😂 2020-05-09 22:16:39 +08:00
sunli
dc7c8d5280 Merge branch 'parser'
Implement a new GraphQL query parser and remove the dependency on graphql-parser.
2020-05-09 17:55:04 +08:00
sunli
8faa376776 Add tracing extension 2020-04-28 15:01:19 +08:00
sunli
964cf0e140 Update context.rs 2020-04-24 10:05:41 +08:00
sunli
1917d236ae Use FnvHashMap for Data 2020-04-23 21:36:04 +08:00
sunli
d564ce27f1 Websocket transport creates context data from the connect_init.payload property 2020-04-23 14:52:22 +08:00
sunli
a4781523fb v1.9.11
Add context data for subscription
2020-04-23 10:26:16 +08:00
sunli
0b6bfd4c33 Add GQLHttpRequest and IntoQueryBuilder trait 2020-04-11 17:36:05 +08:00
sunli
b88ac80084 The subscription field now returns a stream 2020-04-06 13:49:39 +08:00
sunli
c60e4a51ab Fixed panic when uploading binary file 2020-04-03 09:27:22 +08:00
sunli
14860d9b88 Reimplement the error type and remove the dependency on the anyhow::Error 2020-04-02 10:21:04 +08:00
sunli
b373e1397d remove PreparedQuery 2020-04-01 16:53:49 +08:00
sunli
a13204273e v1.6.8
Add context data support
2020-03-31 11:19:18 +08:00
sunli
3372512c3d Add validation for the InputObject field 2020-03-30 10:45:41 +08:00
sunli
fb1fef022b v1.6.2 2020-03-26 18:30:29 +08:00
sunli
bc0d6603c1 v1.6.0 2020-03-26 11:34:28 +08:00
sunli
b0369860dd v1.5.1 2020-03-25 11:39:28 +08:00
sunli
0769513c8b v1.5.0
Improve performance
2020-03-24 18:54:22 +08:00
sunli
99f4184f83 Clippy cleanup 2020-03-21 09:32:13 +08:00
sunli
62b4908ffe v1.3.2 2020-03-20 11:56:08 +08:00
sunli
724cb21258 add GraphQL Cursor Connections 2020-03-19 17:20:12 +08:00
sunli
60b0282a89 Support subscription 2020-03-17 17:26:59 +08:00
sunli
abfe861749 Add support for multipart request 2020-03-14 11:46:20 +08:00