micro-proto/graphql/graphql.proto

63 lines
1.2 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package micro.graphql;
option go_package = "go.unistack.org/micro-proto/v4/graphql;graphql";
import "google/protobuf/descriptor.proto";
// TODO: Email protobuf-global-extension-registry@google.com to get an extension ID.
extend google.protobuf.MethodOptions {
optional Rpc rpc = 65030;
}
extend google.protobuf.ServiceOptions {
optional Svc svc = 65030;
}
extend google.protobuf.FieldOptions {
optional Field field = 65030;
}
extend google.protobuf.OneofOptions {
optional Oneof oneof = 65030;
}
message Oneof {
optional bool ignore = 4;
optional string name = 5;
}
message Field {
optional bool required = 1;
optional string params = 2;
optional string dirs = 3;
optional bool ignore = 4;
optional string name = 5;
}
message Rpc {
optional Type type = 1;
optional bool ignore = 2;
optional string name = 3;
}
message Svc {
optional Type type = 1;
optional bool ignore = 2;
optional string name = 3;
optional Upstream upstream = 4;
}
enum Type {
DEFAULT = 0;
MUTATION = 1;
QUERY = 2;
}
enum Upstream {
UPSTREAM_UNSPECIFIED = 0;
UPSTREAM_SERVER = 1;
UPSTREAM_CLIENT = 2;
}