diff --git a/generated/.tailcallrc.graphql b/generated/.tailcallrc.graphql index 3da739b549..c7da42f2f7 100644 --- a/generated/.tailcallrc.graphql +++ b/generated/.tailcallrc.graphql @@ -315,17 +315,6 @@ directive @server( workers: Int ) on SCHEMA -""" -Used to represent an identifier for a type. Typically used via only by the configuration -generators to provide additional information about the type. -""" -directive @tag( - """ - A unique identifier for the type. - """ - id: String! -) on OBJECT - """ The @telemetry directive facilitates seamless integration with OpenTelemetry, enhancing the observability of your GraphQL services powered by Tailcall. By leveraging this diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json index 77c366a537..baeee6655e 100644 --- a/generated/.tailcallrc.schema.json +++ b/generated/.tailcallrc.schema.json @@ -1145,20 +1145,6 @@ } } }, - "Tag": { - "description": "Used to represent an identifier for a type. Typically used via only by the configuration generators to provide additional information about the type.", - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "description": "A unique identifier for the type.", - "type": "string" - } - }, - "additionalProperties": false - }, "Telemetry": { "description": "The @telemetry directive facilitates seamless integration with OpenTelemetry, enhancing the observability of your GraphQL services powered by Tailcall. By leveraging this directive, developers gain access to valuable insights into the performance and behavior of their applications.", "type": "object", @@ -1293,17 +1279,6 @@ "type": "null" } ] - }, - "tag": { - "description": "Contains source information for the type.", - "anyOf": [ - { - "$ref": "#/definitions/Tag" - }, - { - "type": "null" - } - ] } } }, diff --git a/src/cli/generator/snapshots/tailcall__cli__generator__generator__test__generator_spec__src__cli__generator__tests__fixtures__generator__json_proto_mix_config.json.snap b/src/cli/generator/snapshots/tailcall__cli__generator__generator__test__generator_spec__src__cli__generator__tests__fixtures__generator__json_proto_mix_config.json.snap index 7c8871a42e..e7890bdc75 100644 --- a/src/cli/generator/snapshots/tailcall__cli__generator__generator__test__generator_spec__src__cli__generator__tests__fixtures__generator__json_proto_mix_config.json.snap +++ b/src/cli/generator/snapshots/tailcall__cli__generator__generator__test__generator_spec__src__cli__generator__tests__fixtures__generator__json_proto_mix_config.json.snap @@ -6,15 +6,15 @@ schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { query: Query } -input Id @tag(id: "news.NewsId") { +input Id { id: Int } -input news__MultipleNewsId @tag(id: "news.MultipleNewsId") { +input news__MultipleNewsId { ids: [Id] } -input news__NewsInput @tag(id: "news.News") { +input news__NewsInput { body: String id: Int postImage: String @@ -47,7 +47,7 @@ type Geo { lng: String } -type News @tag(id: "news.News") { +type News { body: String id: Int postImage: String @@ -55,7 +55,7 @@ type News @tag(id: "news.News") { title: String } -type NewsNewsServiceGetMultipleNew @tag(id: "news.NewsList") { +type NewsNewsServiceGetMultipleNew { news: [News] } diff --git a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__valid_conversion.snap b/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__valid_conversion.snap deleted file mode 100644 index d339f256ab..0000000000 --- a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__valid_conversion.snap +++ /dev/null @@ -1,72 +0,0 @@ ---- -source: src/cli/llm/infer_type_name.rs -expression: request ---- -ChatRequest { - system: None, - messages: [ - ChatMessage { - role: System, - content: Text( - "Given the sample schema of a GraphQL type suggest 5 meaningful names for it.", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "The name should be concise and preferably a single word", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "Example Input:", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "{\n \"fields\": [\n [\n \"id\",\n \"String\"\n ],\n [\n \"name\",\n \"String\"\n ],\n [\n \"age\",\n \"Int\"\n ]\n ]\n}", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "Example Output:", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "{\n \"suggestions\": [\n \"Person\",\n \"Profile\",\n \"Member\",\n \"Individual\",\n \"Contact\"\n ]\n}", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "Ensure the output is in valid JSON format", - ), - extra: None, - }, - ChatMessage { - role: System, - content: Text( - "Do not add any additional text before or after the json", - ), - extra: None, - }, - ChatMessage { - role: User, - content: Text( - "{\"fields\":[[\"id\",\"String\"],[\"name\",\"String\"],[\"age\",\"Int\"]]}", - ), - extra: None, - }, - ], -} diff --git a/src/core/config/config.rs b/src/core/config/config.rs index 811f3d65f4..a9dd2aa3c6 100644 --- a/src/core/config/config.rs +++ b/src/core/config/config.rs @@ -113,10 +113,6 @@ pub struct Type { /// Marks field as protected by auth providers #[serde(default)] pub protected: Option, - #[serde(default, skip_serializing_if = "is_default")] - /// - /// Contains source information for the type. - pub tag: Option, } impl Display for Type { @@ -145,27 +141,6 @@ impl Type { } } -#[derive( - Clone, - Debug, - Default, - PartialEq, - Deserialize, - Serialize, - Eq, - schemars::JsonSchema, - MergeRight, - DirectiveDefinition, -)] -#[directive_definition(locations = "Object")] -#[serde(deny_unknown_fields)] -/// Used to represent an identifier for a type. Typically used via only by the -/// configuration generators to provide additional information about the type. -pub struct Tag { - /// A unique identifier for the type. - pub id: String, -} - #[derive( Clone, Debug, @@ -1050,7 +1025,6 @@ impl Config { .add_directive(Omit::directive_definition(generated_types)) .add_directive(Protected::directive_definition(generated_types)) .add_directive(Server::directive_definition(generated_types)) - .add_directive(Tag::directive_definition(generated_types)) .add_directive(Telemetry::directive_definition(generated_types)) .add_directive(Upstream::directive_definition(generated_types)) .add_input(GraphQL::input_definition()) diff --git a/src/core/config/from_document.rs b/src/core/config/from_document.rs index 576a0a7647..0443b5d444 100644 --- a/src/core/config/from_document.rs +++ b/src/core/config/from_document.rs @@ -10,7 +10,7 @@ use async_graphql::Name; use async_graphql_value::ConstValue; use super::telemetry::Telemetry; -use super::{Alias, Tag, JS}; +use super::{Alias, JS}; use crate::core::config::{ self, Cache, Call, Config, Enum, GraphQL, Grpc, Link, Modify, Omit, Protected, RootSchema, Server, Union, Upstream, Variant, @@ -242,12 +242,11 @@ where Cache::from_directives(directives.iter()) .fuse(to_fields(fields)) .fuse(Protected::from_directives(directives.iter())) - .fuse(Tag::from_directives(directives.iter())) - .map(|(cache, fields, protected, tag)| { + .map(|(cache, fields, protected)| { let doc = description.to_owned().map(|pos| pos.node); let implements = implements.iter().map(|pos| pos.node.to_string()).collect(); let added_fields = to_add_fields_from_directives(directives); - config::Type { fields, added_fields, doc, implements, cache, protected, tag } + config::Type { fields, added_fields, doc, implements, cache, protected } }) } fn to_input_object( diff --git a/src/core/config/into_document.rs b/src/core/config/into_document.rs index 2e9f1a8848..e3e9b1fcf4 100644 --- a/src/core/config/into_document.rs +++ b/src/core/config/into_document.rs @@ -215,7 +215,6 @@ fn config_document(config: &Config) -> ServiceDocument { .as_ref() .map(|protected| pos(protected.to_directive())), ) - .chain(type_def.tag.as_ref().map(|tag| pos(tag.to_directive()))) .collect::>(), kind, }))); diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap index c9d7943125..34619d8a0f 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap @@ -6,15 +6,15 @@ schema @server @upstream { query: Query } -input news__MultipleNewsId @tag(id: "news.MultipleNewsId") { +input news__MultipleNewsId { ids: [news__NewsId] } -input news__NewsId @tag(id: "news.NewsId") { +input news__NewsId { id: Int } -input news__NewsInput @tag(id: "news.News") { +input news__NewsInput { body: String id: Int postImage: String @@ -37,7 +37,7 @@ type Query { news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews") } -type news__News @tag(id: "news.News") { +type news__News { body: String id: Int postImage: String @@ -45,6 +45,6 @@ type news__News @tag(id: "news.News") { title: String } -type news__NewsList @tag(id: "news.NewsList") { +type news__NewsList { news: [news__News] } diff --git a/src/core/generator/from_proto.rs b/src/core/generator/from_proto.rs index 8952db7d55..292fd5b0e4 100644 --- a/src/core/generator/from_proto.rs +++ b/src/core/generator/from_proto.rs @@ -13,7 +13,7 @@ use super::proto::comments_builder::CommentsBuilder; use super::proto::path_builder::PathBuilder; use super::proto::path_field::PathField; use crate::core::config::transformer::{AmbiguousType, TreeShake}; -use crate::core::config::{Arg, Config, Enum, Field, Grpc, Tag, Type, Union, Variant}; +use crate::core::config::{Arg, Config, Enum, Field, Grpc, Type, Union, Variant}; use crate::core::transform::{Transform, TransformerOps}; use crate::core::valid::Validator; @@ -308,8 +308,6 @@ impl Context { } } - ty.tag = Some(Tag { id: msg_type.id() }); - if message.oneof_decl.is_empty() { self = self.insert_type(msg_type.to_string(), ty); } else { diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap index 2805171be6..b5c6896802 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap @@ -6,26 +6,26 @@ schema @server @upstream { query: Query } -input greetings__HelloRequest @tag(id: "greetings.HelloRequest") { +input greetings__HelloRequest { name: String } """ The request message containing the user's name. """ -input greetings_a__b__HelloRequest @tag(id: "greetings_a.b.HelloRequest") { +input greetings_a__b__HelloRequest { name: String } -input news__MultipleNewsId @tag(id: "news.MultipleNewsId") { +input news__MultipleNewsId { ids: [news__NewsId] } -input news__NewsId @tag(id: "news.NewsId") { +input news__NewsId { id: Int } -input news__NewsInput @tag(id: "news.News") { +input news__NewsInput { body: String id: Int postImage: String @@ -56,18 +56,18 @@ type Query { news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews") } -type greetings__HelloReply @tag(id: "greetings.HelloReply") { +type greetings__HelloReply { message: String } """ The response message containing the greetings """ -type greetings_a__b__HelloReply @tag(id: "greetings_a.b.HelloReply") { +type greetings_a__b__HelloReply { message: String } -type news__News @tag(id: "news.News") { +type news__News { body: String id: Int postImage: String @@ -75,6 +75,6 @@ type news__News @tag(id: "news.News") { title: String } -type news__NewsList @tag(id: "news.NewsList") { +type news__NewsList { news: [news__News] } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap index ce8128fd8c..7d2b517abe 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap @@ -6,14 +6,14 @@ schema @server @upstream { query: Query } -type News @tag(id: "News") { +type News { body: String id: Int postImage: String title: String } -type NewsList @tag(id: "NewsList") { +type NewsList { news: [News] } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap index b3069156c8..6284d0fdc4 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap @@ -6,7 +6,7 @@ schema @server @upstream { query: Query } -input greetings__HelloRequest @tag(id: "greetings.HelloRequest") { +input greetings__HelloRequest { name: String } @@ -14,6 +14,6 @@ type Query { greetings__Greeter__SayHello(helloRequest: greetings__HelloRequest!): greetings__HelloReply! @grpc(body: "{{.args.helloRequest}}", method: "greetings.Greeter.SayHello") } -type greetings__HelloReply @tag(id: "greetings.HelloReply") { +type greetings__HelloReply { message: String } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap index b4ddd8e529..84e317cb01 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap @@ -6,7 +6,7 @@ schema @server @upstream { query: Query } -input map__MapRequest @tag(id: "map.MapRequest") { +input map__MapRequest { map: JSON } @@ -14,6 +14,6 @@ type Query { map__MapService__GetMap(mapRequest: map__MapRequest!): map__MapResponse! @grpc(body: "{{.args.mapRequest}}", method: "map.MapService.GetMap") } -type map__MapResponse @tag(id: "map.MapResponse") { +type map__MapResponse { map: JSON } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap index bfc4cad5ed..f31ea09493 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap @@ -31,7 +31,7 @@ with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds an 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". """ -input google__protobuf__DurationInput @tag(id: "google.protobuf.Duration") { +input google__protobuf__DurationInput { """ Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or @@ -51,7 +51,7 @@ input google__protobuf__DurationInput @tag(id: "google.protobuf.Duration") { """ Wrapper message for `int32`. The JSON representation for `Int32Value` is JSON number. """ -input google__protobuf__Int32ValueInput @tag(id: "google.protobuf.Int32Value") { +input google__protobuf__Int32ValueInput { """ The int32 value. """ @@ -62,7 +62,7 @@ input google__protobuf__Int32ValueInput @tag(id: "google.protobuf.Int32Value") { Wrapper message for `string`. The JSON representation for `StringValue` is JSON string. """ -input google__protobuf__StringValue @tag(id: "google.protobuf.StringValue") { +input google__protobuf__StringValue { """ The string value. """ @@ -111,7 +111,7 @@ with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can u the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this format. """ -input google__protobuf__TimestampInput @tag(id: "google.protobuf.Timestamp") { +input google__protobuf__TimestampInput { """ Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. @@ -128,7 +128,7 @@ input google__protobuf__TimestampInput @tag(id: "google.protobuf.Timestamp") { """ movie message payload """ -input movies__MovieInput @tag(id: "movies.Movie") { +input movies__MovieInput { """ list of cast """ @@ -145,14 +145,14 @@ input movies__MovieInput @tag(id: "movies.Movie") { year: google__protobuf__Int32ValueInput } -input movies__MovieRequest @tag(id: "movies.MovieRequest") { +input movies__MovieRequest { movie: movies__MovieInput } """ This is a comment for submovie """ -input movies__Movie__SubMovieInput @tag(id: "movies.Movie.SubMovie") { +input movies__Movie__SubMovieInput { """ This is a comment for movie format in submovie """ @@ -163,7 +163,7 @@ input movies__Movie__SubMovieInput @tag(id: "movies.Movie.SubMovie") { subRating: Float } -input movies__SearchByCastRequest @tag(id: "movies.SearchByCastRequest") { +input movies__SearchByCastRequest { castName: google__protobuf__StringValue } @@ -258,7 +258,7 @@ type Query { be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". """ -type google__protobuf__Duration @tag(id: "google.protobuf.Duration") { +type google__protobuf__Duration { """ Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 @@ -280,7 +280,7 @@ type google__protobuf__Duration @tag(id: "google.protobuf.Duration") { Wrapper message for `int32`. The JSON representation for `Int32Value` is JSON number. """ -type google__protobuf__Int32Value @tag(id: "google.protobuf.Int32Value") { +type google__protobuf__Int32Value { """ The int32 value. """ @@ -355,7 +355,7 @@ type google__protobuf__Int32Value @tag(id: "google.protobuf.Int32Value") { http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this format. """ -type google__protobuf__Timestamp @tag(id: "google.protobuf.Timestamp") { +type google__protobuf__Timestamp { """ Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values @@ -374,7 +374,7 @@ type google__protobuf__Timestamp @tag(id: "google.protobuf.Timestamp") { """ movie message payload """ -type movies__Movie @tag(id: "movies.Movie") { +type movies__Movie { """ list of cast """ @@ -394,7 +394,7 @@ type movies__Movie @tag(id: "movies.Movie") { """ This is a comment for submovie """ -type movies__Movie__SubMovie @tag(id: "movies.Movie.SubMovie") { +type movies__Movie__SubMovie { """ This is a comment for movie format in submovie """ @@ -408,7 +408,7 @@ type movies__Movie__SubMovie @tag(id: "movies.Movie.SubMovie") { """ movie result message, contains list of movies """ -type movies__MoviesResult @tag(id: "movies.MoviesResult") { +type movies__MoviesResult { """ list of movies """ diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap index 391b7383c7..7c2d9c6222 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap @@ -6,7 +6,7 @@ schema @server @upstream { query: Query } -input nested__types__Result__Nested__VeryNestedInput @tag(id: "nested.types.Result.Nested.VeryNested") { +input nested__types__Result__Nested__VeryNestedInput { description: String } @@ -20,17 +20,17 @@ type Query { 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 @tag(id: "nested.types.Result") { +type nested__types__Result { nestedEnum: nested__types__Result__NestedEnum nestedUsage: nested__types__Result__Nested value: String } -type nested__types__Result__Nested @tag(id: "nested.types.Result.Nested") { +type nested__types__Result__Nested { info: nested__types__Result__Nested__VeryNested movie: String } -type nested__types__Result__Nested__VeryNested @tag(id: "nested.types.Result.Nested.VeryNested") { +type nested__types__Result__Nested__VeryNested { description: String } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap index 4407a90830..b84f1e2e2c 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap @@ -6,58 +6,58 @@ schema @server @upstream { query: Query } -input oneof__CommandInput @tag(id: "oneof.Command") { +input oneof__CommandInput { command: String } -input oneof__PayloadInput @tag(id: "oneof.Payload") { +input oneof__PayloadInput { payload: String } -input oneof__Request__Var0__Var @tag(id: "oneof.Request") { +input oneof__Request__Var0__Var { payload: oneof__PayloadInput! usual: String } -input oneof__Request__Var0__Var0 @tag(id: "oneof.Request") { +input oneof__Request__Var0__Var0 { flag: Boolean! payload: oneof__PayloadInput! usual: String } -input oneof__Request__Var0__Var1 @tag(id: "oneof.Request") { +input oneof__Request__Var0__Var1 { optPayload: oneof__PayloadInput! payload: oneof__PayloadInput! usual: String } -input oneof__Request__Var1__Var @tag(id: "oneof.Request") { +input oneof__Request__Var1__Var { command: oneof__CommandInput! usual: String } -input oneof__Request__Var1__Var0 @tag(id: "oneof.Request") { +input oneof__Request__Var1__Var0 { command: oneof__CommandInput! flag: Boolean! usual: String } -input oneof__Request__Var1__Var1 @tag(id: "oneof.Request") { +input oneof__Request__Var1__Var1 { command: oneof__CommandInput! optPayload: oneof__PayloadInput! usual: String } -input oneof__Request__Var__Var @tag(id: "oneof.Request") { +input oneof__Request__Var__Var { usual: String } -input oneof__Request__Var__Var0 @tag(id: "oneof.Request") { +input oneof__Request__Var__Var0 { flag: Boolean! usual: String } -input oneof__Request__Var__Var1 @tag(id: "oneof.Request") { +input oneof__Request__Var__Var1 { optPayload: oneof__PayloadInput! usual: String } @@ -70,29 +70,29 @@ type Query { oneof__OneOfService__GetOneOf(request: oneof__Request!): oneof__Response! @grpc(body: "{{.args.request}}", method: "oneof.OneOfService.GetOneOf") } -type oneof__Command @tag(id: "oneof.Command") { +type oneof__Command { command: String } -type oneof__Payload @tag(id: "oneof.Payload") { +type oneof__Payload { payload: String } -type oneof__Response__Var @tag(id: "oneof.Response") { +type oneof__Response__Var { usual: Int } -type oneof__Response__Var0 @tag(id: "oneof.Response") { +type oneof__Response__Var0 { payload: oneof__Payload! usual: Int } -type oneof__Response__Var1 @tag(id: "oneof.Response") { +type oneof__Response__Var1 { command: oneof__Command! usual: Int } -type oneof__Response__Var2 @tag(id: "oneof.Response") { +type oneof__Response__Var2 { response: String! usual: Int } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap index 59921983e1..9e7ee397cb 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap @@ -6,7 +6,7 @@ schema @server @upstream { query: Query } -input type__TypeInput @tag(id: "type.Type") { +input type__TypeInput { id: Int idOpt: Int nested: type__Type__NestedInput @@ -17,7 +17,7 @@ input type__TypeInput @tag(id: "type.Type") { strOpt: String } -input type__Type__NestedInput @tag(id: "type.Type.Nested") { +input type__Type__NestedInput { id: Int idOpt: Int num: [Float] @@ -35,7 +35,7 @@ type Query { type__TypeService__Get(type: type__TypeInput!): type__Type! @grpc(body: "{{.args.type}}", method: "type.TypeService.Get") } -type type__Type @tag(id: "type.Type") { +type type__Type { id: Int idOpt: Int nested: type__Type__Nested @@ -46,7 +46,7 @@ type type__Type @tag(id: "type.Type") { strOpt: String } -type type__Type__Nested @tag(id: "type.Type.Nested") { +type type__Type__Nested { id: Int idOpt: Int num: [Float] diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap index d45e2c1e47..9756537638 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap @@ -13,7 +13,7 @@ type Query { """ Defines a person """ -type person__Person @tag(id: "person.Person") { +type person__Person { email: String id: Int! name: String! @@ -24,7 +24,7 @@ type person__Person @tag(id: "person.Person") { """ Defines a phone number """ -type person__PhoneNumber @tag(id: "person.PhoneNumber") { +type person__PhoneNumber { number: String! type: String } diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap index f964406503..47ab150bda 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap @@ -6,7 +6,7 @@ schema @server @upstream { query: Query } -input scalars__ItemInput @tag(id: "scalars.Item") { +input scalars__ItemInput { boolean: Boolean bytesType: Bytes doubleNum: Float @@ -28,7 +28,7 @@ type Query { scalars__Example__Get(item: scalars__ItemInput!): scalars__Result! @grpc(body: "{{.args.item}}", method: "scalars.Example.Get") } -type scalars__Item @tag(id: "scalars.Item") { +type scalars__Item { boolean: Boolean bytesType: Bytes doubleNum: Float @@ -46,6 +46,6 @@ type scalars__Item @tag(id: "scalars.Item") { uinteger64: UInt64 } -type scalars__Result @tag(id: "scalars.Result") { +type scalars__Result { result: [scalars__Item] } diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap index 9128e47b21..2fa1b6c97e 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap @@ -6,15 +6,15 @@ schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "https://exam query: Query } -input Id @tag(id: "news.NewsId") { +input Id { id: Int } -input news__MultipleNewsId @tag(id: "news.MultipleNewsId") { +input news__MultipleNewsId { ids: [Id] } -input news__NewsInput @tag(id: "news.News") { +input news__NewsInput { body: String id: Int postImage: String @@ -48,7 +48,7 @@ type F1 { colors: [JSON] } -type News @tag(id: "news.News") { +type News { body: String id: Int postImage: String @@ -56,7 +56,7 @@ type News @tag(id: "news.News") { title: String } -type NewsNewsServiceGetMultipleNew @tag(id: "news.NewsList") { +type NewsNewsServiceGetMultipleNew { news: [News] } diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap index c8a9bb4356..6dc941f9f8 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap @@ -6,15 +6,15 @@ schema @server @upstream @link(src: "../../../tailcall-fixtures/fixtures/protobu query: Query } -input news__MultipleNewsId @tag(id: "news.MultipleNewsId") { +input news__MultipleNewsId { ids: [news__NewsId] } -input news__NewsId @tag(id: "news.NewsId") { +input news__NewsId { id: Int } -input news__NewsInput @tag(id: "news.News") { +input news__NewsInput { body: String id: Int postImage: String @@ -37,7 +37,7 @@ type Query { news__NewsService__GetNews(newsId: news__NewsId!): news__News! @grpc(body: "{{.args.newsId}}", method: "news.NewsService.GetNews") } -type news__News @tag(id: "news.News") { +type news__News { body: String id: Int postImage: String @@ -45,6 +45,6 @@ type news__News @tag(id: "news.News") { title: String } -type news__NewsList @tag(id: "news.NewsList") { +type news__NewsList { news: [news__News] } diff --git a/tests/core/snapshots/grpc-map.md_merged.snap b/tests/core/snapshots/grpc-map.md_merged.snap index 2228f6bcc4..04dad312e5 100644 --- a/tests/core/snapshots/grpc-map.md_merged.snap +++ b/tests/core/snapshots/grpc-map.md_merged.snap @@ -18,6 +18,6 @@ type Query { @grpc(body: "{{.args.mapRequest}}", method: "map.MapService.GetMap") } -type map__MapResponse @tag(id: "map.MapResponse") { +type map__MapResponse { map: JSON! } diff --git a/tests/core/snapshots/grpc-oneof.md_merged.snap b/tests/core/snapshots/grpc-oneof.md_merged.snap index b47f25bbc4..2e65b34afa 100644 --- a/tests/core/snapshots/grpc-oneof.md_merged.snap +++ b/tests/core/snapshots/grpc-oneof.md_merged.snap @@ -88,29 +88,29 @@ type Query { @grpc(body: "{{.args.request}}", method: "oneof.OneOfService.GetOneOf") } -type oneof__Command @tag(id: "oneof.Command") { +type oneof__Command { command: String } -type oneof__Payload @tag(id: "oneof.Payload") { +type oneof__Payload { payload: String } -type oneof__Response__Var @tag(id: "oneof.Response") { +type oneof__Response__Var { usual: Int } -type oneof__Response__Var0 @tag(id: "oneof.Response") { +type oneof__Response__Var0 { payload: oneof__Payload! usual: Int } -type oneof__Response__Var1 @tag(id: "oneof.Response") { +type oneof__Response__Var1 { command: oneof__Command! usual: Int } -type oneof__Response__Var2 @tag(id: "oneof.Response") { +type oneof__Response__Var2 { response: String! usual: Int } diff --git a/tests/core/snapshots/test-tag.md_client.snap b/tests/core/snapshots/test-tag.md_client.snap deleted file mode 100644 index dbd17d6601..0000000000 --- a/tests/core/snapshots/test-tag.md_client.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -scalar Bytes - -scalar Date - -scalar DateTime - -scalar Email - -scalar Empty - -scalar Int128 - -scalar Int16 - -scalar Int32 - -scalar Int64 - -scalar Int8 - -scalar JSON - -type NEWS { - getAllNews: News__NewsList! -} - -type News__News { - body: String - id: Int - postImage: String - title: String -} - -type News__NewsList { - news: [News__News] -} - -scalar PhoneNumber - -type Query { - news: NEWS -} - -scalar UInt128 - -scalar UInt16 - -scalar UInt32 - -scalar UInt64 - -scalar UInt8 - -scalar Url - -schema { - query: Query -} diff --git a/tests/core/snapshots/test-tag.md_merged.snap b/tests/core/snapshots/test-tag.md_merged.snap deleted file mode 100644 index fa7567684d..0000000000 --- a/tests/core/snapshots/test-tag.md_merged.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { - query: Query -} - -type NEWS { - getAllNews: News__NewsList! -} - -type News__News @tag(id: "news.News") { - body: String @expr(body: "This is a news body") - id: Int @expr(body: 1) - postImage: String @expr(body: "http://example.com/image.jpg") - title: String @expr(body: "This is a news title") -} - -type News__NewsList @tag(id: "news.NewsList") { - news: [News__News] -} - -type Query { - news: NEWS -} diff --git a/tests/execution/test-tag.md b/tests/execution/test-tag.md deleted file mode 100644 index 69aa02a18f..0000000000 --- a/tests/execution/test-tag.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -identity: true ---- - -# test-tag - -```graphql @config -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { - query: Query -} - -type NEWS { - getAllNews: News__NewsList! -} - -type News__News @tag(id: "news.News") { - body: String @expr(body: "This is a news body") - id: Int @expr(body: 1) - postImage: String @expr(body: "http://example.com/image.jpg") - title: String @expr(body: "This is a news title") -} - -type News__NewsList @tag(id: "news.NewsList") { - news: [News__News] -} - -type Query { - news: NEWS -} -```