Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 5714ca4

Browse files
Print SDL with federation directives
1 parent 4e0c927 commit 5714ca4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

backend/compound_library/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ async fn main() {
132132
}
133133
Cli::Schema(args) => {
134134
let schema = root_schema_builder().finish();
135-
let schema_string = schema.sdl();
135+
let export_option = async_graphql::SDLExportOptions::default().federation();
136+
let schema_string = schema.sdl_with_options(export_option);
136137
if let Some(path) = args.path {
137138
let mut file = File::create(path).unwrap();
138139
file.write_all(schema_string.as_bytes()).unwrap();

backend/compound_soaking/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ async fn main() {
128128
}
129129
Cli::Schema(args) => {
130130
let schema = root_schema_builder().finish();
131-
let schema_string = schema.sdl();
131+
let export_option = async_graphql::SDLExportOptions::default().federation();
132+
let schema_string = schema.sdl_with_options(export_option);
132133
if let Some(path) = args.path {
133134
let mut file = File::create(path).unwrap();
134135
file.write_all(schema_string.as_bytes()).unwrap();

backend/crystal_library/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ async fn main() {
131131
}
132132
Cli::Schema(args) => {
133133
let schema = root_schema_builder().finish();
134-
let schema_string = schema.sdl();
134+
let export_option = async_graphql::SDLExportOptions::default().federation();
135+
let schema_string = schema.sdl_with_options(export_option);
135136
if let Some(path) = args.path {
136137
let mut file = File::create(path).unwrap();
137138
file.write_all(schema_string.as_bytes()).unwrap();

0 commit comments

Comments
 (0)