protoc-gen-graphql:GraphQL 的 Protobuf 编译器插件

时间:2021-05-30 20:00:45
【文件属性】:
文件名称:protoc-gen-graphql:GraphQL 的 Protobuf 编译器插件
文件大小:95KB
文件格式:ZIP
更新时间:2021-05-30 20:00:45
Go protoc-gen-graphql protoc-gen-graphql是一个高度可定制的Protobuf编译器插件,用于生成GraphQL架构定义语言(SDL)文件。 用法 首先,下载插件并将可执行文件放在您的路径中。 然后,使用--graphql_out标志运行 Protobuf 编译器以启用此插件。 将此标志的值设置为您希望生成 SDL 文件的目录。 protoc -I . --graphql_out=output_dir path/to/file.proto ... 参数 可以通过将可选参数传递给插件来自定义 SDL 生成。 参数在输出目录之前使用逗号分隔的参数列表指定,以冒号分隔。 例如: protoc -I . --graphql_out=root_type_prefix=GRPC,null_wrappers:output_dir path/to/file.proto
【文件预览】:
protoc-gen-graphql-master
----testdata()
--------cycle()
--------proto2()
--------grpc()
--------extensions()
--------trim_prefix()
--------root_type_prefix()
--------basic()
--------empty()
--------.gitignore(10B)
--------field_name_preserve()
--------wrappers()
----mapper()
--------mapper.go(22KB)
--------string_utils_test.go(786B)
--------parameters.go(2KB)
--------string_utils.go(5KB)
----descriptor()
--------descriptor.go(12KB)
--------extensions.go(4KB)
----main.go(196B)
----graphql()
--------scalars.go(223B)
--------graphql.go(2KB)
--------type_def.go(5KB)
----generator.go(3KB)
----.gitignore(5B)
----Makefile(753B)
----go.sum(6KB)
----protobuf()
--------google()
--------graphql()
----README.md(3KB)
----generator_test.go(2KB)
----go.mod(142B)

网友评论