Skip to content

Commit

Permalink
fix: hide tailcall directives from _service (#2930)
Browse files Browse the repository at this point in the history
Co-authored-by: Tushar Mathur <[email protected]>
  • Loading branch information
ssddOnTop and tusharmath authored Sep 28, 2024
1 parent fc64d2f commit a302df1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions src/core/blueprint/operators/apollo_federation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use async_graphql::parser::types::{SchemaDefinition, ServiceDocument, TypeSystem
use super::{compile_call, compile_expr, compile_graphql, compile_grpc, compile_http, compile_js};
use crate::core::blueprint::FieldDefinition;
use crate::core::config::{
ApolloFederation, Config, ConfigModule, EntityResolver, Field, GraphQLOperationType, Resolver,
ApolloFederation, ConfigModule, EntityResolver, Field, GraphQLOperationType, Resolver,
};
use crate::core::ir::model::IR;
use crate::core::try_fold::TryFold;
Expand Down Expand Up @@ -82,16 +82,8 @@ pub fn compile_entity_resolver(inputs: CompileEntityResolver<'_>) -> Valid<IR, S
pub fn compile_service(config: &ConfigModule) -> Valid<IR, String> {
let mut sdl =
crate::core::document::print(filter_conflicting_directives(config.config().into()));

writeln!(sdl).ok();
// Add tailcall specific definitions to the sdl output
writeln!(
sdl,
"{}",
crate::core::document::print(filter_conflicting_directives(Config::graphql_schema()))
)
.ok();
writeln!(sdl).ok();

// Mark subgraph as Apollo federation v2 compatible according to [docs](https://www.apollographql.com/docs/apollo-server/using-federation/apollo-subgraph-setup/#2-opt-in-to-federation-2)
// (borrowed from async_graphql)
writeln!(sdl, "extend schema @link(").ok();
Expand Down
Loading

1 comment on commit a302df1

@github-actions
Copy link

Choose a reason for hiding this comment

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

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 12.13ms 5.43ms 189.23ms 92.98%
Req/Sec 2.10k 255.23 2.77k 83.33%

251237 requests in 30.03s, 1.26GB read

Requests/sec: 8365.17

Transfer/sec: 42.94MB

Please sign in to comment.