Commit Graph

36 Commits

Author SHA1 Message Date
Sunli
7ecc91f3f0 Federation v1 is no longer supported 2022-09-22 23:34:49 +08:00
Sunli
6217ccb474
Merge pull request #1060 from raptros/add-link-directive
implement a simple approach to using the link directive
2022-09-22 23:23:04 +08:00
aidan coyne
6575fd6741 Revert "default to printing the applicaiton of the link directive"
This reverts commit 64e6e7e7fa.
2022-09-22 09:48:10 -05:00
aidan coyne
64e6e7e7fa default to printing the applicaiton of the link directive
change to providing a method to opt-out of printing it.
2022-09-20 08:12:54 -05:00
Sunli
a65d3af054 Clippy clean 2022-09-20 09:33:16 +08:00
aidan coyne
c4530dd1bb add a test for the printing of link directive 2022-09-19 16:14:21 -05:00
Dominik Spicher
50d40b361e tests/federation: compare export_sdl against expected schema
This commit adds logic to two unit tests where the schema
export is compared against expected output cached in two
schema files.

This is intended to help prevent bugs like the ones fixed in
116f6e4 or the immediately succeeding commit, as unexpected
changes to schema export will become apparent in the commit
diff, easing reviews.

When legitimately changing the export output behaviour,
the test suite just needs to be run twice, as the unit-tests
automatically overwrite the files with the new version.

This unit-test approach is inspired by

https://matklad.github.io/2022/03/26/self-modifying-code.html
2022-08-29 22:23:28 +02:00
Dominik Spicher
bc98a46deb export_sdl: consistently avoid trailing spaces
116f6e48 modified the SDL export for scalars not to
incur trailing spaces. Unfortunately this occurs for
other types as well. This commit takes care of the
remaining occurrences and adds assertions to unit-tests
where an SDL is already available.
2022-08-25 15:36:37 +02:00
Nicolas Moutschen
2ffee68ad4 feat: add @tag support 2022-08-22 11:44:02 +02:00
aidan coyne
2bac140833 define override directive on fields
* define the directive field on the field struct
* implement printing it on the federation sdl
* update the derive stuff
* add a test
2022-08-20 15:22:12 -05:00
Nicolas Moutschen
ca62adf3e4 tests: add inaccessible case for Object macro 2022-08-18 14:31:27 +02:00
Nicolas Moutschen
619013d90c feat: @inaccessible support 2022-08-18 11:40:04 +02:00
Damien Pontifex
e0def31bbd cargo fmt 2022-08-17 13:47:31 +08:00
Damien Pontifex
4bdd28d966 additions so type can also be shareable as well as field 2022-08-17 10:36:00 +08:00
Damien Pontifex
6cfeb91f72 format test file 2022-08-17 09:51:23 +08:00
Damien Pontifex
a9b085f938 test for sdl having @shareable directive 2022-08-17 09:50:37 +08:00
Sunli
93763997af Rework connection types 2022-04-19 19:18:06 +08:00
Sunli
3aecc43365 Fix deadlock in dataloader. #555 2021-12-04 14:33:47 +08:00
Sunli
10646216cc Update docs 2021-11-20 11:16:48 +08:00
Sunli
ba66e1406e Fix Federation entity union is empty during schema introspection. #700 2021-11-13 09:08:55 +08:00
Sunli
e6505951af Add test_entity_union 2021-11-13 09:05:29 +08:00
Sunli
a26cc65d59 Rework Failure 3 #671 2021-11-07 19:11:43 +08:00
Sunli
d62aca8052 Rework Failure #671 2021-11-04 19:37:22 +08:00
Sunli
63544aab5b Fix tests 2021-11-04 14:54:26 +08:00
Sunli
5c644de219 Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
Sunli
1e6ae23cd8 Add test for Federation entity lookup with DataLoader. 2021-03-06 08:21:44 +08:00
Sunli
14a88cfa19 Add support for Federation nested keys. 2021-02-21 23:06:26 +08:00
Sunli
b0ceb58163 Use value! instead of serde_json::json!. 2020-10-12 10:17:05 +08:00
Sunli
8c5d8f0324 Rework async-graphql-derive. #288 2020-09-29 16:06:10 +08:00
Sunli
322e296a24 Remove the GQL prefix of all macros. #208 2020-09-18 09:10:24 +08:00
Sunli
f530d01bf4 Remove all attribute macros that can be replaced by derive. 2020-09-13 11:41:15 +08:00
Koxiaet
1aa36819eb Create resolver_utils 2020-09-12 10:29:52 +01:00
Sunli
c88747dfe4 Make all tests passed (async-graphql). 2020-09-10 19:35:48 +08:00
sunli
98864c6879 Add field guard 2020-05-02 07:57:34 +08:00
sunli
1bc97de889 fix #33 2020-04-27 12:57:52 +08:00
sunli
f1d0b3f641 Add federation support 2020-04-09 22:03:09 +08:00