-
Notifications
You must be signed in to change notification settings - Fork 258
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
fix: filter out tailcall specific directives #2935
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2935 +/- ##
=======================================
Coverage 87.36% 87.36%
=======================================
Files 263 263
Lines 26252 26261 +9
=======================================
+ Hits 22934 22943 +9
Misses 3318 3318 ☔ View full report in Codecov by Sentry. |
ddf22e3
to
1d7353f
Compare
@@ -96,7 +114,7 @@ pub fn compile_service(config: &ConfigModule) -> Valid<IR, String> { | |||
|
|||
fn filter_conflicting_directives(sd: ServiceDocument) -> ServiceDocument { | |||
fn filter_directive(directive_name: &str) -> bool { | |||
directive_name != "link" | |||
FEDERATION_DIRECTIVES.iter().any(|d| *d == directive_name) |
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.
FEDERATION_DIRECTIVES.iter().any(|d| *d == directive_name) | |
FEDERATION_DIRECTIVES.contains(directive_name) |
@@ -13,6 +15,22 @@ use crate::core::try_fold::TryFold; | |||
use crate::core::valid::{Valid, Validator}; | |||
use crate::core::{config, Type}; | |||
|
|||
// ref: https://www.apollographql.com/docs/federation/federated-schemas/federated-directives | |||
const FEDERATION_DIRECTIVES: &[&str] = &[ |
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.
we have a similar list of federation directives here https://github.com/tailcallhq/tailcall/pull/2935/files#diff-f40f5478a0ee614381f25d37362c9c9c7779df174a375a166cf70e3e392e5a5dR109 can we reuse the definition?
The implementation for generating |
Issue Reference(s):
Fixes #2929