Skip to content

Commit

Permalink
fix(jit): union support (#2452)
Browse files Browse the repository at this point in the history
Co-authored-by: Tushar Mathur <[email protected]>
  • Loading branch information
meskill and tusharmath authored Aug 7, 2024
1 parent 56c2e2b commit 4680f94
Show file tree
Hide file tree
Showing 20 changed files with 316 additions and 143 deletions.
5 changes: 4 additions & 1 deletion src/core/ir/resolver_context_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ impl SelectionField {
field: &crate::core::jit::Field<Nested<ConstValue>, ConstValue>,
) -> SelectionField {
let name = field.name.clone();
let selection_set = field.nested_iter().map(Self::from_jit_field).collect();
let selection_set = field
.nested_iter(field.type_of.name())
.map(Self::from_jit_field)
.collect();
let args = field
.args
.iter()
Expand Down
26 changes: 23 additions & 3 deletions src/core/jit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Builder {
fn iter(
&self,
selection: &SelectionSet,
type_of: &str,
type_condition: &str,
exts: Option<Flat>,
fragments: &HashMap<&str, &FragmentDefinition>,
) -> Vec<Field<Flat, Value>> {
Expand Down Expand Up @@ -170,7 +170,7 @@ impl Builder {
.map(|(k, v)| (k.node.as_str().to_string(), v.node.to_owned()))
.collect::<HashMap<_, _>>();

if let Some(field_def) = self.index.get_field(type_of, field_name) {
if let Some(field_def) = self.index.get_field(type_condition, field_name) {
let mut args = Vec::with_capacity(request_args.len());
if let QueryField::Field((_, schema_args)) = field_def {
for (arg_name, arg_value) in schema_args {
Expand Down Expand Up @@ -220,6 +220,7 @@ impl Builder {
ir,
is_scalar: self.index.type_is_scalar(type_of.name()),
type_of,
type_condition: type_condition.to_string(),
skip,
include,
args,
Expand All @@ -246,7 +247,20 @@ impl Builder {
));
}
}
_ => {}
Selection::InlineFragment(Positioned { node: fragment, .. }) => {
let type_of = fragment
.type_condition
.as_ref()
.map(|cond| cond.node.on.node.as_str())
.unwrap_or(type_condition);

fields.extend(self.iter(
&fragment.selection_set.node,
type_of,
exts.clone(),
fragments,
));
}
}
}

Expand Down Expand Up @@ -429,9 +443,15 @@ mod tests {
phone
}
fragment PostPII on Post {
title
body
}
query {
user(id:1) {
...UserPII
...PostPII
}
}
"#,
Expand Down
8 changes: 6 additions & 2 deletions src/core/jit/common/jp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::core::blueprint::Blueprint;
use crate::core::config::{Config, ConfigModule};
use crate::core::jit;
use crate::core::jit::builder::Builder;
use crate::core::jit::exec::TypedValue;
use crate::core::jit::store::{Data, Store};
use crate::core::jit::synth::Synth;
use crate::core::jit::{OperationPlan, Variables};
Expand All @@ -27,9 +28,11 @@ struct TestData<Value> {
users: Vec<Value>,
}

type Entry<Value> = Data<Result<TypedValue<Value>, Positioned<jit::Error>>>;

struct ProcessedTestData<Value> {
posts: Value,
users: HashMap<usize, Data<Result<Value, Positioned<jit::Error>>>>,
users: HashMap<usize, Entry<Value>>,
}

impl<'a, Value: JsonLike<'a> + Deserialize<'a> + Clone + 'a> TestData<Value> {
Expand Down Expand Up @@ -74,6 +77,7 @@ impl<'a, Value: JsonLike<'a> + Deserialize<'a> + Clone + 'a> TestData<Value> {
Value::null()
}
})
.map(TypedValue::new)
.map(Ok)
.map(Data::Single)
.enumerate()
Expand Down Expand Up @@ -128,7 +132,7 @@ impl<
.to_owned();

let store = [
(posts_id, Data::Single(Ok(posts))),
(posts_id, Data::Single(Ok(TypedValue::new(posts)))),
(users_id, Data::Multiple(users)),
]
.into_iter()
Expand Down
10 changes: 5 additions & 5 deletions src/core/jit/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pub enum ValidationError {
// with async_graphql error message for this case
#[error(r#"internal: invalid value for scalar "{type_of}", expected "FieldValue::Value""#)]
ScalarInvalid { type_of: String, path: String },
#[error("TypeName shape doesn't satisfy the processed object")]
TypeNameMismatch,
}

#[derive(Debug, Clone, Error)]
Expand Down Expand Up @@ -58,11 +60,9 @@ impl ErrorExtensions for Error {
impl Error {
pub fn path(&self) -> Vec<PathSegment> {
match self {
Error::Validation(error) => match error {
ValidationError::ScalarInvalid { type_of: _, path } => {
vec![PathSegment::Field(path.clone())]
}
},
Error::Validation(ValidationError::ScalarInvalid { type_of: _, path }) => {
vec![PathSegment::Field(path.clone())]
}
_ => Vec::new(),
}
}
Expand Down
71 changes: 60 additions & 11 deletions src/core/jit/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ use futures_util::future::join_all;
use super::context::Context;
use super::{DataPath, OperationPlan, Request, Response, Store};
use crate::core::ir::model::IR;
use crate::core::ir::TypeName;
use crate::core::jit;
use crate::core::jit::synth::Synth;
use crate::core::json::{JsonLike, JsonObjectLike};

type SharedStore<Output, Error> = Arc<Mutex<Store<Result<Output, Positioned<Error>>>>>;
type SharedStore<Output, Error> = Arc<Mutex<Store<Result<TypedValue<Output>, Positioned<Error>>>>>;

///
/// Default GraphQL executor that takes in a GraphQL Request and produces a
Expand All @@ -37,7 +38,7 @@ where
pub async fn store(
&self,
request: Request<Input>,
) -> Store<Result<Output, Positioned<jit::Error>>> {
) -> Store<Result<TypedValue<Output>, Positioned<jit::Error>>> {
let store = Arc::new(Mutex::new(Store::new()));
let mut ctx = ExecutorInner::new(request, store.clone(), self.plan.to_owned(), &self.exec);
ctx.init().await;
Expand Down Expand Up @@ -104,16 +105,23 @@ where
&'b self,
ctx: &'b Context<'b, Input, Output>,
data_path: &DataPath,
value: &'b Output,
result: TypedValueRef<'b, Output>,
) -> Result<(), Error> {
let field = ctx.field();
let TypedValueRef { value, type_name } = result;
// Array
// Check if the field expects a list
if field.type_of.is_list() {
// Check if the value is an array
if let Some(array) = value.as_array() {
join_all(field.nested_iter().map(|field| {
join_all(array.iter().enumerate().map(|(index, value)| {
join_all(array.iter().enumerate().map(|(index, value)| {
let type_name = match &type_name {
Some(TypeName::Single(type_name)) => type_name, /* TODO: should throw */
// ValidationError
Some(TypeName::Vec(v)) => &v[index],
None => field.type_of.name(),
};
join_all(field.nested_iter(type_name).map(|field| {
let ctx = ctx.with_value_and_field(value, field);
let data_path = data_path.clone().with_index(index);
async move { self.execute(&ctx, data_path).await }
Expand All @@ -128,7 +136,13 @@ where
// TODO: Validate if the value is an Object
// Has to be an Object, we don't do anything while executing if its a Scalar
else {
join_all(field.nested_iter().map(|child| {
let type_name = match &type_name {
Some(TypeName::Single(type_name)) => type_name,
Some(TypeName::Vec(_)) => panic!("TypeName type mismatch"), /* TODO: should throw ValidationError */
None => field.type_of.name(),
};

join_all(field.nested_iter(type_name).map(|child| {
let ctx = ctx.with_value_and_field(value, child);
let data_path = data_path.clone();
async move { self.execute(&ctx, data_path).await }
Expand All @@ -149,8 +163,8 @@ where
if let Some(ir) = &field.ir {
let result = self.ir_exec.execute(ir, ctx).await;

if let Ok(ref value) = result {
self.iter_field(ctx, &data_path, value).await?;
if let Ok(ref result) = result {
self.iter_field(ctx, &data_path, result.as_ref()).await?;
}

let mut store = self.store.lock().unwrap();
Expand All @@ -175,15 +189,50 @@ where
// here without doing the "fix"
.unwrap_or(&default_obj);

self.iter_field(ctx, &data_path, value).await?;
let result = TypedValueRef { value, type_name: None };

self.iter_field(ctx, &data_path, result).await?;
}

Ok(())
}
}

#[derive(Clone)]
pub struct TypedValue<V> {
pub value: V,
pub type_name: Option<TypeName>,
}

pub struct TypedValueRef<'a, V> {
pub value: &'a V,
pub type_name: Option<&'a TypeName>,
}

impl<V> TypedValue<V> {
pub fn new(value: V) -> Self {
Self { value, type_name: None }
}

pub fn as_ref(&self) -> TypedValueRef<'_, V> {
TypedValueRef { value: &self.value, type_name: self.type_name.as_ref() }
}
}

impl<'a, V> TypedValueRef<'a, V> {
pub fn new(value: &'a V) -> Self {
Self { value, type_name: None }
}

pub fn map<'out, U>(&self, map: impl FnOnce(&V) -> &'out U) -> TypedValueRef<'out, U>
where
'a: 'out,
{
TypedValueRef { value: map(self.value), type_name: self.type_name }
}
}

/// Executor for IR
#[async_trait::async_trait]
pub trait IRExecutor {
type Input;
type Output;
Expand All @@ -192,5 +241,5 @@ pub trait IRExecutor {
&'a self,
ir: &'a IR,
ctx: &'a Context<'a, Self::Input, Self::Output>,
) -> Result<Self::Output, Self::Error>;
) -> Result<TypedValue<Self::Output>, Self::Error>;
}
13 changes: 8 additions & 5 deletions src/core/jit/exec_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use async_graphql_value::ConstValue;

use super::context::Context;
use super::exec::{Executor, IRExecutor};
use super::exec::{Executor, IRExecutor, TypedValue};
use super::{Error, OperationPlan, Request, Response, Result};
use crate::core::app_context::AppContext;
use crate::core::http::RequestContext;
Expand Down Expand Up @@ -47,7 +47,6 @@ impl<'a> ConstValueExec<'a> {
}
}

#[async_trait::async_trait]
impl<'ctx> IRExecutor for ConstValueExec<'ctx> {
type Input = ConstValue;
type Output = ConstValue;
Expand All @@ -57,9 +56,13 @@ impl<'ctx> IRExecutor for ConstValueExec<'ctx> {
&'a self,
ir: &'a IR,
ctx: &'a Context<'a, Self::Input, Self::Output>,
) -> Result<Self::Output> {
) -> Result<TypedValue<Self::Output>> {
let req_context = &self.req_context;
let mut ctx = EvalContext::new(req_context, ctx);
Ok(ir.eval(&mut ctx).await?)
let mut eval_ctx = EvalContext::new(req_context, ctx);

Ok(ir
.eval(&mut eval_ctx)
.await
.map(|value| TypedValue { value, type_name: eval_ctx.type_name.take() })?)
}
}
Loading

2 comments on commit 4680f94

@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 233 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 ... ok
test run_execution_spec::async-cache-enabled.md ... ok
test run_execution_spec::async-cache-global.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::auth.md ... ok
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-optional-key.md ... ok
test run_execution_spec::batching-group-by.md ... ok
test run_execution_spec::batching.md ... ok
test run_execution_spec::batching-post.md ... ok
test run_execution_spec::cache-control.md ... ok
test run_execution_spec::caching-collision.md ... ok
test run_execution_spec::caching.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-true.md ... ok
test run_execution_spec::cors-allow-cred-false.md ... ok
test run_execution_spec::cors-invalid-headers.md ... ok
test run_execution_spec::cors-invalid-expose-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-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-no-batch-request.md ... ok
test run_execution_spec::graphql-dataloader-batch-request.md ... ok
test run_execution_spec::graphql-datasource-errors.md ... FAILED
test run_execution_spec::graphql-datasource-no-args.md ... ok
test run_execution_spec::graphql-datasource-mutation.md ... ok
test run_execution_spec::graphql-datasource-query-directives.md ... ok
test run_execution_spec::graphql-datasource-with-args.md ... ok
test run_execution_spec::graphql-datasource-with-empty-enum.md ... ok
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-index-list.md ... ok
test run_execution_spec::inline-field.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 ... ok
test run_execution_spec::modified-field.md ... ok
test run_execution_spec::mutation-put.md ... ok
test run_execution_spec::mutation.md ... ok
test run_execution_spec::n-plus-one-list.md ... ok
test run_execution_spec::jsonplaceholder-call-post.md ... ok
test run_execution_spec::n-plus-one.md ... ok
test run_execution_spec::nested-objects.md ... ok
test run_execution_spec::nested-recursive-types.md ... ok
test run_execution_spec::nesting-level3.md ... ok
test run_execution_spec::nullable-arg-query.md ... ok
test run_execution_spec::omit-index-list.md ... ok
test run_execution_spec::predefined-scalar.md ... ok
test run_execution_spec::omit-resolved-by-parent.md ... ok
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 ... ok
test run_execution_spec::recursive-types.md ... ok
test run_execution_spec::ref-other-nested.md ... ok
test run_execution_spec::ref-other.md ... ok
test run_execution_spec::related-fields-recursive.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 ... ok
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-link-to-empty-config.md ... ok
test run_execution_spec::test-add-field.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-custom-scalar.md ... ok
test run_execution_spec::test-custom-types.md ... ok
test run_execution_spec::test-dbl-usage-many.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-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-batchKey.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-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-input-out.md ... ok
test run_execution_spec::test-inline.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-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-merge-batch.md ... ok
test run_execution_spec::test-js-request-response.md ... ok
test run_execution_spec::test-merge-nested.md ... ok
test run_execution_spec::test-list-args.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-modify.md ... ok
test run_execution_spec::test-multi-interface.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-null-in-array.md ... ok
test run_execution_spec::test-nested-link.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.md ... ok
test run_execution_spec::test-query-documentation.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 ... ok
test run_execution_spec::test-scalars-integers.md ... ok
test run_execution_spec::test-scalars-validation.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-union-ambiguous.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-scalars.md ... ok
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::upstream-batching.md ... ok
test run_execution_spec::test-union.md ... FAILED
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::graphql-datasource-errors.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-oneof.md ----
test panicked: snapshot assertion for 'grpc-oneof.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-union.md ----
test panicked: snapshot assertion for 'test-union.md_4' failed in line 202

failures:
run_execution_spec::graphql-datasource-errors.md
run_execution_spec::graphql-datasource-with-mandatory-enum.md
run_execution_spec::grpc-oneof.md
run_execution_spec::test-enum-description.md
run_execution_spec::test-enum.md
run_execution_spec::test-union.md

test result: FAILED. 227 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.17s

@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 7.45ms 3.40ms 104.11ms 72.19%
Req/Sec 3.40k 171.08 3.80k 89.75%

405685 requests in 30.01s, 2.03GB read

Requests/sec: 13517.24

Transfer/sec: 69.38MB

Please sign in to comment.