-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(2904): clean up apollo federation #2906
refactor(2904): clean up apollo federation #2906
Conversation
Added some comments. Moving to draft to reduce noise and improve CI efficiency. Once you are ready just mark it as "ready to review". Feel free to give a shoutout on the #contributors channel on Discord if you want immediate attention. |
Sure, @tusharmath I have pushed some changes |
Value::String("@provides".to_string()), | ||
Value::String("@requires".to_string()), | ||
Value::String("@composeDirective".to_string()), | ||
Value::String("@interfaceObject".to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to take a vec of strings and map over them to create a value::string
assert_snapshot!(output); | ||
} else { | ||
panic!("Expected Valid::Success"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop if condition use unwrap.
service_doc.add_directive(federation_directive); | ||
|
||
let mut complete_sdl = String::new(); | ||
writeln!(complete_sdl, "{}", crate::core::document::print(service_doc))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think we need writeln. Just call print directly.
@@ -1,4 +1,4 @@ | |||
mod apollo_federation; | |||
pub mod federation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub mod federation; | |
mod federation; |
let result = compile_service(&cfg_module); | ||
|
||
if let Ok(IR::Service(output)) = result { | ||
assert_snapshot!(output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snapshot file is missing in the project.
Action required: PR inactive for 5 days. |
PR closed after 10 days of inactivity. |
/claim #2904
Summary:
Briefly describe the changes made in this PR.
Issue Reference(s):
Fixes #... (Replace "..." with the issue number)
Build & Testing:
cargo test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>