Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

ssddOnTop
Copy link
Member

Issue Reference(s):
Fixes #2929

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Sep 29, 2024
Copy link

codecov bot commented Sep 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.36%. Comparing base (5fdfaa3) to head (e36751c).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@amitksingh1490 amitksingh1490 force-pushed the fix/filter-tc-specific-directives branch from ddf22e3 to 1d7353f Compare September 29, 2024 05:43
@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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] = &[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tusharmath
Copy link
Contributor

tusharmath commented Sep 30, 2024

The implementation for generating _service needs to change. Closing this PR because the implementation in its base branch isn't right.

@tusharmath tusharmath closed this Sep 30, 2024
@ssddOnTop ssddOnTop deleted the fix/filter-tc-specific-directives branch September 30, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: fix Iterations on existing features or infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hide tailcall directives from _service
3 participants