Skip to content

Commit

Permalink
Merge pull request #8 from bw-company/creasty/fix_case
Browse files Browse the repository at this point in the history
Creasty/fix case
  • Loading branch information
creasty authored Sep 30, 2020
2 parents 9080bb7 + f5208ae commit f371d1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bw-company/proto2graphql",
"version": "0.2.5-alpha",
"version": "0.2.6-alpha",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "Converts schema definitions in Protocol Buffer to GraphQL",
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export interface GenerateOption {
}
export function getGenerateOption(field: protobuf.Field): GenerateOption {
return {
skipOnType: !!field.options?.["proto2graphql.option.skipOnType"],
skipOnInput: !!field.options?.["proto2graphql.option.skipOnInput"],
skipOnType: !!field.options?.["proto2graphql.option.skip_on_type"],
skipOnInput: !!field.options?.["proto2graphql.option.skip_on_input"],
};
}

Expand Down
6 changes: 3 additions & 3 deletions test/skip/input.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";
import "proto2graphql/option.proto";

message TypeA {
string skipOnType = 1 [ proto2graphql.option.skipOnType = true ];
string skipOnInput = 2 [ proto2graphql.option.skipOnInput = true ];
string skipOnTypeAndInput = 3 [ proto2graphql.option.skipOnType = true, proto2graphql.option.skipOnInput = true ];
string skipOnType = 1 [ proto2graphql.option.skip_on_type = true ];
string skipOnInput = 2 [ proto2graphql.option.skip_on_input = true ];
string skipOnTypeAndInput = 3 [ proto2graphql.option.skip_on_type = true, proto2graphql.option.skip_on_input = true ];
}

0 comments on commit f371d1a

Please sign in to comment.