Skip to content

Commit

Permalink
Fix #2177
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 17, 2021
1 parent 51cd54f commit b07fd12
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/handlers/grpc/test/__snapshots__/handler.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,37 @@ type ServerStatus {
"
`;

exports[`Interpreting Protos should load the Custom Message2 proto 1`] = `
"type Query {
foo_BamService_GetFOOs(input: foo_GetFOOsRequest_Input = {}): foo_GetFOOsResponse
foo_BamService_ping: ServerStatus
}
type foo_GetFOOsResponse {
foos: [foo_FOO]
}
type foo_FOO {
id: BigInt
}
\\"\\"\\"
The \`BigInt\` scalar type represents non-fractional signed whole numeric values.
\\"\\"\\"
scalar BigInt
input foo_GetFOOsRequest_Input {
id: Int
}
\\"\\"\\"status of the server\\"\\"\\"
type ServerStatus {
\\"\\"\\"status string\\"\\"\\"
status: String
}
"
`;

exports[`Interpreting Protos should load the Empty proto 1`] = `
"type Query {
io_xtech_Example_GetMovies(input: io_xtech_MovieRequest_Input = {}): io_xtech_MoviesResult
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* This is an auto generated file. Please do not change it. */
syntax = "proto3";
package foo;
service BamService {
rpc GetFOOs (GetFOOsRequest) returns (GetFOOsResponse) {}
}

message GetFOOsRequest {
int32 id = 1;
}
message FOO {
int64 id = 1;
}
message GetFOOsResponse {
repeated FOO foos = 1;
}
1 change: 1 addition & 0 deletions packages/handlers/grpc/test/handler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe.each<[string, string]>([
['With Underscores', 'underscores.proto'],
['Outside', 'outside.proto'],
['Custom Message', 'custom-message.proto'],
['Custom Message2', 'custom-message-2.proto'],
])('Interpreting Protos', (name, file) => {
test(`should load the ${name} proto`, async () => {
const cache = new InMemoryLRUCache();
Expand Down

0 comments on commit b07fd12

Please sign in to comment.