Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type Hello
- type HelloInput
- type MutationResolver
- type OutHello
- type OutHelloInput
- type QueryClient
- type QueryResolver
- type QueryResolvers
- type QueryServer
- type Query_SubscribeClient
- type Query_SubscribeServer
- type ResolverRoot
- type ServiceClient
- type ServiceResolvers
- type ServiceServer
- type SubscriptionResolver
- type UnimplementedQueryServer
- func (UnimplementedQueryServer) Mutate1(context.Context, *Hello) (*Hello, error)
- func (UnimplementedQueryServer) Query1(context.Context, *Hello) (*Hello, error)
- func (UnimplementedQueryServer) Query2(context.Context, *Hello) (*Hello, error)
- func (UnimplementedQueryServer) Subscribe(*Hello, Query_SubscribeServer) error
- type UnimplementedServiceServer
- type UnsafeQueryServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_test_test_proto protoreflect.FileDescriptor
var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Query1", Handler: _Query_Query1_Handler, }, { MethodName: "Query2", Handler: _Query_Query2_Handler, }, { MethodName: "Mutate1", Handler: _Query_Mutate1_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Query_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "test/test.proto", }
Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "test.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "testQ", Handler: _Service_TestQ_Handler, }, { MethodName: "testM", Handler: _Service_TestM_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test/test.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Hello struct { Asdf func(childComplexity int) int Test func(childComplexity int) int } Mutation struct { QueryMutate1 func(childComplexity int, in *Hello) int ServiceTestM func(childComplexity int, in *Hello) int } OutHello struct { Asdf func(childComplexity int) int Qwertt func(childComplexity int, inputName *int) int } Query struct { QueryQuery1 func(childComplexity int, in *Hello) int QueryQuery2 func(childComplexity int, in *Hello) int ServiceTestQ func(childComplexity int, in *Hello) int } Subscription struct { QuerySubscribe func(childComplexity int, in *Hello) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { Auth func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) Auth123 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) DirName func(ctx context.Context, obj interface{}, next graphql.Resolver, paramName *string) (res interface{}, err error) Query func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) Service func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) }
type Hello ¶
type Hello struct { Test string `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"` Asdf string `protobuf:"bytes,2,opt,name=asdf,proto3" json:"asdf,omitempty"` // contains filtered or unexported fields }
func (*Hello) Descriptor
deprecated
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
type HelloInput ¶
type HelloInput = Hello
type MutationResolver ¶
type OutHello ¶
type OutHello struct { Asdf string `protobuf:"bytes,1,opt,name=asdf,proto3" json:"asdf,omitempty"` Qwertt string `protobuf:"bytes,3,opt,name=qwertt,proto3" json:"qwertt,omitempty"` // contains filtered or unexported fields }
func (*OutHello) Descriptor
deprecated
func (*OutHello) ProtoMessage ¶
func (*OutHello) ProtoMessage()
func (*OutHello) ProtoReflect ¶
func (x *OutHello) ProtoReflect() protoreflect.Message
type OutHelloInput ¶
type OutHelloInput = OutHello
type QueryClient ¶
type QueryClient interface { Query1(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error) Query2(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error) Mutate1(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error) Subscribe(ctx context.Context, in *Hello, opts ...grpc.CallOption) (Query_SubscribeClient, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient
type QueryResolver ¶
type QueryResolvers ¶
type QueryResolvers struct{ Service QueryServer }
func (*QueryResolvers) QueryMutate1 ¶
func (*QueryResolvers) QueryQuery1 ¶
func (*QueryResolvers) QueryQuery2 ¶
type QueryServer ¶
type QueryServer interface { Query1(context.Context, *Hello) (*Hello, error) Query2(context.Context, *Hello) (*Hello, error) Mutate1(context.Context, *Hello) (*Hello, error) Subscribe(*Hello, Query_SubscribeServer) error }
QueryServer is the server API for Query service. All implementations should embed UnimplementedQueryServer for forward compatibility
type Query_SubscribeClient ¶
type Query_SubscribeClient interface { Recv() (*Hello, error) grpc.ClientStream }
type Query_SubscribeServer ¶
type Query_SubscribeServer interface { Send(*Hello) error grpc.ServerStream }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver }
type ServiceClient ¶
type ServiceClient interface { TestQ(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*OutHello, error) TestM(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceResolvers ¶
type ServiceResolvers struct{ Service ServiceServer }
func (*ServiceResolvers) ServiceTestM ¶
func (*ServiceResolvers) ServiceTestQ ¶
type ServiceServer ¶
type ServiceServer interface { TestQ(context.Context, *Hello) (*OutHello, error) TestM(context.Context, *Hello) (*Hello, error) }
ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility
type SubscriptionResolver ¶
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer should be embedded to have forward compatible implementations.
func (UnimplementedQueryServer) Subscribe ¶
func (UnimplementedQueryServer) Subscribe(*Hello, Query_SubscribeServer) error
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer should be embedded to have forward compatible implementations.
type UnsafeQueryServer ¶
type UnsafeQueryServer interface {
// contains filtered or unexported methods
}
UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.