Skip to content

Commit

Permalink
chore: drop HRTB from Synth (tailcallhq#2485)
Browse files Browse the repository at this point in the history
ssddOnTop authored Jul 24, 2024
1 parent 19ee0bd commit a8940f3
Showing 21 changed files with 148 additions and 137 deletions.
4 changes: 2 additions & 2 deletions src/core/blueprint/blueprint.rs
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ use std::sync::Arc;
use async_graphql::dynamic::{Schema, SchemaBuilder};
use async_graphql::extensions::ApolloTracing;
use async_graphql::ValidationMode;
use async_graphql_value::ConstValue;
use derive_setters::Setters;
use serde_json::Value;

use super::telemetry::Telemetry;
use super::{GlobalTimeout, Index};
use crate::core::blueprint::{Server, Upstream};
use crate::core::ir::model::IR;
use crate::core::scalar;
use crate::core::schema_extension::SchemaExtension;

/// Blueprint is an intermediary representation that allows us to generate
@@ -191,7 +191,7 @@ pub struct ScalarTypeDefinition {
pub name: String,
pub directive: Vec<Directive>,
pub description: Option<String>,
pub validator: fn(&ConstValue) -> bool,
pub validator: scalar::ScalarType,
}

#[derive(Clone, Debug)]
5 changes: 3 additions & 2 deletions src/core/blueprint/into_schema.rs
Original file line number Diff line number Diff line change
@@ -198,7 +198,8 @@ fn to_type(def: &Definition) -> dynamic::Type {
if let Some(description) = &def.description {
scalar = scalar.description(description);
}
scalar = scalar.validator(def.validator);
let name = def.validator.clone();
scalar = scalar.validator(move |v| name.validate()(v));
dynamic::Type::Scalar(scalar)
}
Definition::Enum(def) => {
@@ -229,7 +230,7 @@ impl From<&Blueprint> for SchemaBuilder {

for (k, v) in CUSTOM_SCALARS.iter() {
schema = schema.register(dynamic::Type::Scalar(
dynamic::Scalar::new(k.clone()).validator(v.validate::<ConstValue>()),
dynamic::Scalar::new(k.clone()).validator(move |val| (v.validate())(val)),
));
}

148 changes: 79 additions & 69 deletions src/core/jit/synth/synth.rs
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ use async_graphql::Positioned;
use crate::core::jit::model::{Field, Nested, OperationPlan, Variable, Variables};
use crate::core::jit::store::{Data, DataPath, Store};
use crate::core::jit::{Error, ValidationError};
use crate::core::json::{JsonLikeOwned, JsonObjectLike};
use crate::core::scalar::get_scalar;
use crate::core::json::{JsonLike, JsonObjectLike};
use crate::core::scalar::{self, Scalar};

pub struct Synth<Value> {
selection: Vec<Field<Nested<Value>, Value>>,
@@ -14,23 +14,27 @@ pub struct Synth<Value> {

impl<Extensions, Input> Field<Extensions, Input> {
#[inline(always)]
pub fn skip<Value: JsonLikeOwned>(&self, variables: &Variables<Value>) -> bool {
let eval =
|variable_option: Option<&Variable>, variables: &Variables<Value>, default: bool| {
variable_option
.map(|a| a.as_str())
.and_then(|name| variables.get(name))
.and_then(|value| value.as_bool())
.unwrap_or(default)
};
pub fn skip<'json, Value: JsonLike<'json>>(
&'json self,
variables: &'json Variables<Value>,
) -> bool {
let eval = |variable_option: Option<&'json Variable>,
variables: &'json Variables<Value>,
default: bool| {
variable_option
.map(|a| a.as_str())
.and_then(|name| variables.get(name))
.and_then(|value| value.as_bool())
.unwrap_or(default)
};
let skip = eval(self.skip.as_ref(), variables, false);
let include = eval(self.include.as_ref(), variables, true);

skip == include
}
}

impl<Value: JsonLikeOwned + Clone> Synth<Value> {
impl<'a, Value: JsonLike<'a> + Clone + 'a> Synth<Value> {
#[inline(always)]
pub fn new(
plan: OperationPlan<Value>,
@@ -46,7 +50,7 @@ impl<Value: JsonLikeOwned + Clone> Synth<Value> {
}

#[inline(always)]
pub fn synthesize(&self) -> Result<Value, Positioned<Error>> {
pub fn synthesize(&'a self) -> Result<Value, Positioned<Error>> {
let mut data = Value::JsonObject::new();

for child in self.selection.iter() {
@@ -62,15 +66,15 @@ impl<Value: JsonLikeOwned + Clone> Synth<Value> {

/// checks if type_of is an array and value is an array
#[inline(always)]
fn is_array(type_of: &crate::core::blueprint::Type, value: &Value) -> bool {
fn is_array(type_of: &crate::core::blueprint::Type, value: &'a Value) -> bool {
type_of.is_list() == value.as_array().is_some()
}

#[inline(always)]
fn iter<'b>(
&'b self,
node: &'b Field<Nested<Value>, Value>,
parent: Option<&'b Value>,
fn iter(
&'a self,
node: &'a Field<Nested<Value>, Value>,
parent: Option<&'a Value>,
data_path: &DataPath,
) -> Result<Value, Positioned<Error>> {
// TODO: this implementation prefer parent value over value in the store
@@ -120,20 +124,20 @@ impl<Value: JsonLikeOwned + Clone> Synth<Value> {
}
}
#[inline(always)]
fn iter_inner<'b>(
&'b self,
node: &'b Field<Nested<Value>, Value>,
parent: &'b Value,
data_path: &'b DataPath,
fn iter_inner(
&'a self,
node: &'a Field<Nested<Value>, Value>,
parent: &'a Value,
data_path: &DataPath,
) -> Result<Value, Positioned<Error>> {
let include = self.include(node);
if include && node.is_scalar {
let validation = get_scalar(node.type_of.name());
let scalar = scalar::get_scalar(node.type_of.name());

// TODO: add validation for input type as well. But input types are not checked
// by async_graphql anyway so it should be done after replacing
// default engine with JIT
if validation(parent) {
if (scalar.validate())(parent) {
Ok(parent.clone())
} else {
Err(Positioned {
@@ -209,18 +213,17 @@ impl<Value: JsonLikeOwned + Clone> Synth<Value> {

#[cfg(test)]
mod tests {

use async_graphql_value::ConstValue;
use serde::de::DeserializeOwned;
use serde::Serialize;
use serde::{Deserialize, Serialize};

use crate::core::blueprint::Blueprint;
use crate::core::config::{Config, ConfigModule};
use crate::core::jit::builder::Builder;
use crate::core::jit::common::JsonPlaceholder;
use crate::core::jit::model::{FieldId, Variables};
use crate::core::jit::store::{Data, Store};
use crate::core::json::JsonLikeOwned;
use crate::core::jit::synth::Synth;
use crate::core::json::JsonLike;
use crate::core::valid::Validator;

const POSTS: &str = r#"
@@ -264,6 +267,7 @@ mod tests {
]
"#;

#[derive(Clone)]
enum TestData {
Posts,
UsersData,
@@ -272,7 +276,7 @@ mod tests {
}

impl TestData {
fn into_value<Value: JsonLikeOwned + DeserializeOwned>(self) -> Data<Value> {
fn into_value<'a, Value: JsonLike<'a> + Deserialize<'a>>(self) -> Data<Value> {
match self {
Self::Posts => Data::Single(serde_json::from_str(POSTS).unwrap()),
Self::User1 => Data::Single(serde_json::from_str(USER1).unwrap()),
@@ -292,10 +296,13 @@ mod tests {

const CONFIG: &str = include_str!("../fixtures/jsonplaceholder-mutation.graphql");

fn init<Value: JsonLikeOwned + DeserializeOwned + Serialize + Clone>(
fn make_store<
'a,
Value: JsonLike<'a> + Deserialize<'a> + Serialize + Clone + 'a + std::fmt::Debug,
>(
query: &str,
store: Vec<(FieldId, TestData)>,
) -> String {
) -> Synth<Value> {
let store = store
.into_iter()
.map(|(id, data)| (id, data.into_value()))
@@ -307,12 +314,7 @@ mod tests {

let builder = Builder::new(&Blueprint::try_from(&config).unwrap(), doc);
let plan = builder.build(&Variables::new(), None).unwrap();
let plan = plan
.try_map(|v: ConstValue| {
let v = v.into_json()?;
Ok::<_, anyhow::Error>(serde_json::from_value::<Value>(v)?)
})
.unwrap();
let plan = plan.try_map(Deserialize::deserialize).unwrap();

let store = store
.into_iter()
@@ -321,40 +323,54 @@ mod tests {
store
});
let vars = Variables::new();
let synth = super::Synth::new(plan, store, vars);
let val = synth.synthesize().unwrap();

serde_json::to_string_pretty(&val).unwrap()
super::Synth::new(plan, store, vars)
}

struct Synths<'a> {
synth_const: Synth<async_graphql::Value>,
synth_borrow: Synth<serde_json_borrow::Value<'a>>,
}

impl<'a> Synths<'a> {
fn init(query: &str, store: Vec<(FieldId, TestData)>) -> Self {
let synth_const = make_store::<ConstValue>(query, store.clone());
let synth_borrow = make_store::<serde_json_borrow::Value>(query, store.clone());
Self { synth_const, synth_borrow }
}
fn assert(self) {
let val_const = self.synth_const.synthesize().unwrap();
let val_const = serde_json::to_string_pretty(&val_const).unwrap();
let val_borrow = self.synth_borrow.synthesize().unwrap();
let val_borrow = serde_json::to_string_pretty(&val_borrow).unwrap();
assert_eq!(val_const, val_borrow);
}
}

#[test]
fn test_posts() {
let store = vec![(FieldId::new(0), TestData::Posts)];

let val = init::<ConstValue>(
r#"
let query = r#"
query {
posts { id }
}
"#,
store,
);
insta::assert_snapshot!(val);
"#;

let synths = Synths::init(query, store);
synths.assert();
}

#[test]
fn test_user() {
let store = vec![(FieldId::new(0), TestData::User1)];

let val = init::<ConstValue>(
r#"
let query = r#"
query {
user(id: 1) { id }
}
"#,
store,
);
insta::assert_snapshot!(val);
"#;

let synths = Synths::init(query, store);
synths.assert();
}

#[test]
@@ -363,16 +379,13 @@ mod tests {
(FieldId::new(0), TestData::Posts),
(FieldId::new(3), TestData::UsersData),
];

let val = init::<ConstValue>(
r#"
let query = r#"
query {
posts { id title user { id name } }
}
"#,
store,
);
insta::assert_snapshot!(val);
"#;
let synths = Synths::init(query, store);
synths.assert();
}

#[test]
@@ -382,17 +395,14 @@ mod tests {
(FieldId::new(3), TestData::UsersData),
(FieldId::new(6), TestData::Users),
];

let val = init::<ConstValue>(
r#"
let query = r#"
query {
posts { id title user { id name } }
users { id name }
}
"#,
store,
);
insta::assert_snapshot!(val)
"#;
let synths = Synths::init(query, store);
synths.assert();
}

#[test]
6 changes: 3 additions & 3 deletions src/core/scalar/bytes.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use schemars::JsonSchema;
use tailcall_macros::ScalarDefinition;

use crate::core::json::JsonLikeOwned;
use crate::core::json::JsonLike;

/// Represents list of bytes
#[derive(JsonSchema, Default, ScalarDefinition)]
#[derive(JsonSchema, Default, ScalarDefinition, Clone, Debug)]
pub struct Bytes(pub String);

impl super::Scalar for Bytes {
fn validate<Value: JsonLikeOwned>(&self) -> fn(&Value) -> bool {
fn validate<'a, Value: JsonLike<'a>>(&self) -> fn(&'a Value) -> bool {
|value| value.as_str().is_some()
}
}
6 changes: 3 additions & 3 deletions src/core/scalar/date.rs
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@ use chrono::DateTime;
use schemars::JsonSchema;
use tailcall_macros::ScalarDefinition;

use crate::core::json::JsonLikeOwned;
use crate::core::json::JsonLike;

/// A date string, such as 2007-12-03, is compliant with the full-date format outlined in section 5.6 of the RFC 3339 (https://datatracker.ietf.org/doc/html/rfc3339) profile of the ISO 8601 standard for the representation of dates and times using the Gregorian calendar.
#[derive(JsonSchema, Default, ScalarDefinition)]
#[derive(JsonSchema, Default, ScalarDefinition, Clone, Debug)]
pub struct Date {
#[allow(dead_code)]
#[serde(rename = "Date")]
@@ -14,7 +14,7 @@ pub struct Date {

impl super::Scalar for Date {
/// Function used to validate the date
fn validate<Value: JsonLikeOwned>(&self) -> fn(&Value) -> bool {
fn validate<'a, Value: JsonLike<'a>>(&self) -> fn(&'a Value) -> bool {
|value| {
if let Some(date_str) = value.as_str() {
if DateTime::parse_from_rfc3339(date_str).is_ok() {
6 changes: 3 additions & 3 deletions src/core/scalar/email.rs
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@ use async_graphql::validators::email;
use schemars::JsonSchema;
use tailcall_macros::ScalarDefinition;

use crate::core::json::JsonLikeOwned;
use crate::core::json::JsonLike;

/// field whose value conforms to the standard internet email address format as specified in HTML Spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address.
#[derive(JsonSchema, Default, ScalarDefinition)]
#[derive(JsonSchema, Default, ScalarDefinition, Clone, Debug)]
pub struct Email {
#[allow(dead_code)]
#[serde(rename = "Email")]
@@ -24,7 +24,7 @@ fn email_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::S

impl super::Scalar for Email {
/// Function used to validate the email address
fn validate<Value: JsonLikeOwned>(&self) -> fn(&Value) -> bool {
fn validate<'a, Value: JsonLike<'a>>(&self) -> fn(&'a Value) -> bool {
|value| {
if let Some(email_str) = value.as_str() {
let email_str = email_str.to_string();
Loading

1 comment on commit a8940f3

@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 230 tests
test run_execution_spec::add-field-index-list.md ... ok
test run_execution_spec::add-field-many-list.md ... ok
test run_execution_spec::add-field-many.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 ... ok
test run_execution_spec::async-cache-enabled.md ... ok
test run_execution_spec::async-cache-inflight-request.md ... ok
test run_execution_spec::auth-protected-without-auth.md ... ok
test run_execution_spec::auth-jwt.md ... ok
test run_execution_spec::auth-basic.md ... ok
test run_execution_spec::batching-disabled.md ... ok
test run_execution_spec::batching-default.md ... ok
test run_execution_spec::auth.md ... ok
test run_execution_spec::batching-group-by-default.md ... ok
test run_execution_spec::batching-group-by-optional-key.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 ... ok
test run_execution_spec::cache-control.md ... ok
test run_execution_spec::caching.md ... ok
test run_execution_spec::caching-collision.md ... ok
test run_execution_spec::call-graphql-datasource.md ... ok
test run_execution_spec::call-multiple-steps-piping.md ... ok
test run_execution_spec::call-mutation.md ... ok
test run_execution_spec::call-operator.md ... ok
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 ... ok
test run_execution_spec::default-value-arg.md ... ok
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 ... ok
test run_execution_spec::graphql-dataloader-batch-request.md ... ok
test run_execution_spec::graphql-dataloader-no-batch-request.md ... ok
test run_execution_spec::graphql-datasource-errors.md ... FAILED
test run_execution_spec::graphql-datasource-mutation.md ... ok
test run_execution_spec::graphql-datasource-no-args.md ... ok
test run_execution_spec::graphql-datasource-with-empty-enum.md ... ok
test run_execution_spec::graphql-datasource-with-args.md ... ok
test run_execution_spec::graphql-datasource-query-directives.md ... FAILED
test run_execution_spec::graphql-nested-datasource.md ... ok
test run_execution_spec::graphql-datasource-with-mandatory-enum.md ... FAILED
test run_execution_spec::grpc-batch.md ... ok
test run_execution_spec::grpc-json.md ... ok
test run_execution_spec::grpc-error.md ... ok
test run_execution_spec::grpc-map.md ... ok
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-oneof.md ... FAILED
test run_execution_spec::grpc-reflection.md ... ok
test run_execution_spec::grpc-simple.md ... ok
test run_execution_spec::grpc-url-from-upstream.md ... ok
test run_execution_spec::https.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 ... ok
test run_execution_spec::jsonplaceholder-call-post.md ... ok
test run_execution_spec::mutation.md ... ok
test run_execution_spec::nested-objects.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::nesting-level3.md ... ok
test run_execution_spec::omit-index-list.md ... ok
test run_execution_spec::nullable-arg-query.md ... ok
test run_execution_spec::recursive-types-json.md ... FAILED
test run_execution_spec::recursive-types-no-resolver.md ... ok
test run_execution_spec::omit-resolved-by-parent.md ... FAILED
test run_execution_spec::omit-many.md ... ok
test run_execution_spec::recursive-types.md ... FAILED
test run_execution_spec::ref-other-nested.md ... ok
test run_execution_spec::ref-other.md ... ok
test run_execution_spec::rename-field.md ... ok
test run_execution_spec::request-to-upstream-batching.md ... ok
test run_execution_spec::resolve-with-headers.md ... ok
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-expr-scalar-as-string.md ... ok
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-enum-description.md ... FAILED
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-batchKey.md ... FAILED
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-with-mustache-expr.md ... ok
test run_execution_spec::test-inline-error.md ... ok
test run_execution_spec::test-http-tmpl.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 ... ok
test run_execution_spec::test-input-documentation.md ... ok
test run_execution_spec::test-input-with-arg-out.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.md ... ok
test run_execution_spec::test-interface-result.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-list-args.md ... ok
test run_execution_spec::test-merge-batch.md ... ok
test run_execution_spec::test-merge-nested.md ... ok
test run_execution_spec::test-merge-query.md ... ok
test run_execution_spec::test-merge-union.md ... ok
test run_execution_spec::test-missing-argument-on-all-resolvers.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-merge-right-with-link-config.md ... ok
test run_execution_spec::test-merge-server-sdl.md ... ok
test run_execution_spec::test-multiple-config-types.md ... ok
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-value.md ... ok
test run_execution_spec::test-nested-link.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 ... ok
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-response-header-merge.md ... ok
test run_execution_spec::test-ref-other.md ... ok
test run_execution_spec::test-scalars-builtin.md ... ok
test run_execution_spec::test-scalars-validation.md ... ok
test run_execution_spec::test-scalars-integers.md ... ok
test run_execution_spec::test-server-base-types.md ... ok
test run_execution_spec::test-set-cookie-headers.md ... ok
test run_execution_spec::test-server-vars.md ... ok
test run_execution_spec::test-static-value.md ... ok
test run_execution_spec::test-undefined-query.md ... ok
test run_execution_spec::test-scalars.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 ... ok
test run_execution_spec::test-upstream.md ... ok
test run_execution_spec::upstream-fail-request.md ... ok
test run_execution_spec::with-args-url.md ... ok
test run_execution_spec::with-args.md ... ok
test run_execution_spec::with-nesting.md ... ok
test run_execution_spec::yaml-nested-unions.md ... ok
test run_execution_spec::yaml-union-in-type.md ... ok
test run_execution_spec::yaml-union.md ... ok

failures:

---- run_execution_spec::async-cache-enable-multiple-resolvers.md ----
test panicked: snapshot assertion for 'async-cache-enable-multiple-resolvers.md_0' failed in line 202

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

---- run_execution_spec::graphql-datasource-query-directives.md ----
test panicked: snapshot assertion for 'graphql-datasource-query-directives.md_0' failed in line 202

---- 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-oneof.md ----
test panicked: snapshot assertion for 'grpc-oneof.md_0' failed in line 202

---- 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::recursive-types-json.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.md ----
test panicked: snapshot assertion for 'recursive-types.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: snapshot assertion for 'test-enum-description.md_2' failed in line 202

---- run_execution_spec::test-enum.md ----
test panicked: snapshot assertion for 'test-enum.md_2' failed in line 202

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

---- 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

failures:
run_execution_spec::async-cache-enable-multiple-resolvers.md
run_execution_spec::graphql-datasource-errors.md
run_execution_spec::graphql-datasource-query-directives.md
run_execution_spec::graphql-datasource-with-mandatory-enum.md
run_execution_spec::grpc-oneof.md
run_execution_spec::inline-field.md
run_execution_spec::js-directive.md
run_execution_spec::recursive-types-json.md
run_execution_spec::omit-resolved-by-parent.md
run_execution_spec::recursive-types.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-http-batchKey.md
run_execution_spec::test-union-ambiguous.md
run_execution_spec::test-union.md

test result: FAILED. 214 passed; 16 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.65s

Please sign in to comment.