Skip to content

Commit

Permalink
fix: handle required for lists for proto (#2681)
Browse files Browse the repository at this point in the history
Co-authored-by: Tushar Mathur <[email protected]>
  • Loading branch information
laststylebender14 and tusharmath authored Aug 16, 2024
1 parent 4a2c557 commit 315b06d
Show file tree
Hide file tree
Showing 53 changed files with 307 additions and 134 deletions.
2 changes: 1 addition & 1 deletion examples/grpc-reflection.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ input NewsInput {
}

type NewsData {
news: [News]!
news: [News]
}
2 changes: 1 addition & 1 deletion examples/grpc.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ input NewsInput {
}

type NewsData {
news: [News]!
news: [News]
}
2 changes: 1 addition & 1 deletion examples/telemetry-otlp.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ enum Status {
}

type NewsData {
news: [News]!
news: [News]
}
6 changes: 3 additions & 3 deletions src/core/blueprint/from_config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::collections::{BTreeMap, BTreeSet};

use async_graphql::dynamic::SchemaBuilder;

Expand Down Expand Up @@ -71,7 +71,7 @@ pub fn to_json_schema_for_field(field: &Field, config: &Config) -> JsonSchema {
to_json_schema(field, config)
}
pub fn to_json_schema_for_args(args: &BTreeMap<String, Arg>, config: &Config) -> JsonSchema {
let mut schema_fields = HashMap::new();
let mut schema_fields = BTreeMap::new();
for (name, arg) in args.iter() {
schema_fields.insert(name.clone(), to_json_schema(arg, config));
}
Expand All @@ -87,7 +87,7 @@ where
let type_ = config.find_type(type_of);
let type_enum_ = config.find_enum(type_of);
let schema = if let Some(type_) = type_ {
let mut schema_fields = HashMap::new();
let mut schema_fields = BTreeMap::new();
for (name, field) in type_.fields.iter() {
if field.resolver.is_none() {
schema_fields.insert(name.clone(), to_json_schema_for_field(field, config));
Expand Down
14 changes: 6 additions & 8 deletions src/core/blueprint/operators/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,14 @@ fn validate_schema(

Valid::from(JsonSchema::try_from(input_type))
.zip(Valid::from(JsonSchema::try_from(output_type)))
.and_then(|(_input_schema, output_schema)| {
.and_then(|(_input_schema, sub_type)| {
// TODO: add validation for input schema - should compare result grpc.body to
// schema
let fields = field_schema.field;
let _args = field_schema.args;
let super_type = field_schema.field;
// TODO: all of the fields in protobuf are optional actually
// and if we want to mark some fields as required in GraphQL
// JsonSchema won't match and the validation will fail
fields.compare(&output_schema, name)
sub_type.is_a(&super_type, name)
})
}

Expand All @@ -108,10 +107,9 @@ fn validate_group_by(
// TODO: add validation for input schema - should compare result grpc.body to
// schema considering repeated message type
let fields = &field_schema.field;
let args = &field_schema.args;
let fields = JsonSchema::Arr(Box::new(fields.to_owned()));
let _args = JsonSchema::Arr(Box::new(args.to_owned()));
fields.compare(&output_schema, group_by[0].as_str())
// we're treating List types for gRPC as optional.
let fields = JsonSchema::Opt(Box::new(JsonSchema::Arr(Box::new(fields.to_owned()))));
fields.is_a(&output_schema, group_by[0].as_str())
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ enum news__Status {
}

type Query {
news__NewsService__AddNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList! @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList! @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
news__NewsService__AddNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
}

type news__News {
Expand Down
1 change: 0 additions & 1 deletion src/core/generator/from_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ impl Context {
.into_object_type()
.to_string();
cfg_field.type_of = output_ty;
cfg_field.required = true;

cfg_field.resolver = Some(Resolver::Grpc(Grpc {
base_url: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ type Query {
"""
Sends a greeting
"""
greetings_a__b__Greeter__SayHello(helloRequest: greetings_a__b__HelloRequest!): greetings_a__b__HelloReply! @grpc(body: "{{.args.helloRequest}}", method: "greetings_a.b.Greeter.SayHello")
greetings_a__b__Greeter__SayHello(helloRequest: greetings_a__b__HelloRequest!): greetings_a__b__HelloReply @grpc(body: "{{.args.helloRequest}}", method: "greetings_a.b.Greeter.SayHello")
"""
Sends a greeting
"""
greetings_b__c__Greeter__SayHello(helloRequest: greetings__HelloRequest!): greetings__HelloReply! @grpc(body: "{{.args.helloRequest}}", method: "greetings_b.c.Greeter.SayHello")
news__NewsService__AddNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList! @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList! @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
greetings_b__c__Greeter__SayHello(helloRequest: greetings__HelloRequest!): greetings__HelloReply @grpc(body: "{{.args.helloRequest}}", method: "greetings_b.c.Greeter.SayHello")
news__NewsService__AddNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
}

type greetings__HelloReply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ type NewsList {
}

type Query {
NewsService__GetAllNews: NewsList! @grpc(method: "NewsService.GetAllNews")
NewsService__GetAllNews: NewsList @grpc(method: "NewsService.GetAllNews")
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ input greetings__HelloRequest {
}

type Query {
greetings__Greeter__SayHello(helloRequest: greetings__HelloRequest!): greetings__HelloReply! @grpc(body: "{{.args.helloRequest}}", method: "greetings.Greeter.SayHello")
greetings__Greeter__SayHello(helloRequest: greetings__HelloRequest!): greetings__HelloReply @grpc(body: "{{.args.helloRequest}}", method: "greetings.Greeter.SayHello")
}

type greetings__HelloReply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ input map__MapRequest {
}

type Query {
map__MapService__GetMap(mapRequest: map__MapRequest!): map__MapResponse! @grpc(body: "{{.args.mapRequest}}", method: "map.MapService.GetMap")
map__MapService__GetMap(mapRequest: map__MapRequest!): map__MapResponse @grpc(body: "{{.args.mapRequest}}", method: "map.MapService.GetMap")
}

type map__MapResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,19 @@ type Query {
"""
get all movies
"""
movies__AnotherExample__GetMovies(movieRequest: movies__MovieRequest!): movies__MoviesResult! @grpc(body: "{{.args.movieRequest}}", method: "movies.AnotherExample.GetMovies")
movies__AnotherExample__GetMovies(movieRequest: movies__MovieRequest!): movies__MoviesResult @grpc(body: "{{.args.movieRequest}}", method: "movies.AnotherExample.GetMovies")
"""
search movies by the name of the cast
"""
movies__AnotherExample__SearchMoviesByCast(searchByCastRequest: movies__SearchByCastRequest!): movies__Movie! @grpc(body: "{{.args.searchByCastRequest}}", method: "movies.AnotherExample.SearchMoviesByCast")
movies__AnotherExample__SearchMoviesByCast(searchByCastRequest: movies__SearchByCastRequest!): movies__Movie @grpc(body: "{{.args.searchByCastRequest}}", method: "movies.AnotherExample.SearchMoviesByCast")
"""
get all movies
"""
movies__Example__GetMovies(movieRequest: movies__MovieRequest!): movies__MoviesResult! @grpc(body: "{{.args.movieRequest}}", method: "movies.Example.GetMovies")
movies__Example__GetMovies(movieRequest: movies__MovieRequest!): movies__MoviesResult @grpc(body: "{{.args.movieRequest}}", method: "movies.Example.GetMovies")
"""
search movies by the name of the cast
"""
movies__Example__SearchMoviesByCast(searchByCastRequest: movies__SearchByCastRequest!): movies__Movie! @grpc(body: "{{.args.searchByCastRequest}}", method: "movies.Example.SearchMoviesByCast")
movies__Example__SearchMoviesByCast(searchByCastRequest: movies__SearchByCastRequest!): movies__Movie @grpc(body: "{{.args.searchByCastRequest}}", method: "movies.Example.SearchMoviesByCast")
}

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum nested__types__Result__NestedEnum {
}

type Query {
nested__types__Example__Get(veryNested: nested__types__Result__Nested__VeryNestedInput!): nested__types__Result! @grpc(body: "{{.args.veryNested}}", method: "nested.types.Example.Get")
nested__types__Example__Get(veryNested: nested__types__Result__Nested__VeryNestedInput!): nested__types__Result @grpc(body: "{{.args.veryNested}}", method: "nested.types.Example.Get")
}

type nested__types__Result {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ union oneof__Request = oneof__Request__Var0__Var | oneof__Request__Var0__Var0 |
union oneof__Response = oneof__Response__Var | oneof__Response__Var0 | oneof__Response__Var1 | oneof__Response__Var2

type Query {
oneof__OneOfService__GetOneOf(request: oneof__Request!): oneof__Response! @grpc(body: "{{.args.request}}", method: "oneof.OneOfService.GetOneOf")
oneof__OneOfService__GetOneOf(request: oneof__Request!): oneof__Response @grpc(body: "{{.args.request}}", method: "oneof.OneOfService.GetOneOf")
}

type oneof__Command {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum type__Status {
}

type Query {
type__TypeService__Get(type: type__TypeInput!): type__Type! @grpc(body: "{{.args.type}}", method: "type.TypeService.Get")
type__TypeService__Get(type: type__TypeInput!): type__Type @grpc(body: "{{.args.type}}", method: "type.TypeService.Get")
}

type type__Type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ schema @server @upstream {
}

type Query {
person__PersonService__GetPerson: person__Person! @grpc(method: "person.PersonService.GetPerson")
person__PersonService__GetPerson: person__Person @grpc(method: "person.PersonService.GetPerson")
}

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ input scalars__ItemInput {
}

type Query {
scalars__Example__Get(item: scalars__ItemInput!): scalars__Result! @grpc(body: "{{.args.item}}", method: "scalars.Example.Get")
scalars__Example__Get(item: scalars__ItemInput!): scalars__Result @grpc(body: "{{.args.item}}", method: "scalars.Example.Get")
}

type scalars__Item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ type Post {

type Query {
f1: F1 @http(path: "/")
news__NewsService__AddNews(news: news__NewsInput!): News! @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): News! @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: NewsNewsServiceGetMultipleNew! @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): NewsNewsServiceGetMultipleNew! @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
news__NewsService__AddNews(news: news__NewsInput!): News @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): News @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: NewsNewsServiceGetMultipleNew @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): NewsNewsServiceGetMultipleNew @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): News @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
post(id: Int! = 1): Post @http(path: "/posts/{{.args.id}}")
posts: [Post] @http(path: "/posts?_limit=11")
user(id: Int!): User @http(path: "/users/{{.args.id}}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ enum news__Status {
}

type Query {
news__NewsService__AddNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News! @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList! @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList! @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
news__NewsService__AddNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.AddNews")
news__NewsService__DeleteNews(newsId: news__NewsId!): Empty @grpc(body: "{{.args.newsId}}", method: "news.NewsService.DeleteNews")
news__NewsService__EditNews(news: news__NewsInput!): news__News @grpc(body: "{{.args.news}}", method: "news.NewsService.EditNews")
news__NewsService__GetAllNews: news__NewsList @grpc(method: "news.NewsService.GetAllNews")
news__NewsService__GetMultipleNews(multipleNewsId: news__MultipleNewsId!): news__NewsList @grpc(body: "{{.args.multipleNewsId}}", method: "news.NewsService.GetMultipleNews")
news__NewsService__GetNews(newsId: news__NewsId!): news__News @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews")
}

type news__News {
Expand Down
Loading

2 comments on commit 315b06d

@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 268 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-composition.md ... ok
test run_execution_spec::add-field-with-modify.md ... ok
test run_execution_spec::add-field.md ... ok
test run_execution_spec::async-cache-disabled.md ... ok
test run_execution_spec::apollo-tracing.md ... ok
test run_execution_spec::async-cache-enable-multiple-resolvers.md ... ok
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-basic.md ... ok
test run_execution_spec::auth-jwt.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-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::dedupe_batch_query_execution.md ... ok
test run_execution_spec::custom-headers.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::graphql-conformance-002.md ... ok
test run_execution_spec::experimental-headers.md ... ok
test run_execution_spec::graphql-conformance-004.md ... ok
test run_execution_spec::graphql-conformance-005.md ... ok
test run_execution_spec::graphql-conformance-006.md ... ok
test run_execution_spec::graphql-conformance-007.md ... ok
test run_execution_spec::graphql-conformance-008.md ... ok
test run_execution_spec::graphql-conformance-009.md ... ok
test run_execution_spec::graphql-conformance-001.md ... ok
test run_execution_spec::graphql-conformance-011.md ... ok
test run_execution_spec::graphql-conformance-012.md ... ok
test run_execution_spec::graphql-conformance-003.md ... FAILED
test run_execution_spec::graphql-conformance-010.md ... ok
test run_execution_spec::graphql-conformance-013.md ... FAILED
test run_execution_spec::graphql-conformance-016.md ... ok
test run_execution_spec::graphql-conformance-017.md ... ok
test run_execution_spec::graphql-conformance-014.md ... ok
test run_execution_spec::graphql-conformance-015.md ... FAILED
test run_execution_spec::graphql-conformance-http-001.md ... ok
test run_execution_spec::graphql-conformance-http-002.md ... ok
test run_execution_spec::graphql-conformance-http-003.md ... FAILED
test run_execution_spec::graphql-conformance-http-004.md ... FAILED
test run_execution_spec::graphql-conformance-http-007.md ... ok
test run_execution_spec::graphql-conformance-http-008.md ... ok
test run_execution_spec::graphql-conformance-http-009.md ... ok
test run_execution_spec::graphql-conformance-http-005.md ... FAILED
test run_execution_spec::graphql-conformance-http-011.md ... ok
test run_execution_spec::graphql-conformance-http-006.md ... FAILED
test run_execution_spec::graphql-conformance-http-010.md ... ok
test run_execution_spec::graphql-conformance-http-012.md ... ok
test run_execution_spec::graphql-conformance-http-013.md ... FAILED
test run_execution_spec::graphql-conformance-http-016.md ... ok
test run_execution_spec::graphql-conformance-http-017.md ... ok
test run_execution_spec::graphql-conformance-http-014.md ... ok
test run_execution_spec::graphql-conformance-http-015.md ... FAILED
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-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-override-url-from-upstream.md ... ok
test run_execution_spec::grpc-oneof.md ... FAILED
test run_execution_spec::grpc-proto-with-same-package.md ... ok
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 ... ok
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 ... 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::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::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::recursive-types-json.md ... ok
test run_execution_spec::omit-many.md ... ok
test run_execution_spec::ref-other-nested.md ... ok
test run_execution_spec::recursive-types.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-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-graphql-with-add-field.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 ... 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-inline.md ... ok
test run_execution_spec::test-input-out.md ... ok
test run_execution_spec::test-input-with-arg-out.md ... ok
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 ... 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-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-argument-on-all-resolvers.md ... ok
test run_execution_spec::test-missing-schema-query.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-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-optional-key-skip-empty.md ... ok
test run_execution_spec::test-omit-list.md ... ok
test run_execution_spec::test-omit.md ... ok
test run_execution_spec::test-params-as-body.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-merge.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-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-undefined-query.md ... ok
test run_execution_spec::test-static-value.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 ... ok
test run_execution_spec::test-scalars.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::test-upstream.md ... ok
test run_execution_spec::upstream-batching.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-conformance-003.md ----
test panicked: snapshot assertion for 'graphql-conformance-003.md_1' failed in line 202

---- run_execution_spec::graphql-conformance-013.md ----
test panicked: snapshot assertion for 'graphql-conformance-013.md_0' failed in line 202

---- run_execution_spec::graphql-conformance-015.md ----
test panicked: snapshot assertion for 'graphql-conformance-015.md_0' failed in line 202

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

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

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

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

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

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

---- 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-conformance-003.md
run_execution_spec::graphql-conformance-013.md
run_execution_spec::graphql-conformance-015.md
run_execution_spec::graphql-conformance-http-003.md
run_execution_spec::graphql-conformance-http-004.md
run_execution_spec::graphql-conformance-http-005.md
run_execution_spec::graphql-conformance-http-006.md
run_execution_spec::graphql-conformance-http-013.md
run_execution_spec::graphql-conformance-http-015.md
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. 253 passed; 15 failed; 0 ignored; 0 measured; 0 filtered out; finished in 18.47s

@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.38ms 3.65ms 112.57ms 75.67%
Req/Sec 3.44k 199.69 5.39k 91.25%

410907 requests in 30.03s, 2.06GB read

Requests/sec: 13684.40

Transfer/sec: 70.24MB

Please sign in to comment.