diff --git a/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error-2.snap b/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error-2.snap deleted file mode 100644 index 6ec6584bca..0000000000 --- a/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error-2.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: src/core/jit/response.rs -expression: response.into_async_graphql() ---- -Response { - data: Null, - extensions: {}, - cache_control: CacheControl { - public: true, - max_age: 0, - }, - errors: [ - ServerError { - message: "internal: non-null types require a return value", - locations: [ - Pos(1:2), - ], - path: [], - extensions: None, - }, - ], - http_headers: {}, -} diff --git a/tests/cli/gen.rs b/tests/cli/gen.rs index 90955a5fa1..030ff69c40 100644 --- a/tests/cli/gen.rs +++ b/tests/cli/gen.rs @@ -335,18 +335,8 @@ pub mod test { } } async fn test_generator(path: &Path) -> datatest_stable::Result<()> { - if let Some(extension) = path.extension() { - if extension == "json" - && path - .file_name() - .and_then(|v| v.to_str()) - .map(|v| v.starts_with("gen")) - .unwrap_or_default() - { - let spec = ExecutionSpec::from_source(path, std::fs::read_to_string(path)?)?; - generator_spec::run_test(path, spec).await?; - } - } + let spec = ExecutionSpec::from_source(path, std::fs::read_to_string(path)?)?; + generator_spec::run_test(path, spec).await?; Ok(()) } pub fn run(path: &Path) -> datatest_stable::Result<()> { diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.json.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap similarity index 100% rename from tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.json.snap rename to tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap new file mode 100644 index 0000000000..74ddc5e649 --- /dev/null +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap @@ -0,0 +1,81 @@ +--- +source: tests/cli/gen.rs +expression: config.to_sdl() +--- +schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { + query: Query +} + +input Id { + id: Int +} + +input news__MultipleNewsId @addField(name: "ids", path: ["ids", "id"]) { + ids: [Id]@omit +} + +input news__NewsInput { + body: String + id: Int + postImage: String + status: news__Status + title: String +} + +enum news__Status { + DELETED + DRAFT + PUBLISHED +} + +type Address { + city: String + geo: Geo + street: String + suite: String + zipcode: String +} + +type Company { + bs: String + catchPhrase: String + name: String +} + +type Geo { + lat: String + lng: String +} + +type News { + body: String + id: Int + postImage: String + status: news__Status + title: String +} + +type NewsNewsServiceGetMultipleNew { + news: [News] +} + +type Query { + 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") + users: [User] @http(path: "/users") +} + +type User { + address: Address + company: Company + email: String + id: Int + name: String + phone: String + username: String + website: String +} diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.json.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap similarity index 100% rename from tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.json.snap rename to tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap