clean up some mistakes, ensure existing tests pass

This commit is contained in:
aidan coyne 2022-09-04 11:30:06 -05:00
parent 3c6076a469
commit 95b4e613b1
3 changed files with 5 additions and 10 deletions

View File

@ -113,10 +113,10 @@ impl Registry {
if options.federation {
if self.enable_apollo_link {
writeln!("extend schema @link(").ok();
writelin!("\turl: \"https://specs.apollo.dev/federation/v2.0\",").ok();
writeln!("\timport: [\"@key\", \"@tag\", \"@shareable\", \"@inaccessible\", \"@override\", \"@external\", \"@provides\", \"@requires\"]").ok();
writeln!(")").ok();
writeln!(sdl, "extend schema @link(").ok();
writeln!(sdl, "\turl: \"https://specs.apollo.dev/federation/v2.0\",").ok();
writeln!(sdl, "\timport: [\"@key\", \"@tag\", \"@shareable\", \"@inaccessible\", \"@override\", \"@external\", \"@provides\", \"@requires\"]").ok();
writeln!(sdl, ")").ok();
}
} else {
writeln!(sdl, "schema {{").ok();

View File

@ -413,11 +413,6 @@ pub struct MetaDirective {
pub visible: Option<MetaVisibleFn>,
}
#[derive(Debug, Clone)]
pub struct ApolloLinkConfig {
pub extend_schema: bool,
}
#[derive(Default)]
pub struct Registry {
pub types: BTreeMap<String, MetaType>,

View File

@ -30,7 +30,6 @@ use crate::{
InputType, ObjectType, OutputType, QueryEnv, Request, Response, ServerError, ServerResult,
SubscriptionType, Variables, ID,
};
use crate::registry::ApolloLinkConfig;
/// Introspection mode
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
@ -389,6 +388,7 @@ where
},
introspection_mode: IntrospectionMode::Enabled,
enable_federation: false,
enable_apollo_link: false,
federation_subscription: false,
ignore_name_conflicts,
};