add graphql
Some checks failed
build / test (push) Successful in 2m13s
build / lint (push) Failing after 15m55s
codeql / analyze (go) (push) Failing after 1m26s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-23 01:35:14 +03:00
parent 6c0e4d74b9
commit 8d1b387aa1
16 changed files with 729 additions and 23 deletions

63
graphql/graphql.proto Normal file
View File

@@ -0,0 +1,63 @@
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;
}