Commit Graph

45 Commits

Author SHA1 Message Date
Sunli
7ecc91f3f0 Federation v1 is no longer supported 2022-09-22 23:34:49 +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
aidan coyne
89dca3e125 clean up some mistakes, ensure existing tests pass 2022-09-19 15:43:46 -05:00
aidan coyne
9e105f2628 implement a simple approach to using the link directive
this is probably the simple way to get the link directive in place for
federation 2 support - simply add a flag to the registry, and print out
a hardcoded link directive configured for the current needs of
async-graphql.
2022-09-19 15:43:46 -05:00
Sunli
d65a782d55 Add SDLExportOptions::include_specified_by method to enable specifiedBy directive #1065 2022-09-09 18:48:24 +08:00
Sunli
9915b28b9b Fixes #1063 2022-09-06 09:36:08 +08:00
Dominik Spicher
1e9d9820a8 export_sdl: add missing space before opening braces 2022-08-29 22:25:17 +02:00
Sunli
1911461551
Merge pull request #1043 from dspicher/more-trailing-spaces
export_sdl: consistently avoid trailing spaces
2022-08-29 13:49:53 +08: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
cw-ozaki
bf73d849ea support @specifiedBy directive in SDL export 2022-08-24 23:01:52 +09:00
Dominik Spicher
116f6e48be export_sdl: avoid trailing space for scalar definitions
This has been introduced in 619013d.

The problem can easily be avoided by modifying the `write!`
directives inside the federation if-clause to write space
prefixes instead of suffixes.
2022-08-23 12:44:30 +02:00
Nicolas Moutschen
6f66a052e3 fix: cargo clippy 2022-08-22 12:01:07 +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
619013d90c feat: @inaccessible support 2022-08-18 11:40:04 +02: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
9e9493e232 first passing build with shareable 2022-08-17 09:29:43 +08:00
Sunli
f8db3d180c Clippy 2022-06-25 10:23:48 +08:00
Ivan Kozik
2d79376c8d
Add a prefer_single_line_descriptions option on SDLExportOptions (#955)
* Add a prefer_single_line_descriptions option on SDLExportOptions

The default export uses three lines for each description. Single-line
descriptions improve the readability of the exported SDL when there are
many short descriptions.

* export_sdl: escape " in single-line descriptions

I confirmed that graphql-code-generator properly handles SDL with this escaping.
2022-06-25 10:21:00 +08:00
Sunli
614a578a3f Fixes #957 2022-06-21 13:58:00 +08:00
Sunli
f2bac81a2f Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
Sunli
8011b9a120 Add some options for exporting SDL. #877 2022-05-05 20:09:35 +08:00
Sunli
4f0a86cda3 Generate @deprecated to SDL. #874
Expose `Connection::edges` #871
2022-03-22 11:09:31 +08:00
Sunli
889fe723f2 Export @oneOf directive to SDL when Oneof type is defined. #766 2022-03-05 09:06:59 +08:00
Sunli
632529ee3e Add support for oneof field on object. #766 2022-03-04 21:24:17 +08:00
Sunli
b84129c650 Add OneOfObject macro to support for oneof input object. #766 2022-02-17 19:35:55 +08:00
Sunli
334307b2c2 Add Union and Interface support for trait objects. #780
Clippy clean
2022-01-11 09:35:09 +08:00
Sunli
956a9decc7 Clippy clean 2021-04-12 16:01:03 +08:00
Sunli
5806682ad0 Fixed an error in exporting Federation SDL. 2021-04-12 15:46:49 +08:00
Sunli
2f9fb53688 Fix Schema::sdl() does not include subscription definitions. #464 2021-04-01 20:56:14 +08:00
Sunli
aa1e72e68e Add SchemaBuilder::enable_subscription_in_federation method. #449 2021-03-20 17:22:18 +08:00
Sunli
6b21f63817 Export subscription type to Federation SDL. 2021-03-09 14:54:54 +08:00
Taiki Endo
cb03ec23b8 Fix format of InputObject in SDL 2021-03-07 15:35:47 +09:00
Sunli
32ab16f076 Add descriptions for the exported Federation SDL. 2021-03-06 08:38:19 +08:00
Sunli
66c6823a1c Export sdl for interface to implements another interface. #322 2020-11-07 08:49:08 +08:00
Koxiaet
10d900a280 Rustfmt 2020-10-26 15:14:53 +00:00
Daniel Wiesenberg
efd4ee61cb
Change interface SDL to adhere to spec
When only one interface is implemented, there is no &. The & is only to combine more than one interface.
2020-10-26 14:58:36 +01:00
Koxiaet
a48953899c Remove itertools dependency 2020-10-16 06:37:48 +01:00
Koxiaet
d34ac0ba08 Make imports consistent 2020-10-15 07:38:10 +01:00
Sunli
3f654127b8 Clippy clean. 2020-09-27 19:29:23 +08:00
Sunli
e9efad4479 Fix the problem when generating Federation SDL. #283 2020-09-27 18:49:04 +08:00
Daniel Wiesenberg
225f46d180
Run Rustfmt and Clippy 2020-09-23 15:54:33 +02:00
Daniel Wiesenberg
7b53e856e0
Export description with Registry::export_sdl 2020-09-23 15:47:04 +02:00
Sunli
e3125b2d2d Add Schema::sdl method. #191 2020-09-23 14:14:22 +08:00