Commit Graph

13 Commits

Author SHA1 Message Date
Sunli db83b9440c Update docs 2021-11-20 11:16:48 +08:00
Sunli 824356d118 Rework Extension 2021-04-04 14:37:41 +08:00
Sunli 4f47703118 Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
Aaron Hill d8780bd720 Strip `r#` prefix when constructing getter ident
When calling `to_string()` on an identifier, the returned string will
have an `r#` prefix if the original identifer was a raw identifier. This
prefix needs to be removed if the identifier is interpolated into
another identifier (e.g. `__some_prefix__r#other_ident`) in order for
the new identifier to be valid.

This issue was previously masked due to the fact that the relevant test
uses `r#i32`. It's possible to use `i32` as a normal (non-raw) ident -
due to a bug in rustc, this means that the user-supplied `r#` prefix
will be lost when calling `to_string()`. This bug will eventually be
fixed, causing `to_string()` to start returning `r#i32` instead of
`i32`.

This commit strips the `r#` prefix (if present) from an identifier
before using it to construct a new identifier. The relevant test is
updated to use `r#match`, which actually requires the `r#` prefix to be
a valid identifier. This causes the test to fail without this patch on
current versions of Rust.
2020-12-20 19:08:22 -05:00
Koxiaet 12fe7445c7 Replace futures with futures_util 2020-10-16 07:49:22 +01:00
Sunli c777150dcd Use `value!` instead of `serde_json::json!`. 2020-10-12 10:17:05 +08:00
Sunli 87ba51fdd0 Some improvements. 2020-10-10 16:28:07 +08:00
Sunli e645e9d999 Remove the GQL prefix of all macros. #208 2020-09-18 09:10:24 +08:00
Sunli 24b80d52d3 Remove all attribute macros that can be replaced by derive. 2020-09-13 11:41:15 +08:00
Sunli c129079f69 Fix tests 2020-09-11 16:05:21 +08:00
Sunli 35f17a389c Remove unnecessary Result on Schema::execute_stream function. 2020-09-11 10:47:55 +08:00
Sunli 91c75ced2a Make all tests passed (async-graphql). 2020-09-10 19:35:48 +08:00
Sunli d03e939394 Correct handling of raw identifiers #195 2020-07-02 10:25:20 +08:00