Skip to content

Commit

Permalink
fix(jit): implement skip and include (tailcallhq#2357)
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 Jul 11, 2024
1 parent 27b510b commit 715907e
Show file tree
Hide file tree
Showing 11 changed files with 394 additions and 118 deletions.
151 changes: 80 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

93 changes: 90 additions & 3 deletions src/core/jit/builder.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,49 @@
use std::collections::HashMap;
use std::ops::Deref;

use async_graphql::parser::types::{
DocumentOperations, ExecutableDocument, FragmentDefinition, OperationType, Selection,
SelectionSet,
Directive, DocumentOperations, ExecutableDocument, FragmentDefinition, OperationType,
Selection, SelectionSet,
};
use async_graphql::Positioned;
use async_graphql_value::Value;

use super::model::*;
use crate::core::blueprint::{Blueprint, Index, QueryField};
use crate::core::counter::{Count, Counter};
use crate::core::merge_right::MergeRight;

#[derive(PartialEq)]
enum Condition {
True,
False,
Variable(Variable),
}

struct Conditions {
skip: Option<Condition>,
include: Option<Condition>,
}

impl Conditions {
/// Checks if the field should be skipped always
fn is_const_skip(&self) -> bool {
matches!(self.skip, Some(Condition::True)) ^ matches!(self.include, Some(Condition::True))
}

fn into_variable_tuple(self) -> (Option<Variable>, Option<Variable>) {
let comp = |condition| match condition? {
Condition::Variable(var) => Some(var),
_ => None,
};

let include = comp(self.include);
let skip = comp(self.skip);

(include, skip)
}
}

pub struct Builder {
pub index: Index,
pub arg_id: Counter<usize>,
Expand All @@ -29,7 +62,48 @@ impl Builder {
}
}

#[inline(always)]
fn include(
&self,
directives: &[Positioned<async_graphql::parser::types::Directive>],
) -> Conditions {
fn get_condition(dir: &Directive) -> Option<Condition> {
let arg = dir.get_argument("if").map(|pos| &pos.node);
let is_include = dir.name.node.as_str() == "include";
match arg {
None => None,
Some(value) => match value {
Value::Boolean(bool) => {
let condition = if is_include ^ bool {
Condition::True
} else {
Condition::False
};
Some(condition)
}
Value::Variable(var) => {
Some(Condition::Variable(Variable::new(var.deref().to_owned())))
}
_ => None,
},
}
}
Conditions {
skip: directives
.iter()
.find(|d| d.node.name.node.as_str() == "skip")
.map(|d| &d.node)
.and_then(get_condition),
include: directives
.iter()
.find(|d| d.node.name.node.as_str() == "include")
.map(|d| &d.node)
.and_then(get_condition),
}
}

#[allow(clippy::too_many_arguments)]
#[inline(always)]
fn iter(
&self,
selection: &SelectionSet,
Expand All @@ -41,6 +115,16 @@ impl Builder {
for selection in &selection.items {
match &selection.node {
Selection::Field(Positioned { node: gql_field, .. }) => {
let conditions = self.include(&gql_field.directives);

// if include is always false xor skip is always true,
// then we can skip the field from the plan
if conditions.is_const_skip() {
continue;
}

let (include, skip) = conditions.into_variable_tuple();

let field_name = gql_field.name.node.as_str();
let field_args = gql_field
.arguments
Expand Down Expand Up @@ -91,6 +175,8 @@ impl Builder {
name,
ir,
type_of,
skip,
include,
args,
extensions: exts.clone(),
});
Expand All @@ -116,6 +202,7 @@ impl Builder {
fields
}

#[inline(always)]
fn get_type(&self, ty: OperationType) -> Option<&str> {
match ty {
OperationType::Query => Some(self.index.get_query()),
Expand All @@ -124,6 +211,7 @@ impl Builder {
}
}

#[inline(always)]
pub fn build(&self) -> Result<ExecutionPlan, String> {
let mut fields = Vec::new();
let mut fragments: HashMap<&str, &FragmentDefinition> = HashMap::new();
Expand Down Expand Up @@ -176,7 +264,6 @@ mod tests {
let config = Config::from_sdl(CONFIG).to_result().unwrap();
let blueprint = Blueprint::try_from(&config.into()).unwrap();
let document = async_graphql::parser::parse_query(query).unwrap();

Builder::new(&blueprint, document).build().unwrap()
}

Expand Down
4 changes: 3 additions & 1 deletion src/core/jit/common/json_placeholder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::core::config::{Config, ConfigModule};
use crate::core::jit::builder::Builder;
use crate::core::jit::store::{Data, Store};
use crate::core::jit::synth::Synth;
use crate::core::jit::Variables;
use crate::core::json::JsonLike;
use crate::core::valid::Validator;

Expand Down Expand Up @@ -82,6 +83,7 @@ impl JsonPlaceholder {
store
});

Synth::new(plan, store)
let vars = Variables::new();
Synth::new(plan, store, vars)
}
}
7 changes: 4 additions & 3 deletions src/core/jit/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ pub struct Executor<Synth, IRExec> {
exec: IRExec,
}

impl<Input, Output, Error, Synth, Exec> Executor<Synth, Exec>
impl<Input: Clone, Output, Error, Synth, Exec> Executor<Synth, Exec>
where
Output: JsonLike<Json = Output> + Debug,
Synth: Synthesizer<Value = Result<Output, Error>>,
Synth: Synthesizer<Value = Result<Output, Error>, Variable = Input>,
Exec: IRExecutor<Input = Input, Output = Output, Error = Error>,
{
pub fn new(plan: ExecutionPlan, synth: Synth, exec: Exec) -> Self {
Expand All @@ -40,8 +40,9 @@ where
}

pub async fn execute(self, request: Request<Input>) -> Response<Output, Error> {
let vars = request.variables.clone();
let store = self.execute_inner(request).await;
Response::new(self.synth.synthesize(store))
Response::new(self.synth.synthesize(store, vars))
}
}

Expand Down
63 changes: 63 additions & 0 deletions src/core/jit/model.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
use std::collections::HashMap;
use std::fmt::{Debug, Formatter};

use serde::Deserialize;

use crate::core::ir::model::IR;

#[derive(Debug, Deserialize, Clone)]
pub struct Variables<Value>(HashMap<String, Value>);

impl<Value> Default for Variables<Value> {
fn default() -> Self {
Self::new()
}
}

impl<Value> Variables<Value> {
pub fn new() -> Self {
Self(HashMap::new())
}
pub fn get(&self, key: &str) -> Option<&Value> {
self.0.get(key)
}
pub fn insert(&mut self, key: String, value: Value) {
self.0.insert(key, value);
}
}

impl<V> FromIterator<(String, V)> for Variables<V> {
fn from_iter<T: IntoIterator<Item = (String, V)>>(iter: T) -> Self {
Self(iter.into_iter().collect())
}
}

#[derive(Debug, Clone)]
pub struct Arg {
pub id: ArgId,
Expand Down Expand Up @@ -50,9 +80,40 @@ pub struct Field<Extensions> {
pub name: String,
pub ir: Option<IR>,
pub type_of: crate::core::blueprint::Type,
pub skip: Option<Variable>,
pub include: Option<Variable>,
pub args: Vec<Arg>,
pub extensions: Option<Extensions>,
}
#[derive(Clone, Debug, PartialEq)]
pub struct Variable(String);

impl Variable {
pub fn new(name: String) -> Self {
Variable(name)
}
}

impl<A> Field<A> {
#[inline(always)]
pub fn skip(&self, variables: &Variables<async_graphql_value::ConstValue>) -> bool {
let eval = |variable_option: Option<&Variable>,
variables: &Variables<async_graphql_value::ConstValue>,
default: bool| {
match variable_option {
Some(Variable(name)) => variables.get(name).map_or(default, |value| match value {
async_graphql_value::ConstValue::Boolean(b) => *b,
_ => default,
}),
None => default,
}
};
let skip = eval(self.skip.as_ref(), variables, false);
let include = eval(self.include.as_ref(), variables, true);

skip == include
}
}

const EMPTY_VEC: &Vec<Field<Nested>> = &Vec::new();
impl Field<Nested> {
Expand Down Expand Up @@ -90,6 +151,8 @@ impl Field<Flat> {
name: self.name,
ir: self.ir,
type_of: self.type_of,
skip: self.skip,
include: self.include,
args: self.args,
extensions,
}
Expand Down
11 changes: 6 additions & 5 deletions src/core/jit/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ use serde::Deserialize;

use super::{Builder, Error, ExecutionPlan, Result};
use crate::core::blueprint::Blueprint;
use crate::core::jit::model::Variables;

#[derive(Debug, Deserialize, Setters)]
#[derive(Debug, Deserialize, Setters, Clone)]
pub struct Request<Value> {
#[serde(default)]
pub query: String,
#[serde(default, rename = "operationName")]
pub operation_name: Option<String>,
#[serde(default)]
pub variables: HashMap<String, Value>,
pub variables: Variables<Value>,
#[serde(default)]
pub extensions: HashMap<String, Value>,
}
Expand All @@ -25,9 +26,9 @@ impl From<async_graphql::Request> for Request<async_graphql_value::ConstValue> {
operation_name: value.operation_name,
variables: match value.variables.into_value() {
async_graphql_value::ConstValue::Object(val) => {
HashMap::from_iter(val.into_iter().map(|(k, v)| (k.to_string(), v)))
Variables::from_iter(val.into_iter().map(|(name, val)| (name.to_string(), val)))
}
_ => HashMap::new(),
_ => Variables::default(),
},
extensions: value.extensions,
}
Expand All @@ -47,7 +48,7 @@ impl<A> Request<A> {
Self {
query: query.to_string(),
operation_name: None,
variables: HashMap::new(),
variables: Variables::default(),
extensions: HashMap::new(),
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/core/jit/synth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ mod synth_const;
// pub use synth_borrow::SynthBorrow;
pub use synth_const::{Synth, SynthConst};

use super::Store;
use super::{Store, Variables};
use crate::core::json::JsonLike;
pub trait Synthesizer {
type Value;
fn synthesize(self, store: Store<Self::Value>) -> Self::Value;
type Variable: JsonLike;
fn synthesize(
self,
store: Store<Self::Value>,
variables: Variables<Self::Variable>,
) -> Self::Value;
}
7 changes: 6 additions & 1 deletion src/core/jit/synth/synth_borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ mod tests {
use crate::core::jit::model::FieldId;
use crate::core::jit::store::{Data, Store};
use crate::core::jit::synth::SynthBorrow;
use crate::core::jit::Variables;
use crate::core::valid::Validator;

const POSTS: &str = r#"
Expand Down Expand Up @@ -207,7 +208,11 @@ mod tests {
let config = Config::from_sdl(CONFIG).to_result().unwrap();
let config = ConfigModule::from(config);

let builder = Builder::new(&Blueprint::try_from(&config).unwrap(), doc);
let builder = Builder::new(
&Blueprint::try_from(&config).unwrap(),
doc,
Variables::new(),
);
let plan = builder.build().unwrap();

let store = store
Expand Down
Loading

1 comment on commit 715907e

@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 227 tests
test run_execution_spec::add-field-index-list.md ... ok
test run_execution_spec::add-field-many.md ... ok
test run_execution_spec::add-field-many-list.md ... ok
test run_execution_spec::add-field-modify.md ... ok
test run_execution_spec::add-field-with-modify.md ... ok
test run_execution_spec::add-field-with-composition.md ... ok
test run_execution_spec::add-field.md ... ok
test run_execution_spec::apollo-tracing.md ... ok
test run_execution_spec::async-cache-disabled.md ... ok
test run_execution_spec::async-cache-enable-multiple-resolvers.md ... FAILED
test run_execution_spec::async-cache-global.md ... FAILED
test run_execution_spec::async-cache-enabled.md ... FAILED
test run_execution_spec::async-cache-inflight-request.md ... FAILED
test run_execution_spec::auth-protected-without-auth.md ... ok
test run_execution_spec::auth-basic.md ... FAILED
test run_execution_spec::auth-jwt.md ... FAILED
test run_execution_spec::auth.md ... ok
test run_execution_spec::batching-disabled.md ... FAILED
test run_execution_spec::batching-default.md ... ok
test run_execution_spec::batching-group-by-default.md ... ok
test run_execution_spec::batching-group-by.md ... ok
test run_execution_spec::batching-post.md ... ok
test run_execution_spec::batching.md ... FAILED
test run_execution_spec::cache-control.md ... FAILED
test run_execution_spec::caching-collision.md ... ok
test run_execution_spec::caching.md ... ok
test run_execution_spec::call-graphql-datasource.md ... FAILED
test run_execution_spec::call-multiple-steps-piping.md ... FAILED
test run_execution_spec::call-mutation.md ... FAILED
test run_execution_spec::call-operator.md ... FAILED
test run_execution_spec::cors-allow-cred-false.md ... ok
test run_execution_spec::cors-invalid-expose-headers.md ... ok
test run_execution_spec::cors-invalid-headers.md ... ok
test run_execution_spec::cors-invalid-methods.md ... ok
test run_execution_spec::cors-invalid-origins.md ... ok
test run_execution_spec::cors-allow-cred-true.md ... ok
test run_execution_spec::cors-allow-cred-vary.md ... ok
test run_execution_spec::custom-headers.md ... ok
test run_execution_spec::dedupe_batch_query_execution.md ... FAILED
test run_execution_spec::default-value-arg.md ... FAILED
test run_execution_spec::experimental-headers-error.md ... ok
test run_execution_spec::default-value-config.md ... ok
test run_execution_spec::env-value.md ... ok
test run_execution_spec::experimental-headers.md ... FAILED
test run_execution_spec::graphql-dataloader-batch-request.md ... FAILED
test run_execution_spec::graphql-dataloader-no-batch-request.md ... FAILED
test run_execution_spec::graphql-datasource-errors.md ... FAILED
test run_execution_spec::graphql-datasource-mutation.md ... FAILED
test run_execution_spec::graphql-datasource-no-args.md ... FAILED
test run_execution_spec::graphql-datasource-with-args.md ... FAILED
test run_execution_spec::graphql-datasource-with-empty-enum.md ... ok
test run_execution_spec::graphql-nested-datasource.md ... FAILED
test run_execution_spec::graphql-datasource-with-mandatory-enum.md ... FAILED
test run_execution_spec::grpc-batch.md ... FAILED
test run_execution_spec::grpc-json.md ... FAILED
test run_execution_spec::grpc-error.md ... FAILED
test run_execution_spec::grpc-map.md ... FAILED
test run_execution_spec::grpc-oneof.md ... FAILED
test run_execution_spec::grpc-proto-with-same-package.md ... ok
test run_execution_spec::grpc-override-url-from-upstream.md ... ok
test run_execution_spec::grpc-reflection.md ... ok
test run_execution_spec::grpc-simple.md ... ok
test run_execution_spec::https.md ... ok
test run_execution_spec::grpc-url-from-upstream.md ... ok
test run_execution_spec::inline-field.md ... FAILED
test run_execution_spec::inline-index-list.md ... ok
test run_execution_spec::input-type-protected-error.md ... ok
test run_execution_spec::io-cache.md ... ok
test run_execution_spec::inline-many-list.md ... ok
test run_execution_spec::inline-many.md ... ok
test run_execution_spec::js-directive.md ... FAILED
test run_execution_spec::modified-field.md ... ok
test run_execution_spec::mutation-put.md ... FAILED
test run_execution_spec::mutation.md ... FAILED
test run_execution_spec::jsonplaceholder-call-post.md ... ok
test run_execution_spec::n-plus-one-list.md ... ok
test run_execution_spec::n-plus-one.md ... ok
test run_execution_spec::nested-objects.md ... ok
test run_execution_spec::nesting-level3.md ... ok
test run_execution_spec::nullable-arg-query.md ... FAILED
test run_execution_spec::omit-index-list.md ... ok
test run_execution_spec::omit-resolved-by-parent.md ... FAILED
test run_execution_spec::recursive-types-no-resolver.md ... ok
test run_execution_spec::omit-many.md ... ok
test run_execution_spec::recursive-types-json.md ... FAILED
test run_execution_spec::ref-other-nested.md ... ok
test run_execution_spec::ref-other.md ... ok
test run_execution_spec::recursive-types.md ... FAILED
test run_execution_spec::rename-field.md ... ok
test run_execution_spec::request-to-upstream-batching.md ... FAILED
test run_execution_spec::resolve-with-headers.md ... FAILED
test run_execution_spec::resolve-with-vars.md ... ok
test run_execution_spec::resolved-by-parent.md ... FAILED
test run_execution_spec::rest-api-error.md ... ok
test run_execution_spec::rest-api-post.md ... ok
test run_execution_spec::rest-api.md ... ok
test run_execution_spec::showcase.md ... ok
test run_execution_spec::test-add-field-error.md ... ok
test run_execution_spec::simple-graphql.md ... ok
test run_execution_spec::simple-query.md ... ok
test run_execution_spec::test-add-field-list.md ... ok
test run_execution_spec::test-all-blueprint-errors.md ... ok
test run_execution_spec::test-batch-operator-post.md ... ok
test run_execution_spec::test-add-field.md ... ok
test run_execution_spec::test-add-link-to-empty-config.md ... ok
test run_execution_spec::test-call-operator-errors.md ... ok
test run_execution_spec::test-conflict-allowed-headers.md ... ok
test run_execution_spec::test-conflict-vars.md ... ok
test run_execution_spec::test-batching-group-by.md ... ok
test run_execution_spec::test-cache.md ... ok
test run_execution_spec::test-dbl-usage-many.md ... ok
test run_execution_spec::test-custom-scalar.md ... ok
test run_execution_spec::test-directives-undef-null-fields.md ... ok
test run_execution_spec::test-duplicated-link.md ... ok
test run_execution_spec::test-empty-link.md ... ok
test run_execution_spec::test-custom-types.md ... ok
test run_execution_spec::test-enable-jit.md ... ok
test run_execution_spec::test-description-many.md ... ok
test run_execution_spec::test-enum-aliases.md ... ok
test run_execution_spec::test-enum-empty.md ... ok
test run_execution_spec::test-enum-default.md ... ok
test run_execution_spec::test-enum-merge.md ... ok
test run_execution_spec::test-expr-error.md ... ok
test run_execution_spec::test-enum-description.md ... FAILED
test run_execution_spec::test-expr-with-add-field.md ... ok
test run_execution_spec::test-expr-with-inline.md ... ok
test run_execution_spec::test-expr-scalar-as-string.md ... ok
test run_execution_spec::test-enum.md ... FAILED
test run_execution_spec::test-field-already-implemented-from-Interface.md ... ok
test run_execution_spec::test-graphqlsource-no-base-url.md ... ok
test run_execution_spec::test-expr-with-mustache.md ... ok
test run_execution_spec::test-groupby-without-batching.md ... ok
test run_execution_spec::test-grpc-group-by.md ... ok
test run_execution_spec::test-grpc-invalid-method-format.md ... ok
test run_execution_spec::test-grpc-invalid-proto-id.md ... ok
test run_execution_spec::test-grpc-missing-fields.md ... ok
test run_execution_spec::test-grpc-nested-data.md ... ok
test run_execution_spec::test-grpc-nested-optional.md ... ok
test run_execution_spec::test-grpc-optional.md ... ok
test run_execution_spec::test-grpc-proto-path.md ... ok
test run_execution_spec::test-grpc-service-method.md ... ok
test run_execution_spec::test-grpc-service.md ... ok
test run_execution_spec::test-expr.md ... ok
test run_execution_spec::test-hostname-faliure.md ... ok
test run_execution_spec::test-graphqlsource.md ... ok
test run_execution_spec::test-grpc.md ... ok
test run_execution_spec::test-http-baseurl.md ... ok
test run_execution_spec::test-http-with-add-field.md ... ok
test run_execution_spec::test-http-with-inline.md ... ok
test run_execution_spec::test-http-headers.md ... ok
test run_execution_spec::test-http-tmpl.md ... ok
test run_execution_spec::test-http-with-mustache-expr.md ... ok
test run_execution_spec::test-inline-error.md ... ok
test run_execution_spec::test-http.md ... ok
test run_execution_spec::test-inline-list.md ... ok
test run_execution_spec::test-inline.md ... ok
test run_execution_spec::test-input-out.md ... FAILED
test run_execution_spec::test-input-with-arg-out.md ... FAILED
test run_execution_spec::test-input-documentation.md ... ok
test run_execution_spec::test-interface-from-json.md ... ok
test run_execution_spec::test-invalid-query-in-http.md ... ok
test run_execution_spec::test-invalid-server.md ... ok
test run_execution_spec::test-js-multi-onRequest-handlers.md ... ok
test run_execution_spec::test-js-multiple-scripts.md ... ok
test run_execution_spec::test-interface-result.md ... ok
test run_execution_spec::test-interface.md ... ok
test run_execution_spec::test-lack-resolver.md ... ok
test run_execution_spec::test-js-request-response-2.md ... ok
test run_execution_spec::test-js-request-response.md ... ok
test run_execution_spec::test-merge-batch.md ... ok
test run_execution_spec::test-list-args.md ... FAILED
test run_execution_spec::test-merge-nested.md ... ok
test run_execution_spec::test-merge-query.md ... ok
test run_execution_spec::test-merge-right-with-link-config.md ... ok
test run_execution_spec::test-merge-union.md ... ok
test run_execution_spec::test-missing-mutation-resolver.md ... ok
test run_execution_spec::test-missing-query-resolver.md ... ok
test run_execution_spec::test-missing-root-types.md ... ok
test run_execution_spec::test-missing-schema-query.md ... ok
test run_execution_spec::test-missing-argument-on-all-resolvers.md ... ok
test run_execution_spec::test-merge-server-sdl.md ... ok
test run_execution_spec::test-multiple-config-types.md ... FAILED
test run_execution_spec::test-multiple-resolvable-directives-on-field.md ... ok
test run_execution_spec::test-multi-interface.md ... ok
test run_execution_spec::test-modify.md ... ok
test run_execution_spec::test-nested-input.md ... ok
test run_execution_spec::test-no-base-url.md ... ok
test run_execution_spec::test-nested-link.md ... ok
test run_execution_spec::test-nested-value.md ... ok
test run_execution_spec::test-null-in-array.md ... ok
test run_execution_spec::test-null-in-object.md ... ok
test run_execution_spec::test-omit-list.md ... ok
test run_execution_spec::test-params-as-body.md ... FAILED
test run_execution_spec::test-omit.md ... ok
test run_execution_spec::test-query-documentation.md ... ok
test run_execution_spec::test-query.md ... ok
test run_execution_spec::test-response-header-value.md ... ok
test run_execution_spec::test-response-headers-multi.md ... ok
test run_execution_spec::test-response-headers-name.md ... ok
test run_execution_spec::test-ref-other.md ... ok
test run_execution_spec::test-response-header-merge.md ... ok
test run_execution_spec::test-scalars-builtin.md ... FAILED
test run_execution_spec::test-scalars-validation.md ... FAILED
test run_execution_spec::test-scalars-integers.md ... FAILED
test run_execution_spec::test-server-base-types.md ... ok
test run_execution_spec::test-scalars.md ... FAILED
test run_execution_spec::test-set-cookie-headers.md ... FAILED
test run_execution_spec::test-static-value.md ... ok
test run_execution_spec::test-undefined-query.md ... ok
test run_execution_spec::test-server-vars.md ... ok
test run_execution_spec::test-union-many-types.md ... ok
test run_execution_spec::test-union-same-types.md ... ok
test run_execution_spec::test-union-ambiguous.md ... FAILED
test run_execution_spec::test-tag.md ... ok
test run_execution_spec::test-upstream-headers.md ... ok
test run_execution_spec::undeclared-type-no-base-url.md ... ok
test run_execution_spec::undeclared-type.md ... ok
test run_execution_spec::test-union.md ... FAILED
test run_execution_spec::upstream-batching.md ... FAILED
test run_execution_spec::test-upstream.md ... ok
test run_execution_spec::upstream-fail-request.md ... FAILED
test run_execution_spec::with-args-url.md ... FAILED
test run_execution_spec::with-args.md ... FAILED
test run_execution_spec::with-nesting.md ... ok
test run_execution_spec::yaml-nested-unions.md ... ok
test run_execution_spec::yaml-union.md ... ok
test run_execution_spec::yaml-union-in-type.md ... ok

failures:

---- run_execution_spec::async-cache-enable-multiple-resolvers.md ----
test panicked: not yet implemented

---- run_execution_spec::async-cache-global.md ----
test panicked: not yet implemented

---- run_execution_spec::async-cache-enabled.md ----
test panicked: not yet implemented

---- run_execution_spec::async-cache-inflight-request.md ----
test panicked: not yet implemented

---- run_execution_spec::auth-basic.md ----
test panicked: snapshot assertion for 'auth-basic.md_1' failed in line 202

---- run_execution_spec::auth-jwt.md ----
test panicked: snapshot assertion for 'auth-jwt.md_1' failed in line 202

---- run_execution_spec::batching-disabled.md ----
test panicked: not yet implemented

---- run_execution_spec::batching.md ----
test panicked: not yet implemented

---- run_execution_spec::cache-control.md ----
test panicked: not yet implemented

---- run_execution_spec::call-graphql-datasource.md ----
test panicked: not yet implemented

---- run_execution_spec::call-multiple-steps-piping.md ----
test panicked: not yet implemented

---- run_execution_spec::call-mutation.md ----
test panicked: not yet implemented

---- run_execution_spec::call-operator.md ----
test panicked: not yet implemented

---- run_execution_spec::dedupe_batch_query_execution.md ----
test panicked: not yet implemented

---- run_execution_spec::default-value-arg.md ----
test panicked: not yet implemented

---- run_execution_spec::experimental-headers.md ----
test panicked: snapshot assertion for 'experimental-headers.md_0' failed in line 202

---- run_execution_spec::graphql-dataloader-batch-request.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-dataloader-no-batch-request.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-datasource-errors.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-datasource-mutation.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-datasource-no-args.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-datasource-with-args.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-nested-datasource.md ----
test panicked: not yet implemented

---- run_execution_spec::graphql-datasource-with-mandatory-enum.md ----
test panicked: snapshot assertion for 'graphql-datasource-with-mandatory-enum.md_0' failed in line 202

---- run_execution_spec::grpc-batch.md ----
test panicked: not yet implemented

---- run_execution_spec::grpc-json.md ----
test panicked: not yet implemented

---- run_execution_spec::grpc-error.md ----
test panicked: snapshot assertion for 'grpc-error.md_0' failed in line 202

---- run_execution_spec::grpc-map.md ----
test panicked: not yet implemented

---- run_execution_spec::grpc-oneof.md ----
test panicked: not yet implemented

---- run_execution_spec::inline-field.md ----
test panicked: snapshot assertion for 'inline-field.md_0' failed in line 202

---- run_execution_spec::js-directive.md ----
test panicked: snapshot assertion for 'js-directive.md_0' failed in line 202

---- run_execution_spec::mutation-put.md ----
test panicked: not yet implemented

---- run_execution_spec::mutation.md ----
test panicked: not yet implemented

---- run_execution_spec::nullable-arg-query.md ----
test panicked: not yet implemented

---- run_execution_spec::omit-resolved-by-parent.md ----
test panicked: snapshot assertion for 'omit-resolved-by-parent.md_0' failed in line 202

---- run_execution_spec::recursive-types-json.md ----
test panicked: snapshot assertion for 'recursive-types-json.md_0' failed in line 202

---- run_execution_spec::recursive-types.md ----
test panicked: snapshot assertion for 'recursive-types.md_0' failed in line 202

---- run_execution_spec::request-to-upstream-batching.md ----
test panicked: not yet implemented

---- run_execution_spec::resolve-with-headers.md ----
test panicked: snapshot assertion for 'resolve-with-headers.md_0' failed in line 202

---- run_execution_spec::resolved-by-parent.md ----
test panicked: snapshot assertion for 'resolved-by-parent.md_0' failed in line 202

---- run_execution_spec::test-enum-description.md ----
test panicked: not yet implemented

---- run_execution_spec::test-enum.md ----
test panicked: not yet implemented

---- run_execution_spec::test-input-out.md ----
test panicked: not yet implemented

---- run_execution_spec::test-input-with-arg-out.md ----
test panicked: not yet implemented

---- run_execution_spec::test-list-args.md ----
test panicked: not yet implemented

---- run_execution_spec::test-multiple-config-types.md ----
test panicked: not yet implemented

---- run_execution_spec::test-params-as-body.md ----
test panicked: not yet implemented

---- run_execution_spec::test-scalars-builtin.md ----
test panicked: not yet implemented

---- run_execution_spec::test-scalars-validation.md ----
test panicked: not yet implemented

---- run_execution_spec::test-scalars-integers.md ----
test panicked: not yet implemented

---- run_execution_spec::test-scalars.md ----
test panicked: not yet implemented

---- run_execution_spec::test-set-cookie-headers.md ----
test panicked: not yet implemented

---- run_execution_spec::test-union-ambiguous.md ----
test panicked: snapshot assertion for 'test-union-ambiguous.md_3' failed in line 202

---- run_execution_spec::test-union.md ----
test panicked: snapshot assertion for 'test-union.md_3' failed in line 202

---- run_execution_spec::upstream-batching.md ----
test panicked: not yet implemented

---- run_execution_spec::upstream-fail-request.md ----
test panicked: snapshot assertion for 'upstream-fail-request.md_0' failed in line 202

---- run_execution_spec::with-args-url.md ----
test panicked: not yet implemented

---- run_execution_spec::with-args.md ----
test panicked: not yet implemented

failures:
run_execution_spec::async-cache-enable-multiple-resolvers.md
run_execution_spec::async-cache-global.md
run_execution_spec::async-cache-enabled.md
run_execution_spec::async-cache-inflight-request.md
run_execution_spec::auth-basic.md
run_execution_spec::auth-jwt.md
run_execution_spec::batching-disabled.md
run_execution_spec::batching.md
run_execution_spec::cache-control.md
run_execution_spec::call-graphql-datasource.md
run_execution_spec::call-multiple-steps-piping.md
run_execution_spec::call-mutation.md
run_execution_spec::call-operator.md
run_execution_spec::dedupe_batch_query_execution.md
run_execution_spec::default-value-arg.md
run_execution_spec::experimental-headers.md
run_execution_spec::graphql-dataloader-batch-request.md
run_execution_spec::graphql-dataloader-no-batch-request.md
run_execution_spec::graphql-datasource-errors.md
run_execution_spec::graphql-datasource-mutation.md
run_execution_spec::graphql-datasource-no-args.md
run_execution_spec::graphql-datasource-with-args.md
run_execution_spec::graphql-nested-datasource.md
run_execution_spec::graphql-datasource-with-mandatory-enum.md
run_execution_spec::grpc-batch.md
run_execution_spec::grpc-json.md
run_execution_spec::grpc-error.md
run_execution_spec::grpc-map.md
run_execution_spec::grpc-oneof.md
run_execution_spec::inline-field.md
run_execution_spec::js-directive.md
run_execution_spec::mutation-put.md
run_execution_spec::mutation.md
run_execution_spec::nullable-arg-query.md
run_execution_spec::omit-resolved-by-parent.md
run_execution_spec::recursive-types-json.md
run_execution_spec::recursive-types.md
run_execution_spec::request-to-upstream-batching.md
run_execution_spec::resolve-with-headers.md
run_execution_spec::resolved-by-parent.md
run_execution_spec::test-enum-description.md
run_execution_spec::test-enum.md
run_execution_spec::test-input-out.md
run_execution_spec::test-input-with-arg-out.md
run_execution_spec::test-list-args.md
run_execution_spec::test-multiple-config-types.md
run_execution_spec::test-params-as-body.md
run_execution_spec::test-scalars-builtin.md
run_execution_spec::test-scalars-validation.md
run_execution_spec::test-scalars-integers.md
run_execution_spec::test-scalars.md
run_execution_spec::test-set-cookie-headers.md
run_execution_spec::test-union-ambiguous.md
run_execution_spec::test-union.md
run_execution_spec::upstream-batching.md
run_execution_spec::upstream-fail-request.md
run_execution_spec::with-args-url.md
run_execution_spec::with-args.md

test result: FAILED. 169 passed; 58 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.36s

Please sign in to comment.