diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/customOptions.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/customOptions.test.ts.snap index 6db9a036..25ea3012 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/customOptions.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/customOptions.test.ts.snap @@ -9,81 +9,48 @@ type Query { ok: Boolean! } -\\"\\"\\"\\"\\"\\" enum TestPrefixPrefixedEnum { - \\"\\"\\"\\"\\"\\" PREFIXED_BAR - - \\"\\"\\"\\"\\"\\" PREFIXED_FOO } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessage { - \\"\\"\\"\\"\\"\\" body: String! \\"\\"\\"Output only.\\"\\"\\" id: String! - - \\"\\"\\"\\"\\"\\" prefixedEnum: TestPrefixPrefixedEnum - - \\"\\"\\"\\"\\"\\" squashedMessage: TestPrefixPrefixedMessageSquashedMessage - - \\"\\"\\"\\"\\"\\" thisFieldWasRenamed: String! } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessageInnerMessage { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessageInnerMessage2 { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInnerMessage2Input { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInnerMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" prefixedEnum: TestPrefixPrefixedEnum - - \\"\\"\\"\\"\\"\\" squashedMessage: TestPrefixPrefixedMessageSquashedMessageInput - - \\"\\"\\"\\"\\"\\" thisFieldWasRenamed: String! } -\\"\\"\\"\\"\\"\\" union TestPrefixPrefixedMessageSquashedMessage = TestPrefixPrefixedMessageInnerMessage | TestPrefixPrefixedMessageInnerMessage2 -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageSquashedMessageInput { - \\"\\"\\"\\"\\"\\" oneofIgnoredField: TestPrefixPrefixedMessageInnerMessageInput - - \\"\\"\\"\\"\\"\\" oneofIgnoredField2: TestPrefixPrefixedMessageInnerMessage2Input } " @@ -110,81 +77,48 @@ type Query { ok: Boolean! } -\\"\\"\\"\\"\\"\\" enum TestPrefixPrefixedEnum { - \\"\\"\\"\\"\\"\\" PREFIXED_BAR - - \\"\\"\\"\\"\\"\\" PREFIXED_FOO } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessage { - \\"\\"\\"\\"\\"\\" body: String! \\"\\"\\"Output only.\\"\\"\\" id: String! - - \\"\\"\\"\\"\\"\\" prefixedEnum: TestPrefixPrefixedEnum - - \\"\\"\\"\\"\\"\\" squashedMessage: TestPrefixPrefixedMessageSquashedMessage - - \\"\\"\\"\\"\\"\\" thisFieldWasRenamed: String! } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessageInnerMessage { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" type TestPrefixPrefixedMessageInnerMessage2 { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInnerMessage2Input { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInnerMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" prefixedEnum: TestPrefixPrefixedEnum - - \\"\\"\\"\\"\\"\\" squashedMessage: TestPrefixPrefixedMessageSquashedMessageInput - - \\"\\"\\"\\"\\"\\" thisFieldWasRenamed: String! } -\\"\\"\\"\\"\\"\\" union TestPrefixPrefixedMessageSquashedMessage = TestPrefixPrefixedMessageInnerMessage | TestPrefixPrefixedMessageInnerMessage2 -\\"\\"\\"\\"\\"\\" input TestPrefixPrefixedMessageSquashedMessageInput { - \\"\\"\\"\\"\\"\\" oneofIgnoredField: TestPrefixPrefixedMessageInnerMessageInput - - \\"\\"\\"\\"\\"\\" oneofIgnoredField2: TestPrefixPrefixedMessageInnerMessage2Input } " diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/deprecation.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/deprecation.test.ts.snap index 74a9a414..4fc144b5 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/deprecation.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/deprecation.test.ts.snap @@ -5,157 +5,91 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" enum DeprecatedEnum { - \\"\\"\\"\\"\\"\\" DEPRECATED_BAZ @deprecated(reason: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" DEPRECATED_QUX @deprecated(reason: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\") } -\\"\\"\\"\\"\\"\\" enum DeprecatedFileEnum { - \\"\\"\\"\\"\\"\\" DEPRECATED_FILE_BAR @deprecated(reason: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\") - - \\"\\"\\"\\"\\"\\" DEPRECATED_FILE_FOO @deprecated(reason: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\") } -\\"\\"\\"\\"\\"\\" type DeprecatedFileMessage { - \\"\\"\\"\\"\\"\\" body: String! @deprecated(reason: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\") - - \\"\\"\\"\\"\\"\\" enum: DeprecatedFileEnum @deprecated(reason: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\") } -\\"\\"\\"\\"\\"\\" type DeprecatedFileMessageInnerMessage { - \\"\\"\\"\\"\\"\\" body: String! @deprecated(reason: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\") } -\\"\\"\\"\\"\\"\\" input DeprecatedFileMessageInnerMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input DeprecatedFileMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" enum: DeprecatedFileEnum } -\\"\\"\\"\\"\\"\\" type DeprecatedMessage { - \\"\\"\\"\\"\\"\\" body: String! @deprecated(reason: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" enum: NotDeprecatedEnum @deprecated(reason: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\") } -\\"\\"\\"\\"\\"\\" type DeprecatedMessageInnerMessage { - \\"\\"\\"\\"\\"\\" body: String! @deprecated(reason: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\") } -\\"\\"\\"\\"\\"\\" input DeprecatedMessageInnerMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input DeprecatedMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" enum: NotDeprecatedEnum } -\\"\\"\\"\\"\\"\\" enum NotDeprecatedEnum { - \\"\\"\\"\\"\\"\\" DEPRECATED_BAR @deprecated(reason: \\"testapis.deprecation.NotDeprecatedEnum.DEPRECATED_BAR is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" NOT_DEPRECATED_FOO } -\\"\\"\\"\\"\\"\\" type NotDeprecatedMessage { - \\"\\"\\"\\"\\"\\" body: String! @deprecated(reason: \\"testapis.deprecation.NotDeprecatedMessage.body is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" deprecated_oneof: NotDeprecatedMessageDeprecatedOneof @deprecated(reason: \\"testapis.deprecation.NotDeprecatedMessage.deprecated_oneof is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" enum: DeprecatedEnum @deprecated(reason: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\") - - \\"\\"\\"\\"\\"\\" not_deprecated_oneof: NotDeprecatedMessageNotDeprecatedOneof } -\\"\\"\\"\\"\\"\\" union NotDeprecatedMessageDeprecatedOneof = NotDeprecatedMessageInnerMessage1 | NotDeprecatedMessageInnerMessage2 -\\"\\"\\"\\"\\"\\" type NotDeprecatedMessageInnerMessage1 { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input NotDeprecatedMessageInnerMessage1Input { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" type NotDeprecatedMessageInnerMessage2 { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input NotDeprecatedMessageInnerMessage2Input { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input NotDeprecatedMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" enum: DeprecatedEnum - - \\"\\"\\"\\"\\"\\" msg1: NotDeprecatedMessageInnerMessage1Input - - \\"\\"\\"\\"\\"\\" msg2: NotDeprecatedMessageInnerMessage2Input - - \\"\\"\\"\\"\\"\\" msg3: NotDeprecatedMessageInnerMessage1Input - - \\"\\"\\"\\"\\"\\" msg4: NotDeprecatedMessageInnerMessage2Input } -\\"\\"\\"\\"\\"\\" union NotDeprecatedMessageNotDeprecatedOneof = NotDeprecatedMessageInnerMessage1 | NotDeprecatedMessageInnerMessage2 type Query { diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/enums.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/enums.test.ts.snap index 332a7ffb..f987952b 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/enums.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/enums.test.ts.snap @@ -5,7 +5,6 @@ exports[`schema generation with native protobuf can make GraphQL schema from gen ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type MessageWithEnums { \\"\\"\\"Optional.\\"\\"\\" optionalMyEnum: MyEnum @@ -20,7 +19,6 @@ type MessageWithEnums { requiredMyEnumWithoutUnspecified: MyEnumWithoutUnspecified! } -\\"\\"\\"\\"\\"\\" input MessageWithEnumsInput { \\"\\"\\"Optional.\\"\\"\\" optionalMyEnum: MyEnum @@ -35,27 +33,16 @@ input MessageWithEnumsInput { requiredMyEnumWithoutUnspecified: MyEnumWithoutUnspecified! } -\\"\\"\\"\\"\\"\\" enum MyEnum { \\"\\"\\"This is Bar.\\"\\"\\" MY_ENUM_BAR - - \\"\\"\\"\\"\\"\\" MY_ENUM_BAZ - - \\"\\"\\"\\"\\"\\" MY_ENUM_FOO } -\\"\\"\\"\\"\\"\\" enum MyEnumWithoutUnspecified { - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_BAR - - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_BAZ - - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_FOO } @@ -70,7 +57,6 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type MessageWithEnums { \\"\\"\\"Optional.\\"\\"\\" optionalMyEnum: MyEnum @@ -85,7 +71,6 @@ type MessageWithEnums { requiredMyEnumWithoutUnspecified: MyEnumWithoutUnspecified! } -\\"\\"\\"\\"\\"\\" input MessageWithEnumsInput { \\"\\"\\"Optional.\\"\\"\\" optionalMyEnum: MyEnum @@ -100,27 +85,16 @@ input MessageWithEnumsInput { requiredMyEnumWithoutUnspecified: MyEnumWithoutUnspecified! } -\\"\\"\\"\\"\\"\\" enum MyEnum { \\"\\"\\"This is Bar.\\"\\"\\" MY_ENUM_BAR - - \\"\\"\\"\\"\\"\\" MY_ENUM_BAZ - - \\"\\"\\"\\"\\"\\" MY_ENUM_FOO } -\\"\\"\\"\\"\\"\\" enum MyEnumWithoutUnspecified { - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_BAR - - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_BAZ - - \\"\\"\\"\\"\\"\\" MY_ENUM_WITHOUT_UNSPECIFIED_FOO } diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/fieldBehavior.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/fieldBehavior.test.ts.snap index bf9a3d87..2d419a37 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/fieldBehavior.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/fieldBehavior.test.ts.snap @@ -5,7 +5,6 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type FieldBehaviorComentsMessage { \\"\\"\\"Output only.\\"\\"\\" outputOnlyField: FieldBehaviorComentsMessagePost @@ -20,7 +19,6 @@ type FieldBehaviorComentsMessage { requiredOutputOnlyField: FieldBehaviorComentsMessagePost! } -\\"\\"\\"\\"\\"\\" input FieldBehaviorComentsMessageInput { \\"\\"\\"Input only.\\"\\"\\" inputOnlyField: FieldBehaviorComentsMessagePostInput @@ -35,15 +33,11 @@ input FieldBehaviorComentsMessageInput { requiredInputOnlyField: FieldBehaviorComentsMessagePostInput! } -\\"\\"\\"\\"\\"\\" type FieldBehaviorComentsMessagePost { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input FieldBehaviorComentsMessagePostInput { - \\"\\"\\"\\"\\"\\" body: String! } diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/multipkgs.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/multipkgs.test.ts.snap index 976190da..a765678f 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/multipkgs.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/multipkgs.test.ts.snap @@ -5,21 +5,13 @@ exports[`schema generation with native protobuf can make GraphQL schema from gen ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type MessageWithSubpkg { - \\"\\"\\"\\"\\"\\" enum: SubpkgEnum - - \\"\\"\\"\\"\\"\\" message: SubpkgMessage } -\\"\\"\\"\\"\\"\\" input MessageWithSubpkgInput { - \\"\\"\\"\\"\\"\\" enum: SubpkgEnum - - \\"\\"\\"\\"\\"\\" message: SubpkgMessageInput } @@ -27,24 +19,16 @@ type Query { ok: Boolean! } -\\"\\"\\"\\"\\"\\" enum SubpkgEnum { - \\"\\"\\"\\"\\"\\" BAR - - \\"\\"\\"\\"\\"\\" FOO } -\\"\\"\\"\\"\\"\\" type SubpkgMessage { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input SubpkgMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } " @@ -55,21 +39,13 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type MessageWithSubpkg { - \\"\\"\\"\\"\\"\\" enum: SubpkgEnum - - \\"\\"\\"\\"\\"\\" message: SubpkgMessage } -\\"\\"\\"\\"\\"\\" input MessageWithSubpkgInput { - \\"\\"\\"\\"\\"\\" enum: SubpkgEnum - - \\"\\"\\"\\"\\"\\" message: SubpkgMessageInput } @@ -77,24 +53,16 @@ type Query { ok: Boolean! } -\\"\\"\\"\\"\\"\\" enum SubpkgEnum { - \\"\\"\\"\\"\\"\\" BAR - - \\"\\"\\"\\"\\"\\" FOO } -\\"\\"\\"\\"\\"\\" type SubpkgMessage { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input SubpkgMessageInput { - \\"\\"\\"\\"\\"\\" body: String! } " diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/nestedProto.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/nestedProto.test.ts.snap index 6217d174..bd5efd9c 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/nestedProto.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/nestedProto.test.ts.snap @@ -5,48 +5,28 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type ParentMessage { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" nested: ParentMessageNestedMessage - - \\"\\"\\"\\"\\"\\" nestedEnum: ParentMessageNestedEnum } -\\"\\"\\"\\"\\"\\" input ParentMessageInput { - \\"\\"\\"\\"\\"\\" body: String! - - \\"\\"\\"\\"\\"\\" nested: ParentMessageNestedMessageInput - - \\"\\"\\"\\"\\"\\" nestedEnum: ParentMessageNestedEnum } -\\"\\"\\"\\"\\"\\" enum ParentMessageNestedEnum { - \\"\\"\\"\\"\\"\\" BAR - - \\"\\"\\"\\"\\"\\" FOO } -\\"\\"\\"\\"\\"\\" type ParentMessageNestedMessage { - \\"\\"\\"\\"\\"\\" nestedBody: String! } -\\"\\"\\"\\"\\"\\" input ParentMessageNestedMessageInput { - \\"\\"\\"\\"\\"\\" nestedBody: String! } diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/oneof.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/oneof.test.ts.snap index 5fc27223..91ba13e0 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/oneof.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/oneof.test.ts.snap @@ -5,61 +5,38 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type OneofMemberMessage1 { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" input OneofMemberMessage1Input { - \\"\\"\\"\\"\\"\\" body: String! } -\\"\\"\\"\\"\\"\\" type OneofMemberMessage2 { - \\"\\"\\"\\"\\"\\" imageUrl: String! } -\\"\\"\\"\\"\\"\\" input OneofMemberMessage2Input { - \\"\\"\\"\\"\\"\\" imageUrl: String! } -\\"\\"\\"\\"\\"\\" type OneofParent { - \\"\\"\\"\\"\\"\\" normalField: String! - - \\"\\"\\"\\"\\"\\" optional_oneof_members: OneofParentOptionalOneofMembers \\"\\"\\"Required. disallow not_set.\\"\\"\\" required_oneof_members: OneofParentRequiredOneofMembers! } -\\"\\"\\"\\"\\"\\" input OneofParentInput { - \\"\\"\\"\\"\\"\\" normalField: String! - - \\"\\"\\"\\"\\"\\" optoinalMessage1: OneofMemberMessage1Input - - \\"\\"\\"\\"\\"\\" optoinalMessage2: OneofMemberMessage2Input - - \\"\\"\\"\\"\\"\\" requiredMessage1: OneofMemberMessage1Input - - \\"\\"\\"\\"\\"\\" requiredMessage2: OneofMemberMessage2Input } -\\"\\"\\"\\"\\"\\" union OneofParentOptionalOneofMembers = OneofMemberMessage1 | OneofMemberMessage2 \\"\\"\\"Required. disallow not_set.\\"\\"\\" diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/simpleProto.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/simpleProto.test.ts.snap index 763888c3..c7ab0a53 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/simpleProto.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/simpleProto.test.ts.snap @@ -5,7 +5,6 @@ exports[`schema generation with native protobuf can make GraphQL schema from gen ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type Hello { \\"\\"\\"Optional.\\"\\"\\" optionalPrimitives: Primitives @@ -20,7 +19,6 @@ type Hello { requiredPrimitivesList: [Primitives!] } -\\"\\"\\"\\"\\"\\" input HelloInput { \\"\\"\\"Optional.\\"\\"\\" optionalPrimitives: PrimitivesInput @@ -35,93 +33,37 @@ input HelloInput { requiredPrimitivesList: [PrimitivesInput!] } -\\"\\"\\"\\"\\"\\" type Primitives { - \\"\\"\\"\\"\\"\\" requiredBoolValue: Boolean! - - \\"\\"\\"\\"\\"\\" requiredDoubleValue: Float! - - \\"\\"\\"\\"\\"\\" requiredFixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredFixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredFloatValue: Float! - - \\"\\"\\"\\"\\"\\" requiredInt32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredInt64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSfixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSfixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSint64Value: String! - - \\"\\"\\"\\"\\"\\" requiredStringValue: String! - - \\"\\"\\"\\"\\"\\" requiredUint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredUint64Value: String! } -\\"\\"\\"\\"\\"\\" input PrimitivesInput { - \\"\\"\\"\\"\\"\\" requiredBoolValue: Boolean! - - \\"\\"\\"\\"\\"\\" requiredDoubleValue: Float! - - \\"\\"\\"\\"\\"\\" requiredFixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredFixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredFloatValue: Float! - - \\"\\"\\"\\"\\"\\" requiredInt32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredInt64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSfixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSfixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSint64Value: String! - - \\"\\"\\"\\"\\"\\" requiredStringValue: String! - - \\"\\"\\"\\"\\"\\" requiredUint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredUint64Value: String! } @@ -164,7 +106,6 @@ exports[`schema generation with protobufjs can make GraphQL schema from generate ### Do not make changes to this file directly -\\"\\"\\"\\"\\"\\" type Hello { \\"\\"\\"Optional.\\"\\"\\" optionalPrimitives: Primitives @@ -179,7 +120,6 @@ type Hello { requiredPrimitivesList: [Primitives!] } -\\"\\"\\"\\"\\"\\" input HelloInput { \\"\\"\\"Optional.\\"\\"\\" optionalPrimitives: PrimitivesInput @@ -194,93 +134,37 @@ input HelloInput { requiredPrimitivesList: [PrimitivesInput!] } -\\"\\"\\"\\"\\"\\" type Primitives { - \\"\\"\\"\\"\\"\\" requiredBoolValue: Boolean! - - \\"\\"\\"\\"\\"\\" requiredDoubleValue: Float! - - \\"\\"\\"\\"\\"\\" requiredFixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredFixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredFloatValue: Float! - - \\"\\"\\"\\"\\"\\" requiredInt32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredInt64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSfixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSfixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSint64Value: String! - - \\"\\"\\"\\"\\"\\" requiredStringValue: String! - - \\"\\"\\"\\"\\"\\" requiredUint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredUint64Value: String! } -\\"\\"\\"\\"\\"\\" input PrimitivesInput { - \\"\\"\\"\\"\\"\\" requiredBoolValue: Boolean! - - \\"\\"\\"\\"\\"\\" requiredDoubleValue: Float! - - \\"\\"\\"\\"\\"\\" requiredFixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredFixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredFloatValue: Float! - - \\"\\"\\"\\"\\"\\" requiredInt32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredInt64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSfixed32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSfixed64Value: String! - - \\"\\"\\"\\"\\"\\" requiredSint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredSint64Value: String! - - \\"\\"\\"\\"\\"\\" requiredStringValue: String! - - \\"\\"\\"\\"\\"\\" requiredUint32Value: Int! - - \\"\\"\\"\\"\\"\\" requiredUint64Value: String! } diff --git a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/wktypes.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/wktypes.test.ts.snap index b09d694a..05f347ec 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/wktypes.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__integration__/__snapshots__/wktypes.test.ts.snap @@ -10,63 +10,27 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`da \\"\\"\\" scalar DateTime -\\"\\"\\"\\"\\"\\" type Message { - \\"\\"\\"\\"\\"\\" boolValue: Boolean - - \\"\\"\\"\\"\\"\\" doubleValue: Float - - \\"\\"\\"\\"\\"\\" floatValue: Float - - \\"\\"\\"\\"\\"\\" int32Value: Int - - \\"\\"\\"\\"\\"\\" int64Value: String - - \\"\\"\\"\\"\\"\\" stringValue: String - - \\"\\"\\"\\"\\"\\" timestamp: DateTime - - \\"\\"\\"\\"\\"\\" uint32Value: Int - - \\"\\"\\"\\"\\"\\" uint64Value: String } -\\"\\"\\"\\"\\"\\" input MessageInput { - \\"\\"\\"\\"\\"\\" boolValue: Boolean - - \\"\\"\\"\\"\\"\\" doubleValue: Float - - \\"\\"\\"\\"\\"\\" floatValue: Float - - \\"\\"\\"\\"\\"\\" int32Value: Int - - \\"\\"\\"\\"\\"\\" int64Value: String - - \\"\\"\\"\\"\\"\\" stringValue: String - - \\"\\"\\"\\"\\"\\" timestamp: DateTime - - \\"\\"\\"\\"\\"\\" uint32Value: Int - - \\"\\"\\"\\"\\"\\" uint64Value: String } @@ -86,63 +50,27 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`da \\"\\"\\" scalar DateTime -\\"\\"\\"\\"\\"\\" type Message { - \\"\\"\\"\\"\\"\\" boolValue: Boolean - - \\"\\"\\"\\"\\"\\" doubleValue: Float - - \\"\\"\\"\\"\\"\\" floatValue: Float - - \\"\\"\\"\\"\\"\\" int32Value: Int - - \\"\\"\\"\\"\\"\\" int64Value: String - - \\"\\"\\"\\"\\"\\" stringValue: String - - \\"\\"\\"\\"\\"\\" timestamp: DateTime - - \\"\\"\\"\\"\\"\\" uint32Value: Int - - \\"\\"\\"\\"\\"\\" uint64Value: String } -\\"\\"\\"\\"\\"\\" input MessageInput { - \\"\\"\\"\\"\\"\\" boolValue: Boolean - - \\"\\"\\"\\"\\"\\" doubleValue: Float - - \\"\\"\\"\\"\\"\\" floatValue: Float - - \\"\\"\\"\\"\\"\\" int32Value: Int - - \\"\\"\\"\\"\\"\\" int64Value: String - - \\"\\"\\"\\"\\"\\" stringValue: String - - \\"\\"\\"\\"\\"\\" timestamp: DateTime - - \\"\\"\\"\\"\\"\\" uint32Value: Int - - \\"\\"\\"\\"\\"\\" uint64Value: String } diff --git a/packages/protoc-gen-nexus/src/__tests__/__snapshots__/process.test.ts.snap b/packages/protoc-gen-nexus/src/__tests__/__snapshots__/process.test.ts.snap index 0ef731ec..45d5b085 100644 --- a/packages/protoc-gen-nexus/src/__tests__/__snapshots__/process.test.ts.snap +++ b/packages/protoc-gen-nexus/src/__tests__/__snapshots__/process.test.ts.snap @@ -13,7 +13,6 @@ export type _$testapis$deprecation$deprecation_pb$NotDeprecatedMessageInnerMessa export type _$testapis$deprecation$deprecation_pb$NotDeprecatedMessageInnerMessage2 = _$testapis$deprecation$deprecation_pb.NotDeprecatedMessage.InnerMessage2; export const NotDeprecatedMessageNotDeprecatedOneof = unionType({ name: \\"NotDeprecatedMessageNotDeprecatedOneof\\", - description: \\"\\", definition(t) { t.members(\\"NotDeprecatedMessageInnerMessage1\\", \\"NotDeprecatedMessageInnerMessage2\\"); }, @@ -29,7 +28,6 @@ export const NotDeprecatedMessageNotDeprecatedOneof = unionType({ }); export const NotDeprecatedMessageDeprecatedOneof = unionType({ name: \\"NotDeprecatedMessageDeprecatedOneof\\", - description: \\"\\", definition(t) { t.members(\\"NotDeprecatedMessageInnerMessage1\\", \\"NotDeprecatedMessageInnerMessage2\\"); }, @@ -45,11 +43,9 @@ export const NotDeprecatedMessageDeprecatedOneof = unionType({ }); export const DeprecatedMessage = objectType({ name: \\"DeprecatedMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.getBody(); @@ -58,7 +54,6 @@ export const DeprecatedMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"NotDeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.getEnum(); @@ -76,11 +71,9 @@ export const DeprecatedMessage = objectType({ }); export const NotDeprecatedMessage = objectType({ name: \\"NotDeprecatedMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.body is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.getBody(); @@ -89,7 +82,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.getEnum(); @@ -104,7 +96,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"not_deprecated_oneof\\", { type: nullable(\\"NotDeprecatedMessageNotDeprecatedOneof\\"), - description: \\"\\", resolve(root) { switch (root.getNotDeprecatedOneofCase()) { case _$testapis$deprecation$deprecation_pb.NotDeprecatedMessage.NotDeprecatedOneofCase.NOT_DEPRECATED_ONEOF_NOT_SET: { @@ -124,7 +115,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"deprecated_oneof\\", { type: nullable(\\"NotDeprecatedMessageDeprecatedOneof\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.deprecated_oneof is mark as deprecated in a *.proto file.\\", resolve(root) { switch (root.getDeprecatedOneofCase()) { @@ -148,11 +138,9 @@ export const NotDeprecatedMessage = objectType({ }); export const DeprecatedMessageInnerMessage = objectType({ name: \\"DeprecatedMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.getBody(); @@ -164,11 +152,9 @@ export const DeprecatedMessageInnerMessage = objectType({ }); export const NotDeprecatedMessageInnerMessage1 = objectType({ name: \\"NotDeprecatedMessageInnerMessage1\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -179,11 +165,9 @@ export const NotDeprecatedMessageInnerMessage1 = objectType({ }); export const NotDeprecatedMessageInnerMessage2 = objectType({ name: \\"NotDeprecatedMessageInnerMessage2\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -194,98 +178,79 @@ export const NotDeprecatedMessageInnerMessage2 = objectType({ }); export const DeprecatedMessageInput = inputObjectType({ name: \\"DeprecatedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); t.field(\\"enum\\", { type: nullable(\\"NotDeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); } }); export const NotDeprecatedMessageInput = inputObjectType({ name: \\"NotDeprecatedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.body is mark as deprecated in a *.proto file.\\" }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg1\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage1Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg1 is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg2\\", { - type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\"), - description: \\"\\" + type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\") }); t.field(\\"msg3\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage1Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg3 is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg4\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg4 is mark as deprecated in a *.proto file.\\" }); } }); export const DeprecatedMessageInnerMessageInput = inputObjectType({ name: \\"DeprecatedMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); } }); export const NotDeprecatedMessageInnerMessage1Input = inputObjectType({ name: \\"NotDeprecatedMessageInnerMessage1Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const NotDeprecatedMessageInnerMessage2Input = inputObjectType({ name: \\"NotDeprecatedMessageInnerMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const NotDeprecatedEnum = enumType({ name: \\"NotDeprecatedEnum\\", - description: \\"\\", members: [ { name: \\"NOT_DEPRECATED_FOO\\", - description: \\"\\", value: 1 }, { name: \\"DEPRECATED_BAR\\", - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedEnum.DEPRECATED_BAR is mark as deprecated in a *.proto file.\\", value: 2 } @@ -293,17 +258,14 @@ export const NotDeprecatedEnum = enumType({ }); export const DeprecatedEnum = enumType({ name: \\"DeprecatedEnum\\", - description: \\"\\", members: [ { name: \\"DEPRECATED_BAZ\\", - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", value: 1 }, { name: \\"DEPRECATED_QUX\\", - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", value: 2 } @@ -322,11 +284,9 @@ export type _$testapis$deprecation$file_deprecation_pb$DeprecatedFileMessage = _ export type _$testapis$deprecation$file_deprecation_pb$DeprecatedFileMessageInnerMessage = _$testapis$deprecation$file_deprecation_pb.DeprecatedFileMessage.InnerMessage; export const DeprecatedFileMessage = objectType({ name: \\"DeprecatedFileMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.getBody(); @@ -335,7 +295,6 @@ export const DeprecatedFileMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedFileEnum\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.getEnum(); @@ -353,11 +312,9 @@ export const DeprecatedFileMessage = objectType({ }); export const DeprecatedFileMessageInnerMessage = objectType({ name: \\"DeprecatedFileMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.getBody(); @@ -369,44 +326,36 @@ export const DeprecatedFileMessageInnerMessage = objectType({ }); export const DeprecatedFileMessageInput = inputObjectType({ name: \\"DeprecatedFileMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedFileEnum\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); } }); export const DeprecatedFileMessageInnerMessageInput = inputObjectType({ name: \\"DeprecatedFileMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); } }); export const DeprecatedFileEnum = enumType({ name: \\"DeprecatedFileEnum\\", - description: \\"\\", members: [ { name: \\"DEPRECATED_FILE_FOO\\", - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", value: 1 }, { name: \\"DEPRECATED_FILE_BAR\\", - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", value: 2 } @@ -438,7 +387,6 @@ export type _$testapis$deprecation$testapis$deprecation$NotDeprecatedMessage_dep }); export const NotDeprecatedMessageNotDeprecatedOneof = unionType({ name: \\"NotDeprecatedMessageNotDeprecatedOneof\\", - description: \\"\\", definition(t) { t.members(\\"NotDeprecatedMessageInnerMessage1\\", \\"NotDeprecatedMessageInnerMessage2\\"); }, @@ -455,7 +403,6 @@ export const NotDeprecatedMessageNotDeprecatedOneof = unionType({ }); export const NotDeprecatedMessageDeprecatedOneof = unionType({ name: \\"NotDeprecatedMessageDeprecatedOneof\\", - description: \\"\\", definition(t) { t.members(\\"NotDeprecatedMessageInnerMessage1\\", \\"NotDeprecatedMessageInnerMessage2\\"); }, @@ -472,11 +419,9 @@ export const NotDeprecatedMessageDeprecatedOneof = unionType({ }); export const DeprecatedMessage = objectType({ name: \\"DeprecatedMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.body; @@ -488,7 +433,6 @@ export const DeprecatedMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"NotDeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.enum; @@ -506,11 +450,9 @@ export const DeprecatedMessage = objectType({ }); export const NotDeprecatedMessage = objectType({ name: \\"NotDeprecatedMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.body is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.body; @@ -522,7 +464,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.enum; @@ -537,7 +478,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"not_deprecated_oneof\\", { type: nullable(\\"NotDeprecatedMessageNotDeprecatedOneof\\"), - description: \\"\\", resolve(root) { if (root.msg1) { return Object.assign(root.msg1, { __protobufTypeName: (\\"testapis.deprecation.NotDeprecatedMessage.InnerMessage1\\" as const) }); @@ -550,7 +490,6 @@ export const NotDeprecatedMessage = objectType({ }); t.field(\\"deprecated_oneof\\", { type: nullable(\\"NotDeprecatedMessageDeprecatedOneof\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.deprecated_oneof is mark as deprecated in a *.proto file.\\", resolve(root) { if (root.msg3) { @@ -567,11 +506,9 @@ export const NotDeprecatedMessage = objectType({ }); export const DeprecatedMessageInnerMessage = objectType({ name: \\"DeprecatedMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\", resolve(root) { const value = root.body; @@ -586,11 +523,9 @@ export const DeprecatedMessageInnerMessage = objectType({ }); export const NotDeprecatedMessageInnerMessage1 = objectType({ name: \\"NotDeprecatedMessageInnerMessage1\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -604,11 +539,9 @@ export const NotDeprecatedMessageInnerMessage1 = objectType({ }); export const NotDeprecatedMessageInnerMessage2 = objectType({ name: \\"NotDeprecatedMessageInnerMessage2\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -622,98 +555,79 @@ export const NotDeprecatedMessageInnerMessage2 = objectType({ }); export const DeprecatedMessageInput = inputObjectType({ name: \\"DeprecatedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); t.field(\\"enum\\", { type: nullable(\\"NotDeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); } }); export const NotDeprecatedMessageInput = inputObjectType({ name: \\"NotDeprecatedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.body is mark as deprecated in a *.proto file.\\" }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedEnum\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg1\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage1Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg1 is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg2\\", { - type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\"), - description: \\"\\" + type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\") }); t.field(\\"msg3\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage1Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg3 is mark as deprecated in a *.proto file.\\" }); t.field(\\"msg4\\", { type: nullable(\\"NotDeprecatedMessageInnerMessage2Input\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedMessage.msg4 is mark as deprecated in a *.proto file.\\" }); } }); export const DeprecatedMessageInnerMessageInput = inputObjectType({ name: \\"DeprecatedMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedMessage is mark as deprecated in a *.proto file.\\" }); } }); export const NotDeprecatedMessageInnerMessage1Input = inputObjectType({ name: \\"NotDeprecatedMessageInnerMessage1Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const NotDeprecatedMessageInnerMessage2Input = inputObjectType({ name: \\"NotDeprecatedMessageInnerMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const NotDeprecatedEnum = enumType({ name: \\"NotDeprecatedEnum\\", - description: \\"\\", members: [ { name: \\"NOT_DEPRECATED_FOO\\", - description: \\"\\", value: 1 }, { name: \\"DEPRECATED_BAR\\", - description: \\"\\", deprecation: \\"testapis.deprecation.NotDeprecatedEnum.DEPRECATED_BAR is mark as deprecated in a *.proto file.\\", value: 2 } @@ -721,17 +635,14 @@ export const NotDeprecatedEnum = enumType({ }); export const DeprecatedEnum = enumType({ name: \\"DeprecatedEnum\\", - description: \\"\\", members: [ { name: \\"DEPRECATED_BAZ\\", - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", value: 1 }, { name: \\"DEPRECATED_QUX\\", - description: \\"\\", deprecation: \\"testapis.deprecation.DeprecatedEnum is mark as deprecated in a *.proto file.\\", value: 2 } @@ -750,11 +661,9 @@ export type _$testapis$deprecation$testapis$deprecation$DeprecatedFileMessage = export type _$testapis$deprecation$testapis$deprecation$DeprecatedFileMessageInnerMessage = _$testapis$deprecation.testapis.deprecation.DeprecatedFileMessage.IInnerMessage; export const DeprecatedFileMessage = objectType({ name: \\"DeprecatedFileMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.body; @@ -766,7 +675,6 @@ export const DeprecatedFileMessage = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedFileEnum\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.enum; @@ -784,11 +692,9 @@ export const DeprecatedFileMessage = objectType({ }); export const DeprecatedFileMessageInnerMessage = objectType({ name: \\"DeprecatedFileMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", resolve(root) { const value = root.body; @@ -803,44 +709,36 @@ export const DeprecatedFileMessageInnerMessage = objectType({ }); export const DeprecatedFileMessageInput = inputObjectType({ name: \\"DeprecatedFileMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); t.field(\\"enum\\", { type: nullable(\\"DeprecatedFileEnum\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); } }); export const DeprecatedFileMessageInnerMessageInput = inputObjectType({ name: \\"DeprecatedFileMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\" }); } }); export const DeprecatedFileEnum = enumType({ name: \\"DeprecatedFileEnum\\", - description: \\"\\", members: [ { name: \\"DEPRECATED_FILE_FOO\\", - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", value: 1 }, { name: \\"DEPRECATED_FILE_BAR\\", - description: \\"\\", deprecation: \\"testapis/deprecation/file_deprecation.proto is mark as deprecated.\\", value: 2 } @@ -859,7 +757,6 @@ export type _$testapis$field_behavior$comments_pb$FieldBehaviorComentsMessage = export type _$testapis$field_behavior$comments_pb$FieldBehaviorComentsMessagePost = _$testapis$field_behavior$comments_pb.FieldBehaviorComentsMessage.Post; export const FieldBehaviorComentsMessage = objectType({ name: \\"FieldBehaviorComentsMessage\\", - description: \\"\\", definition(t) { t.field(\\"requiredField\\", { type: nonNull(\\"FieldBehaviorComentsMessagePost\\"), @@ -910,11 +807,9 @@ export const FieldBehaviorComentsMessage = objectType({ }); export const FieldBehaviorComentsMessagePost = objectType({ name: \\"FieldBehaviorComentsMessagePost\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -925,7 +820,6 @@ export const FieldBehaviorComentsMessagePost = objectType({ }); export const FieldBehaviorComentsMessageInput = inputObjectType({ name: \\"FieldBehaviorComentsMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredField\\", { type: nonNull(\\"FieldBehaviorComentsMessagePostInput\\"), @@ -947,11 +841,9 @@ export const FieldBehaviorComentsMessageInput = inputObjectType({ }); export const FieldBehaviorComentsMessagePostInput = inputObjectType({ name: \\"FieldBehaviorComentsMessagePostInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -968,7 +860,6 @@ export type _$testapis$field_behavior$testapis$deprecation$FieldBehaviorComentsM export type _$testapis$field_behavior$testapis$deprecation$FieldBehaviorComentsMessagePost = _$testapis$field_behavior.testapis.deprecation.FieldBehaviorComentsMessage.IPost; export const FieldBehaviorComentsMessage = objectType({ name: \\"FieldBehaviorComentsMessage\\", - description: \\"\\", definition(t) { t.field(\\"requiredField\\", { type: nonNull(\\"FieldBehaviorComentsMessagePost\\"), @@ -1019,11 +910,9 @@ export const FieldBehaviorComentsMessage = objectType({ }); export const FieldBehaviorComentsMessagePost = objectType({ name: \\"FieldBehaviorComentsMessagePost\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1037,7 +926,6 @@ export const FieldBehaviorComentsMessagePost = objectType({ }); export const FieldBehaviorComentsMessageInput = inputObjectType({ name: \\"FieldBehaviorComentsMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredField\\", { type: nonNull(\\"FieldBehaviorComentsMessagePostInput\\"), @@ -1059,11 +947,9 @@ export const FieldBehaviorComentsMessageInput = inputObjectType({ }); export const FieldBehaviorComentsMessagePostInput = inputObjectType({ name: \\"FieldBehaviorComentsMessagePostInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -1079,11 +965,9 @@ import * as _$testapis$multipkgs$subpkg1$types_pb from \\"./testapis/multipkgs/s export type _$testapis$multipkgs$subpkg1$types_pb$SubpkgMessage = _$testapis$multipkgs$subpkg1$types_pb.SubpkgMessage; export const SubpkgMessage = objectType({ name: \\"SubpkgMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -1094,26 +978,21 @@ export const SubpkgMessage = objectType({ }); export const SubpkgMessageInput = inputObjectType({ name: \\"SubpkgMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const SubpkgEnum = enumType({ name: \\"SubpkgEnum\\", - description: \\"\\", members: [ { name: \\"FOO\\", - description: \\"\\", value: 1 }, { name: \\"BAR\\", - description: \\"\\", value: 2 } ] @@ -1131,11 +1010,9 @@ import * as _$testapis$multipkgs$subpkg1$types_pb from \\"./testapis/multipkgs/s export type _$testapis$multipkgs$subpkg2$types_pb$MessageWithSubpkg = _$testapis$multipkgs$subpkg2$types_pb.MessageWithSubpkg; export const MessageWithSubpkg = objectType({ name: \\"MessageWithSubpkg\\", - description: \\"\\", definition(t) { t.field(\\"message\\", { type: nullable(\\"SubpkgMessage\\"), - description: \\"\\", resolve(root) { const value = root.getMessage(); if (value == null) { @@ -1146,7 +1023,6 @@ export const MessageWithSubpkg = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"SubpkgEnum\\"), - description: \\"\\", resolve(root) { const value = root.getEnum(); if (value == null) { @@ -1163,15 +1039,12 @@ export const MessageWithSubpkg = objectType({ }); export const MessageWithSubpkgInput = inputObjectType({ name: \\"MessageWithSubpkgInput\\", - description: \\"\\", definition(t) { t.field(\\"message\\", { - type: nullable(\\"SubpkgMessageInput\\"), - description: \\"\\" + type: nullable(\\"SubpkgMessageInput\\") }); t.field(\\"enum\\", { - type: nullable(\\"SubpkgEnum\\"), - description: \\"\\" + type: nullable(\\"SubpkgEnum\\") }); } }); @@ -1187,11 +1060,9 @@ import * as _$testapis$multipkgs$subpkg1 from \\"./testapis/multipkgs/subpkg1\\" export type _$testapis$multipkgs$subpkg1$testapis$multipkgs$subpkg1$SubpkgMessage = _$testapis$multipkgs$subpkg1.testapis.multipkgs.subpkg1.ISubpkgMessage; export const SubpkgMessage = objectType({ name: \\"SubpkgMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1205,26 +1076,21 @@ export const SubpkgMessage = objectType({ }); export const SubpkgMessageInput = inputObjectType({ name: \\"SubpkgMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const SubpkgEnum = enumType({ name: \\"SubpkgEnum\\", - description: \\"\\", members: [ { name: \\"FOO\\", - description: \\"\\", value: 1 }, { name: \\"BAR\\", - description: \\"\\", value: 2 } ] @@ -1242,11 +1108,9 @@ import * as _$testapis$multipkgs$subpkg1 from \\"./testapis/multipkgs/subpkg1\\" export type _$testapis$multipkgs$subpkg2$testapis$multipkgs$subpkg1$MessageWithSubpkg = _$testapis$multipkgs$subpkg2.testapis.multipkgs.subpkg1.IMessageWithSubpkg; export const MessageWithSubpkg = objectType({ name: \\"MessageWithSubpkg\\", - description: \\"\\", definition(t) { t.field(\\"message\\", { type: nullable(\\"SubpkgMessage\\"), - description: \\"\\", resolve(root) { const value = root.message; if (value == null) { @@ -1257,7 +1121,6 @@ export const MessageWithSubpkg = objectType({ }); t.field(\\"enum\\", { type: nullable(\\"SubpkgEnum\\"), - description: \\"\\", resolve(root) { const value = root.enum; if (value == null) { @@ -1274,15 +1137,12 @@ export const MessageWithSubpkg = objectType({ }); export const MessageWithSubpkgInput = inputObjectType({ name: \\"MessageWithSubpkgInput\\", - description: \\"\\", definition(t) { t.field(\\"message\\", { - type: nullable(\\"SubpkgMessageInput\\"), - description: \\"\\" + type: nullable(\\"SubpkgMessageInput\\") }); t.field(\\"enum\\", { - type: nullable(\\"SubpkgEnum\\"), - description: \\"\\" + type: nullable(\\"SubpkgEnum\\") }); } }); @@ -1299,11 +1159,9 @@ export type _$testapis$nested$nested_pb$ParentMessage = _$testapis$nested$nested export type _$testapis$nested$nested_pb$ParentMessageNestedMessage = _$testapis$nested$nested_pb.ParentMessage.NestedMessage; export const ParentMessage = objectType({ name: \\"ParentMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -1311,7 +1169,6 @@ export const ParentMessage = objectType({ }); t.field(\\"nested\\", { type: nullable(\\"ParentMessageNestedMessage\\"), - description: \\"\\", resolve(root) { const value = root.getNested(); if (value == null) { @@ -1322,7 +1179,6 @@ export const ParentMessage = objectType({ }); t.field(\\"nestedEnum\\", { type: nullable(\\"ParentMessageNestedEnum\\"), - description: \\"\\", resolve(root) { const value = root.getNestedEnum(); if (value == null) { @@ -1339,11 +1195,9 @@ export const ParentMessage = objectType({ }); export const ParentMessageNestedMessage = objectType({ name: \\"ParentMessageNestedMessage\\", - description: \\"\\", definition(t) { t.field(\\"nestedBody\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getNestedBody(); return value; @@ -1354,44 +1208,35 @@ export const ParentMessageNestedMessage = objectType({ }); export const ParentMessageInput = inputObjectType({ name: \\"ParentMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"nested\\", { - type: nullable(\\"ParentMessageNestedMessageInput\\"), - description: \\"\\" + type: nullable(\\"ParentMessageNestedMessageInput\\") }); t.field(\\"nestedEnum\\", { - type: nullable(\\"ParentMessageNestedEnum\\"), - description: \\"\\" + type: nullable(\\"ParentMessageNestedEnum\\") }); } }); export const ParentMessageNestedMessageInput = inputObjectType({ name: \\"ParentMessageNestedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"nestedBody\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const ParentMessageNestedEnum = enumType({ name: \\"ParentMessageNestedEnum\\", - description: \\"\\", members: [ { name: \\"FOO\\", - description: \\"\\", value: 1 }, { name: \\"BAR\\", - description: \\"\\", value: 2 } ] @@ -1409,11 +1254,9 @@ export type _$testapis$nested$testapis$nested$ParentMessage = _$testapis$nested. export type _$testapis$nested$testapis$nested$ParentMessageNestedMessage = _$testapis$nested.testapis.nested.ParentMessage.INestedMessage; export const ParentMessage = objectType({ name: \\"ParentMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1424,7 +1267,6 @@ export const ParentMessage = objectType({ }); t.field(\\"nested\\", { type: nullable(\\"ParentMessageNestedMessage\\"), - description: \\"\\", resolve(root) { const value = root.nested; if (value == null) { @@ -1435,7 +1277,6 @@ export const ParentMessage = objectType({ }); t.field(\\"nestedEnum\\", { type: nullable(\\"ParentMessageNestedEnum\\"), - description: \\"\\", resolve(root) { const value = root.nestedEnum; if (value == null) { @@ -1452,11 +1293,9 @@ export const ParentMessage = objectType({ }); export const ParentMessageNestedMessage = objectType({ name: \\"ParentMessageNestedMessage\\", - description: \\"\\", definition(t) { t.field(\\"nestedBody\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.nestedBody; if (value == null) { @@ -1470,44 +1309,35 @@ export const ParentMessageNestedMessage = objectType({ }); export const ParentMessageInput = inputObjectType({ name: \\"ParentMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"nested\\", { - type: nullable(\\"ParentMessageNestedMessageInput\\"), - description: \\"\\" + type: nullable(\\"ParentMessageNestedMessageInput\\") }); t.field(\\"nestedEnum\\", { - type: nullable(\\"ParentMessageNestedEnum\\"), - description: \\"\\" + type: nullable(\\"ParentMessageNestedEnum\\") }); } }); export const ParentMessageNestedMessageInput = inputObjectType({ name: \\"ParentMessageNestedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"nestedBody\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const ParentMessageNestedEnum = enumType({ name: \\"ParentMessageNestedEnum\\", - description: \\"\\", members: [ { name: \\"FOO\\", - description: \\"\\", value: 1 }, { name: \\"BAR\\", - description: \\"\\", value: 2 } ] @@ -1531,7 +1361,6 @@ export type _$testapis$extensions$extensions_pb$TestPrefixPrefixedMessageInnerMe export type _$testapis$extensions$extensions_pb$TestPrefixPrefixedMessageSquashedMessage = _$testapis$extensions$extensions_pb.PrefixedMessage.SquashedMessage; export const TestPrefixPrefixedMessageSquashedMessage = unionType({ name: \\"TestPrefixPrefixedMessageSquashedMessage\\", - description: \\"\\", definition(t) { t.members(\\"TestPrefixPrefixedMessageInnerMessage\\", \\"TestPrefixPrefixedMessageInnerMessage2\\"); }, @@ -1547,7 +1376,6 @@ export const TestPrefixPrefixedMessageSquashedMessage = unionType({ }); export const TestPrefixPrefixedMessage = objectType({ name: \\"TestPrefixPrefixedMessage\\", - description: \\"\\", definition(t) { t.field(\\"id\\", { type: nonNull(\\"String\\"), @@ -1559,7 +1387,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -1567,7 +1394,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"prefixedEnum\\", { type: nullable(\\"TestPrefixPrefixedEnum\\"), - description: \\"\\", resolve(root) { const value = root.getPrefixedEnum(); if (value == null) { @@ -1584,7 +1410,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"squashedMessage\\", { type: nullable(\\"TestPrefixPrefixedMessageSquashedMessage\\"), - description: \\"\\", resolve(root) { const value = root.getSquashedMessage(); if (value == null) { @@ -1608,7 +1433,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"thisFieldWasRenamed\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getThisFieldWillBeRenamed(); return value; @@ -1619,11 +1443,9 @@ export const TestPrefixPrefixedMessage = objectType({ }); export const TestPrefixPrefixedMessageInnerMessage = objectType({ name: \\"TestPrefixPrefixedMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -1634,11 +1456,9 @@ export const TestPrefixPrefixedMessageInnerMessage = objectType({ }); export const TestPrefixPrefixedMessageInnerMessage2 = objectType({ name: \\"TestPrefixPrefixedMessageInnerMessage2\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -1649,72 +1469,57 @@ export const TestPrefixPrefixedMessageInnerMessage2 = objectType({ }); export const TestPrefixPrefixedMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"prefixedEnum\\", { - type: nullable(\\"TestPrefixPrefixedEnum\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedEnum\\") }); t.field(\\"squashedMessage\\", { - type: nullable(\\"TestPrefixPrefixedMessageSquashedMessageInput\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageSquashedMessageInput\\") }); t.field(\\"thisFieldWasRenamed\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageInnerMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageInnerMessage2Input = inputObjectType({ name: \\"TestPrefixPrefixedMessageInnerMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageSquashedMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageSquashedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"oneofIgnoredField\\", { - type: nullable(\\"TestPrefixPrefixedMessageInnerMessageInput\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageInnerMessageInput\\") }); t.field(\\"oneofIgnoredField2\\", { - type: nullable(\\"TestPrefixPrefixedMessageInnerMessage2Input\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageInnerMessage2Input\\") }); } }); export const TestPrefixPrefixedEnum = enumType({ name: \\"TestPrefixPrefixedEnum\\", - description: \\"\\", members: [ { name: \\"PREFIXED_FOO\\", - description: \\"\\", value: 1 }, { name: \\"PREFIXED_BAR\\", - description: \\"\\", value: 2 } ] @@ -1743,7 +1548,6 @@ export type _$testapis$extensions$testapis$extensions$TestPrefixPrefixedMessageS }); export const TestPrefixPrefixedMessageSquashedMessage = unionType({ name: \\"TestPrefixPrefixedMessageSquashedMessage\\", - description: \\"\\", definition(t) { t.members(\\"TestPrefixPrefixedMessageInnerMessage\\", \\"TestPrefixPrefixedMessageInnerMessage2\\"); }, @@ -1760,7 +1564,6 @@ export const TestPrefixPrefixedMessageSquashedMessage = unionType({ }); export const TestPrefixPrefixedMessage = objectType({ name: \\"TestPrefixPrefixedMessage\\", - description: \\"\\", definition(t) { t.field(\\"id\\", { type: nonNull(\\"String\\"), @@ -1775,7 +1578,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1786,7 +1588,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"prefixedEnum\\", { type: nullable(\\"TestPrefixPrefixedEnum\\"), - description: \\"\\", resolve(root) { const value = root.prefixedEnum; if (value == null) { @@ -1803,7 +1604,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"squashedMessage\\", { type: nullable(\\"TestPrefixPrefixedMessageSquashedMessage\\"), - description: \\"\\", resolve(root) { const value = root.squashedMessage; if (value == null) { @@ -1820,7 +1620,6 @@ export const TestPrefixPrefixedMessage = objectType({ }); t.field(\\"thisFieldWasRenamed\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.thisFieldWillBeRenamed; if (value == null) { @@ -1834,11 +1633,9 @@ export const TestPrefixPrefixedMessage = objectType({ }); export const TestPrefixPrefixedMessageInnerMessage = objectType({ name: \\"TestPrefixPrefixedMessageInnerMessage\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1852,11 +1649,9 @@ export const TestPrefixPrefixedMessageInnerMessage = objectType({ }); export const TestPrefixPrefixedMessageInnerMessage2 = objectType({ name: \\"TestPrefixPrefixedMessageInnerMessage2\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -1870,72 +1665,57 @@ export const TestPrefixPrefixedMessageInnerMessage2 = objectType({ }); export const TestPrefixPrefixedMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"prefixedEnum\\", { - type: nullable(\\"TestPrefixPrefixedEnum\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedEnum\\") }); t.field(\\"squashedMessage\\", { - type: nullable(\\"TestPrefixPrefixedMessageSquashedMessageInput\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageSquashedMessageInput\\") }); t.field(\\"thisFieldWasRenamed\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageInnerMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageInnerMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageInnerMessage2Input = inputObjectType({ name: \\"TestPrefixPrefixedMessageInnerMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const TestPrefixPrefixedMessageSquashedMessageInput = inputObjectType({ name: \\"TestPrefixPrefixedMessageSquashedMessageInput\\", - description: \\"\\", definition(t) { t.field(\\"oneofIgnoredField\\", { - type: nullable(\\"TestPrefixPrefixedMessageInnerMessageInput\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageInnerMessageInput\\") }); t.field(\\"oneofIgnoredField2\\", { - type: nullable(\\"TestPrefixPrefixedMessageInnerMessage2Input\\"), - description: \\"\\" + type: nullable(\\"TestPrefixPrefixedMessageInnerMessage2Input\\") }); } }); export const TestPrefixPrefixedEnum = enumType({ name: \\"TestPrefixPrefixedEnum\\", - description: \\"\\", members: [ { name: \\"PREFIXED_FOO\\", - description: \\"\\", value: 1 }, { name: \\"PREFIXED_BAR\\", - description: \\"\\", value: 2 } ] @@ -1952,7 +1732,6 @@ import * as _$testapis$enums$enums_pb from \\"./testapis/enums/enums_pb\\"; export type _$testapis$enums$enums_pb$MessageWithEnums = _$testapis$enums$enums_pb.MessageWithEnums; export const MessageWithEnums = objectType({ name: \\"MessageWithEnums\\", - description: \\"\\", definition(t) { t.field(\\"requiredMyEnum\\", { type: nonNull(\\"MyEnum\\"), @@ -2009,7 +1788,6 @@ export const MessageWithEnums = objectType({ }); export const MessageWithEnumsInput = inputObjectType({ name: \\"MessageWithEnumsInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredMyEnum\\", { type: nonNull(\\"MyEnum\\"), @@ -2031,11 +1809,9 @@ export const MessageWithEnumsInput = inputObjectType({ }); export const MyEnum = enumType({ name: \\"MyEnum\\", - description: \\"\\", members: [ { name: \\"MY_ENUM_FOO\\", - description: \\"\\", value: 1 }, { @@ -2045,28 +1821,23 @@ export const MyEnum = enumType({ }, { name: \\"MY_ENUM_BAZ\\", - description: \\"\\", value: 3 } ] }); export const MyEnumWithoutUnspecified = enumType({ name: \\"MyEnumWithoutUnspecified\\", - description: \\"\\", members: [ { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_FOO\\", - description: \\"\\", value: 0 }, { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_BAR\\", - description: \\"\\", value: 1 }, { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_BAZ\\", - description: \\"\\", value: 2 } ] @@ -2083,7 +1854,6 @@ import * as _$testapis$enums from \\"./testapis/enums\\"; export type _$testapis$enums$testapi$enums$MessageWithEnums = _$testapis$enums.testapi.enums.IMessageWithEnums; export const MessageWithEnums = objectType({ name: \\"MessageWithEnums\\", - description: \\"\\", definition(t) { t.field(\\"requiredMyEnum\\", { type: nonNull(\\"MyEnum\\"), @@ -2140,7 +1910,6 @@ export const MessageWithEnums = objectType({ }); export const MessageWithEnumsInput = inputObjectType({ name: \\"MessageWithEnumsInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredMyEnum\\", { type: nonNull(\\"MyEnum\\"), @@ -2162,11 +1931,9 @@ export const MessageWithEnumsInput = inputObjectType({ }); export const MyEnum = enumType({ name: \\"MyEnum\\", - description: \\"\\", members: [ { name: \\"MY_ENUM_FOO\\", - description: \\"\\", value: 1 }, { @@ -2176,28 +1943,23 @@ export const MyEnum = enumType({ }, { name: \\"MY_ENUM_BAZ\\", - description: \\"\\", value: 3 } ] }); export const MyEnumWithoutUnspecified = enumType({ name: \\"MyEnumWithoutUnspecified\\", - description: \\"\\", members: [ { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_FOO\\", - description: \\"\\", value: 0 }, { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_BAR\\", - description: \\"\\", value: 1 }, { name: \\"MY_ENUM_WITHOUT_UNSPECIFIED_BAZ\\", - description: \\"\\", value: 2 } ] @@ -2232,7 +1994,6 @@ export const OneofParentRequiredOneofMembers = unionType({ }); export const OneofParentOptionalOneofMembers = unionType({ name: \\"OneofParentOptionalOneofMembers\\", - description: \\"\\", definition(t) { t.members(\\"OneofMemberMessage1\\", \\"OneofMemberMessage2\\"); }, @@ -2248,11 +2009,9 @@ export const OneofParentOptionalOneofMembers = unionType({ }); export const OneofParent = objectType({ name: \\"OneofParent\\", - description: \\"\\", definition(t) { t.field(\\"normalField\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getNormalField(); return value; @@ -2280,7 +2039,6 @@ export const OneofParent = objectType({ }); t.field(\\"optional_oneof_members\\", { type: nullable(\\"OneofParentOptionalOneofMembers\\"), - description: \\"\\", resolve(root) { switch (root.getOptionalOneofMembersCase()) { case _$testapis$oneof$oneof_pb.OneofParent.OptionalOneofMembersCase.OPTIONAL_ONEOF_MEMBERS_NOT_SET: { @@ -2303,11 +2061,9 @@ export const OneofParent = objectType({ }); export const OneofMemberMessage1 = objectType({ name: \\"OneofMemberMessage1\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getBody(); return value; @@ -2318,11 +2074,9 @@ export const OneofMemberMessage1 = objectType({ }); export const OneofMemberMessage2 = objectType({ name: \\"OneofMemberMessage2\\", - description: \\"\\", definition(t) { t.field(\\"imageUrl\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getImageUrl(); return value; @@ -2333,47 +2087,37 @@ export const OneofMemberMessage2 = objectType({ }); export const OneofParentInput = inputObjectType({ name: \\"OneofParentInput\\", - description: \\"\\", definition(t) { t.field(\\"normalField\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredMessage1\\", { - type: nullable(\\"OneofMemberMessage1Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage1Input\\") }); t.field(\\"requiredMessage2\\", { - type: nullable(\\"OneofMemberMessage2Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage2Input\\") }); t.field(\\"optoinalMessage1\\", { - type: nullable(\\"OneofMemberMessage1Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage1Input\\") }); t.field(\\"optoinalMessage2\\", { - type: nullable(\\"OneofMemberMessage2Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage2Input\\") }); } }); export const OneofMemberMessage1Input = inputObjectType({ name: \\"OneofMemberMessage1Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const OneofMemberMessage2Input = inputObjectType({ name: \\"OneofMemberMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"imageUrl\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -2418,7 +2162,6 @@ export const OneofParentRequiredOneofMembers = unionType({ }); export const OneofParentOptionalOneofMembers = unionType({ name: \\"OneofParentOptionalOneofMembers\\", - description: \\"\\", definition(t) { t.members(\\"OneofMemberMessage1\\", \\"OneofMemberMessage2\\"); }, @@ -2435,11 +2178,9 @@ export const OneofParentOptionalOneofMembers = unionType({ }); export const OneofParent = objectType({ name: \\"OneofParent\\", - description: \\"\\", definition(t) { t.field(\\"normalField\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.normalField; if (value == null) { @@ -2463,7 +2204,6 @@ export const OneofParent = objectType({ }); t.field(\\"optional_oneof_members\\", { type: nullable(\\"OneofParentOptionalOneofMembers\\"), - description: \\"\\", resolve(root) { if (root.optoinalMessage1) { return Object.assign(root.optoinalMessage1, { __protobufTypeName: (\\"testapis.oneof.OneofMemberMessage1\\" as const) }); @@ -2479,11 +2219,9 @@ export const OneofParent = objectType({ }); export const OneofMemberMessage1 = objectType({ name: \\"OneofMemberMessage1\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.body; if (value == null) { @@ -2497,11 +2235,9 @@ export const OneofMemberMessage1 = objectType({ }); export const OneofMemberMessage2 = objectType({ name: \\"OneofMemberMessage2\\", - description: \\"\\", definition(t) { t.field(\\"imageUrl\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.imageUrl; if (value == null) { @@ -2515,47 +2251,37 @@ export const OneofMemberMessage2 = objectType({ }); export const OneofParentInput = inputObjectType({ name: \\"OneofParentInput\\", - description: \\"\\", definition(t) { t.field(\\"normalField\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredMessage1\\", { - type: nullable(\\"OneofMemberMessage1Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage1Input\\") }); t.field(\\"requiredMessage2\\", { - type: nullable(\\"OneofMemberMessage2Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage2Input\\") }); t.field(\\"optoinalMessage1\\", { - type: nullable(\\"OneofMemberMessage1Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage1Input\\") }); t.field(\\"optoinalMessage2\\", { - type: nullable(\\"OneofMemberMessage2Input\\"), - description: \\"\\" + type: nullable(\\"OneofMemberMessage2Input\\") }); } }); export const OneofMemberMessage1Input = inputObjectType({ name: \\"OneofMemberMessage1Input\\", - description: \\"\\", definition(t) { t.field(\\"body\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); export const OneofMemberMessage2Input = inputObjectType({ name: \\"OneofMemberMessage2Input\\", - description: \\"\\", definition(t) { t.field(\\"imageUrl\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -2572,7 +2298,6 @@ export type _$testapis$hello$hello_pb$Hello = _$testapis$hello$hello_pb.Hello; export type _$testapis$hello$hello_pb$Primitives = _$testapis$hello$hello_pb.Primitives; export const Hello = objectType({ name: \\"Hello\\", - description: \\"\\", definition(t) { t.field(\\"requiredPrimitives\\", { type: nonNull(\\"Primitives\\"), @@ -2620,11 +2345,9 @@ export const Hello = objectType({ }); export const Primitives = objectType({ name: \\"Primitives\\", - description: \\"\\", definition(t) { t.field(\\"requiredDoubleValue\\", { type: nonNull(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredDoubleValue(); return value; @@ -2632,7 +2355,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFloatValue\\", { type: nonNull(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredFloatValue(); return value; @@ -2640,7 +2362,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredInt32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredInt32Value(); return value; @@ -2648,7 +2369,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredInt64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredInt64Value(); return value.toString(); @@ -2656,7 +2376,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredUint32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredUint32Value(); return value; @@ -2664,7 +2383,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredUint64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredUint64Value(); return value.toString(); @@ -2672,7 +2390,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSint32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredSint32Value(); return value; @@ -2680,7 +2397,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSint64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredSint64Value(); return value.toString(); @@ -2688,7 +2404,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFixed32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredFixed32Value(); return value; @@ -2696,7 +2411,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFixed64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredFixed64Value(); return value.toString(); @@ -2704,7 +2418,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSfixed32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredSfixed32Value(); return value; @@ -2712,7 +2425,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSfixed64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredSfixed64Value(); return value.toString(); @@ -2720,7 +2432,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredBoolValue\\", { type: nonNull(\\"Boolean\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredBoolValue(); return value; @@ -2728,7 +2439,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredStringValue\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getRequiredStringValue(); return value; @@ -2739,7 +2449,6 @@ export const Primitives = objectType({ }); export const HelloInput = inputObjectType({ name: \\"HelloInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredPrimitives\\", { type: nonNull(\\"PrimitivesInput\\"), @@ -2761,63 +2470,48 @@ export const HelloInput = inputObjectType({ }); export const PrimitivesInput = inputObjectType({ name: \\"PrimitivesInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredDoubleValue\\", { - type: nonNull(\\"Float\\"), - description: \\"\\" + type: nonNull(\\"Float\\") }); t.field(\\"requiredFloatValue\\", { - type: nonNull(\\"Float\\"), - description: \\"\\" + type: nonNull(\\"Float\\") }); t.field(\\"requiredInt32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredInt64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredUint32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredUint64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredSint32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredSint64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredFixed32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredFixed64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredSfixed32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredSfixed64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredBoolValue\\", { - type: nonNull(\\"Boolean\\"), - description: \\"\\" + type: nonNull(\\"Boolean\\") }); t.field(\\"requiredStringValue\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -2834,7 +2528,6 @@ export type _$testapis$hello$testapis$hello$Hello = _$testapis$hello.testapis.he export type _$testapis$hello$testapis$hello$Primitives = _$testapis$hello.testapis.hello.IPrimitives; export const Hello = objectType({ name: \\"Hello\\", - description: \\"\\", definition(t) { t.field(\\"requiredPrimitives\\", { type: nonNull(\\"Primitives\\"), @@ -2885,11 +2578,9 @@ export const Hello = objectType({ }); export const Primitives = objectType({ name: \\"Primitives\\", - description: \\"\\", definition(t) { t.field(\\"requiredDoubleValue\\", { type: nonNull(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.requiredDoubleValue; if (value == null) { @@ -2900,7 +2591,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFloatValue\\", { type: nonNull(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.requiredFloatValue; if (value == null) { @@ -2911,7 +2601,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredInt32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.requiredInt32Value; if (value == null) { @@ -2922,7 +2611,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredInt64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredInt64Value; if (value == null) { @@ -2933,7 +2621,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredUint32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.requiredUint32Value; if (value == null) { @@ -2944,7 +2631,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredUint64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredUint64Value; if (value == null) { @@ -2955,7 +2641,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSint32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.requiredSint32Value; if (value == null) { @@ -2966,7 +2651,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSint64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredSint64Value; if (value == null) { @@ -2977,7 +2661,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFixed32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.requiredFixed32Value; if (value == null) { @@ -2988,7 +2671,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredFixed64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredFixed64Value; if (value == null) { @@ -2999,7 +2681,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSfixed32Value\\", { type: nonNull(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.requiredSfixed32Value; if (value == null) { @@ -3010,7 +2691,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredSfixed64Value\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredSfixed64Value; if (value == null) { @@ -3021,7 +2701,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredBoolValue\\", { type: nonNull(\\"Boolean\\"), - description: \\"\\", resolve(root) { const value = root.requiredBoolValue; if (value == null) { @@ -3032,7 +2711,6 @@ export const Primitives = objectType({ }); t.field(\\"requiredStringValue\\", { type: nonNull(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.requiredStringValue; if (value == null) { @@ -3046,7 +2724,6 @@ export const Primitives = objectType({ }); export const HelloInput = inputObjectType({ name: \\"HelloInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredPrimitives\\", { type: nonNull(\\"PrimitivesInput\\"), @@ -3068,63 +2745,48 @@ export const HelloInput = inputObjectType({ }); export const PrimitivesInput = inputObjectType({ name: \\"PrimitivesInput\\", - description: \\"\\", definition(t) { t.field(\\"requiredDoubleValue\\", { - type: nonNull(\\"Float\\"), - description: \\"\\" + type: nonNull(\\"Float\\") }); t.field(\\"requiredFloatValue\\", { - type: nonNull(\\"Float\\"), - description: \\"\\" + type: nonNull(\\"Float\\") }); t.field(\\"requiredInt32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredInt64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredUint32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredUint64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredSint32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredSint64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredFixed32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredFixed64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredSfixed32Value\\", { - type: nonNull(\\"Int\\"), - description: \\"\\" + type: nonNull(\\"Int\\") }); t.field(\\"requiredSfixed64Value\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); t.field(\\"requiredBoolValue\\", { - type: nonNull(\\"Boolean\\"), - description: \\"\\" + type: nonNull(\\"Boolean\\") }); t.field(\\"requiredStringValue\\", { - type: nonNull(\\"String\\"), - description: \\"\\" + type: nonNull(\\"String\\") }); } }); @@ -3141,11 +2803,9 @@ import * as _$testapis$wktypes$well_known_types_pb from \\"./testapis/wktypes/we export type _$testapis$wktypes$well_known_types_pb$Message = _$testapis$wktypes$well_known_types_pb.Message; export const Message = objectType({ name: \\"Message\\", - description: \\"\\", definition(t) { t.field(\\"timestamp\\", { type: nullable(\\"DateTime\\"), - description: \\"\\", resolve(root) { const value = root.getTimestamp(); if (value == null) { @@ -3156,7 +2816,6 @@ export const Message = objectType({ }); t.field(\\"int32Value\\", { type: nullable(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getInt32Value(); if (value == null) { @@ -3167,7 +2826,6 @@ export const Message = objectType({ }); t.field(\\"int64Value\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getInt64Value(); if (value == null) { @@ -3178,7 +2836,6 @@ export const Message = objectType({ }); t.field(\\"uint32Value\\", { type: nullable(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.getUint32Value(); if (value == null) { @@ -3189,7 +2846,6 @@ export const Message = objectType({ }); t.field(\\"uint64Value\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getUint64Value(); if (value == null) { @@ -3200,7 +2856,6 @@ export const Message = objectType({ }); t.field(\\"floatValue\\", { type: nullable(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.getFloatValue(); if (value == null) { @@ -3211,7 +2866,6 @@ export const Message = objectType({ }); t.field(\\"doubleValue\\", { type: nullable(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.getDoubleValue(); if (value == null) { @@ -3222,7 +2876,6 @@ export const Message = objectType({ }); t.field(\\"boolValue\\", { type: nullable(\\"Boolean\\"), - description: \\"\\", resolve(root) { const value = root.getBoolValue(); if (value == null) { @@ -3233,7 +2886,6 @@ export const Message = objectType({ }); t.field(\\"stringValue\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.getStringValue(); if (value == null) { @@ -3247,43 +2899,33 @@ export const Message = objectType({ }); export const MessageInput = inputObjectType({ name: \\"MessageInput\\", - description: \\"\\", definition(t) { t.field(\\"timestamp\\", { - type: nullable(\\"DateTime\\"), - description: \\"\\" + type: nullable(\\"DateTime\\") }); t.field(\\"int32Value\\", { - type: nullable(\\"Int\\"), - description: \\"\\" + type: nullable(\\"Int\\") }); t.field(\\"int64Value\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); t.field(\\"uint32Value\\", { - type: nullable(\\"Int\\"), - description: \\"\\" + type: nullable(\\"Int\\") }); t.field(\\"uint64Value\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); t.field(\\"floatValue\\", { - type: nullable(\\"Float\\"), - description: \\"\\" + type: nullable(\\"Float\\") }); t.field(\\"doubleValue\\", { - type: nullable(\\"Float\\"), - description: \\"\\" + type: nullable(\\"Float\\") }); t.field(\\"boolValue\\", { - type: nullable(\\"Boolean\\"), - description: \\"\\" + type: nullable(\\"Boolean\\") }); t.field(\\"stringValue\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); } }); @@ -3300,11 +2942,9 @@ import * as _$testapis$wktypes from \\"./testapis/wktypes\\"; export type _$testapis$wktypes$testapis$wktypes$Message = _$testapis$wktypes.testapis.wktypes.IMessage; export const Message = objectType({ name: \\"Message\\", - description: \\"\\", definition(t) { t.field(\\"timestamp\\", { type: nullable(\\"DateTime\\"), - description: \\"\\", resolve(root) { const value = root.timestamp; if (value == null) { @@ -3315,7 +2955,6 @@ export const Message = objectType({ }); t.field(\\"int32Value\\", { type: nullable(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.int32Value; if (value == null) { @@ -3326,7 +2965,6 @@ export const Message = objectType({ }); t.field(\\"int64Value\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.int64Value; if (value == null) { @@ -3337,7 +2975,6 @@ export const Message = objectType({ }); t.field(\\"uint32Value\\", { type: nullable(\\"Int\\"), - description: \\"\\", resolve(root) { const value = root.uint32Value; if (value == null) { @@ -3348,7 +2985,6 @@ export const Message = objectType({ }); t.field(\\"uint64Value\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.uint64Value; if (value == null) { @@ -3359,7 +2995,6 @@ export const Message = objectType({ }); t.field(\\"floatValue\\", { type: nullable(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.floatValue; if (value == null) { @@ -3370,7 +3005,6 @@ export const Message = objectType({ }); t.field(\\"doubleValue\\", { type: nullable(\\"Float\\"), - description: \\"\\", resolve(root) { const value = root.doubleValue; if (value == null) { @@ -3381,7 +3015,6 @@ export const Message = objectType({ }); t.field(\\"boolValue\\", { type: nullable(\\"Boolean\\"), - description: \\"\\", resolve(root) { const value = root.boolValue; if (value == null) { @@ -3392,7 +3025,6 @@ export const Message = objectType({ }); t.field(\\"stringValue\\", { type: nullable(\\"String\\"), - description: \\"\\", resolve(root) { const value = root.stringValue; if (value == null) { @@ -3406,43 +3038,33 @@ export const Message = objectType({ }); export const MessageInput = inputObjectType({ name: \\"MessageInput\\", - description: \\"\\", definition(t) { t.field(\\"timestamp\\", { - type: nullable(\\"DateTime\\"), - description: \\"\\" + type: nullable(\\"DateTime\\") }); t.field(\\"int32Value\\", { - type: nullable(\\"Int\\"), - description: \\"\\" + type: nullable(\\"Int\\") }); t.field(\\"int64Value\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); t.field(\\"uint32Value\\", { - type: nullable(\\"Int\\"), - description: \\"\\" + type: nullable(\\"Int\\") }); t.field(\\"uint64Value\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); t.field(\\"floatValue\\", { - type: nullable(\\"Float\\"), - description: \\"\\" + type: nullable(\\"Float\\") }); t.field(\\"doubleValue\\", { - type: nullable(\\"Float\\"), - description: \\"\\" + type: nullable(\\"Float\\") }); t.field(\\"boolValue\\", { - type: nullable(\\"Boolean\\"), - description: \\"\\" + type: nullable(\\"Boolean\\") }); t.field(\\"stringValue\\", { - type: nullable(\\"String\\"), - description: \\"\\" + type: nullable(\\"String\\") }); } }); diff --git a/packages/protoc-gen-nexus/src/dslgen/enumType.ts b/packages/protoc-gen-nexus/src/dslgen/enumType.ts index e92576fc..a711cb35 100644 --- a/packages/protoc-gen-nexus/src/dslgen/enumType.ts +++ b/packages/protoc-gen-nexus/src/dslgen/enumType.ts @@ -52,7 +52,7 @@ function createEnumTypeDslStmt(en: ProtoEnum): ts.Statement { true // multiline ) ), - ], + ].filter(onlyNonNull()), true ), ]) diff --git a/packages/protoc-gen-nexus/src/dslgen/inputObjectType.ts b/packages/protoc-gen-nexus/src/dslgen/inputObjectType.ts index 2509a076..fb7ff6a8 100644 --- a/packages/protoc-gen-nexus/src/dslgen/inputObjectType.ts +++ b/packages/protoc-gen-nexus/src/dslgen/inputObjectType.ts @@ -8,6 +8,7 @@ import { isIgnoredField, isIgnoredType, isOutputOnlyField, + onlyNonNull, } from "./util"; import { createFieldDefinitionStmt } from "./field"; import { GenerationParams } from "./types"; @@ -51,7 +52,7 @@ function createInputObjectTypeDslStmt(msg: ProtoMessage, reg: ProtoRegistry, opt ts.factory.createPropertyAssignment("name", ts.factory.createStringLiteral(typeName)), createDescriptionPropertyAssignment(msg), createInputObjectTypeDefinitionMethodDecl(msg, reg, opts), - ], + ].filter(onlyNonNull()), true ), ]) diff --git a/packages/protoc-gen-nexus/src/dslgen/objectType.ts b/packages/protoc-gen-nexus/src/dslgen/objectType.ts index 11f136e3..eed32fe4 100644 --- a/packages/protoc-gen-nexus/src/dslgen/objectType.ts +++ b/packages/protoc-gen-nexus/src/dslgen/objectType.ts @@ -9,6 +9,7 @@ import { isIgnoredType, isInputOnlyField, isSquashedUnion, + onlyNonNull, protoExportAlias, } from "./util"; import { createFieldDefinitionStmt } from "./field"; @@ -56,7 +57,7 @@ function createObjectTypeDslStmt(msg: ProtoMessage, reg: ProtoRegistry, opts: Ge createDescriptionPropertyAssignment(msg), createObjectTypeDefinitionMethodDecl(msg, reg, opts), ts.factory.createPropertyAssignment("sourceType", sourceTypeExpr(msg, opts)), - ], + ].filter(onlyNonNull()), true ), ]) diff --git a/packages/protoc-gen-nexus/src/dslgen/util.ts b/packages/protoc-gen-nexus/src/dslgen/util.ts index 7327786c..31a4fe77 100644 --- a/packages/protoc-gen-nexus/src/dslgen/util.ts +++ b/packages/protoc-gen-nexus/src/dslgen/util.ts @@ -39,11 +39,10 @@ export function gqlTypeName(typ: ProtoMessage | ProtoOneof | ProtoEnum, opts?: { return name + suffix; } -export function createDescriptionPropertyAssignment(proto: { comments: CommentSet }): ts.PropertyAssignment { - return ts.factory.createPropertyAssignment( - "description", - ts.factory.createStringLiteral(proto.comments.leadingComments.trim()) - ); +export function createDescriptionPropertyAssignment(proto: { comments: CommentSet }): ts.PropertyAssignment | null { + const desc = proto.comments.leadingComments.trim(); + if (!desc) return null; + return ts.factory.createPropertyAssignment("description", ts.factory.createStringLiteral(desc)); } function getDeprecationReason(