Commit Graph

93 Commits

Author SHA1 Message Date
aidan coyne
2803cf3128 Revert "default to printing the applicaiton of the link directive"
This reverts commit 393184a23c.
2022-09-22 09:48:10 -05:00
aidan coyne
393184a23c 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
95b4e613b1 clean up some mistakes, ensure existing tests pass 2022-09-19 15:43:46 -05:00
aidan coyne
3c6076a469 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
f83d0a34d0 Add SDLExportOptions::include_specified_by method to enable specifiedBy directive #1065 2022-09-09 18:48:24 +08:00
Sunli
4d2f96b1d8 Fixes #1063 2022-09-06 09:36:08 +08:00
Sunli
69d8c3e26e Add no_cache for cache_control attribute #1051 2022-09-02 15:09:44 +08:00
Dominik Spicher
e427783936 export_sdl: add missing space before opening braces 2022-08-29 22:25:17 +02:00
Sunli
d31cef270b 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
4755f93e20 export_sdl: consistently avoid trailing spaces
faf407b6 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
5b7790b256 support @specifiedBy directive in SDL export 2022-08-24 23:01:52 +09:00
Dominik Spicher
faf407b691 export_sdl: avoid trailing space for scalar definitions
This has been introduced in 06973ee.

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
d3a8cde256 fix: cargo clippy 2022-08-22 12:01:07 +02:00
Nicolas Moutschen
15afe01f7a feat: add @tag support 2022-08-22 11:44:02 +02:00
aidan coyne
6f57a13b71 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
06973ee09b feat: @inaccessible support 2022-08-18 11:40:04 +02:00
Damien Pontifex
be19b76d5d additions so type can also be shareable as well as field 2022-08-17 10:36:00 +08:00
Damien Pontifex
66271a54bd first passing build with shareable 2022-08-17 09:29:43 +08:00
Sunli
e4c3da6ae9 Clippy clean 2022-08-12 14:05:46 +08:00
Sunli
79e10a221d Clippy 2022-06-25 10:23:48 +08:00
Ivan Kozik
5b7303d3fe 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
6f7ffa9e6b Fixes #957 2022-06-21 13:58:00 +08:00
Sunli
933a818afb Fixes #946 2022-06-10 18:55:12 +08:00
Sunli
d0bb37f419 Add Schema::build_with_ignore_name_conflicts method to specifies a list to ignore type conflict detection. 2022-05-24 20:08:35 +08:00
Sunli
5ad9f497d8 Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
Sunli
96e423ff31 Fixes #911 2022-05-06 09:28:57 +08:00
Sunli
de4f908812 Add some options for exporting SDL. #877 2022-05-05 20:09:35 +08:00
Sunli
88ba75ec70 Rework connection types 2022-04-19 19:18:06 +08:00
Paul Nguyen
09f3be4fd1 Allow introspection only schemas 2022-04-18 21:25:02 +02:00
Sunli
a62eb6f699 Panics when the same Rust type has the same name. #880 2022-03-30 20:54:49 +08:00
Sunli
e4d04faaa0 Generate @deprecated to SDL. #874
Expose `Connection::edges` #871
2022-03-22 11:09:31 +08:00
Sunli
5dad855f8e Export @oneOf directive to SDL when Oneof type is defined. #766 2022-03-05 09:06:59 +08:00
Sunli
a4b840a984 Add support for oneof field on object. #766 2022-03-04 21:24:17 +08:00
Sunli
df3312363e Add OneOfObject macro to support for oneof input object. #766 2022-02-17 19:35:55 +08:00
Sunli
707890e551 Add Union and Interface support for trait objects. #780
Clippy clean
2022-01-11 09:35:09 +08:00
Anthony Griffon
9a62a7c5ac fix: issue when empty with federation spec on _Entity node
Signed-off-by: Anthony Griffon <anthony@griffon.one>
2021-12-22 18:16:56 +01:00
Edward Rudd
5c8ff9d3a6 correct adding implicit interfaces to the schema introspection
If an interface is added manually (as it is not directly referenced by any type) it was not showing up in the introspection.

Now it will be exposed if it is visible and references already accessible types
2021-12-04 19:33:15 -05:00
Sunli
db83b9440c Update docs 2021-11-20 11:16:48 +08:00
Sunli
1b50738af7 Custom directive 2021-11-20 09:04:46 +08:00
Sunli
e2c6ead1a3 Add DirectivesUnique rule 2021-11-18 20:14:56 +08:00
Sunli
eb022a0cca Rework validators 2021-11-14 21:09:14 +08:00
Sunli
eeb1f73773 Merge branch 'master' into async-graphql-v3 2021-11-13 09:16:24 +08:00
Sunli
0f55fe7f7d Fix Federation entity union is empty during schema introspection. #700 2021-11-13 09:08:55 +08:00
Sunli
acb44bdd05 Hide types that are not referenced by visible fields. #698 2021-11-12 07:24:04 +08:00
Sunli
0e9e087691 Move the methods of the Type trait to InputType and OutputType. 2021-11-12 07:23:05 +08:00
Sunli
b359b62976 If a GraphQL name conflict is detected when creating schema, it will cause panic. #499 2021-11-08 10:25:31 +08:00
Sunli
057d6aebfd Subscription typename - [GraphQL - October 2021] #681 2021-11-02 20:35:05 +08:00
Sunli
c6d26884a9 Specified By - [GraphQL - October 2021] #677 2021-11-02 20:35:05 +08:00
Miaxos
391d3d10e4 feat: add visible macro argument for union type 2021-10-11 21:54:50 +00:00
Sunli
4e1c34fa62 Sort the types in the exported SDL by name. #577 2021-07-17 10:13:42 +08:00