From c46e6fac3045610e8529786488c1780a76a2f375 Mon Sep 17 00:00:00 2001 From: Sebastian Tiedtke Date: Mon, 29 Jul 2024 16:58:30 -0700 Subject: [PATCH] Try upgrade --- cmd/gateway/main.go | 3 +- cmd/proto2graphql/main.go | 4 +- example/codegen/api/gql/options/generated.go | 42 +++++++++---------- .../api/graphql/constructs/generated.go | 16 +++---- .../codegen/api/graphql/options/generated.go | 42 +++++++++---------- example/codegen/api/pb/options.pb.go | 2 +- example/codegen/api/tools/tools.go | 2 +- example/codegen/main.go | 6 +-- example/gateway/constructsserver/main.go | 2 +- example/gateway/optionsserver/main.go | 2 +- .../gateway/optionsserver/pb/options.pb.go | 2 +- go.mod | 6 +-- pkg/generator/generator.go | 2 +- pkg/generator/utils.go | 2 +- pkg/server/gateway.go | 2 +- pkg/server/grpc.go | 7 ++-- pkg/server/queryer.go | 2 +- protoc-gen-gogql/main.go | 4 +- protoc-gen-gql/main.go | 5 ++- test/gateway_test.go | 4 +- test/generator_test.go | 4 +- test/testdata/options-input.pb.go | 2 +- 22 files changed, 82 insertions(+), 81 deletions(-) diff --git a/cmd/gateway/main.go b/cmd/gateway/main.go index 092321f..ac8d873 100644 --- a/cmd/gateway/main.go +++ b/cmd/gateway/main.go @@ -2,12 +2,13 @@ package main import ( "flag" - "github.com/danielvladco/go-proto-gql/pkg/server" "log" "net" "net/http" "os" + "github.com/stateful/go-proto-gql/pkg/server" + "gopkg.in/yaml.v2" ) diff --git a/cmd/proto2graphql/main.go b/cmd/proto2graphql/main.go index 03c2602..8ab4da9 100644 --- a/cmd/proto2graphql/main.go +++ b/cmd/proto2graphql/main.go @@ -8,8 +8,8 @@ import ( "path/filepath" "strings" - "github.com/danielvladco/go-proto-gql/pkg/generator" - "github.com/danielvladco/go-proto-gql/pkg/protoparser" + "github.com/stateful/go-proto-gql/pkg/generator" + "github.com/stateful/go-proto-gql/pkg/protoparser" "github.com/vektah/gqlparser/v2/formatter" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/types/pluginpb" diff --git a/example/codegen/api/gql/options/generated.go b/example/codegen/api/gql/options/generated.go index 9f41d08..008e65e 100644 --- a/example/codegen/api/gql/options/generated.go +++ b/example/codegen/api/gql/options/generated.go @@ -14,7 +14,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" + "github.com/stateful/go-proto-gql/example/codegen/api/pb" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -1630,7 +1630,7 @@ func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1722,7 +1722,7 @@ func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1814,7 +1814,7 @@ func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1906,7 +1906,7 @@ func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1998,7 +1998,7 @@ func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Conte if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2090,7 +2090,7 @@ func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2182,7 +2182,7 @@ func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2274,7 +2274,7 @@ func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.Co if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2366,7 +2366,7 @@ func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2458,7 +2458,7 @@ func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field gr if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2550,7 +2550,7 @@ func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field grap if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2642,7 +2642,7 @@ func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2734,7 +2734,7 @@ func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2826,7 +2826,7 @@ func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3047,7 +3047,7 @@ func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3153,7 +3153,7 @@ func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3259,7 +3259,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3365,7 +3365,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3471,7 +3471,7 @@ func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3577,7 +3577,7 @@ func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) diff --git a/example/codegen/api/graphql/constructs/generated.go b/example/codegen/api/graphql/constructs/generated.go index 7e54c78..ef9388a 100644 --- a/example/codegen/api/graphql/constructs/generated.go +++ b/example/codegen/api/graphql/constructs/generated.go @@ -12,8 +12,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" - "github.com/danielvladco/go-proto-gql/pkg/types" + "github.com/stateful/go-proto-gql/example/codegen/api/pb" + "github.com/stateful/go-proto-gql/pkg/types" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" "google.golang.org/protobuf/types/known/anypb" @@ -4717,7 +4717,7 @@ func (ec *executionContext) _Mutation_constructsScalars_(ctx context.Context, fi if data, ok := tmp.(*pb.Scalars); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Scalars`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Scalars`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4823,7 +4823,7 @@ func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, f if data, ok := tmp.(*pb.Repeated); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Repeated`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Repeated`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4931,7 +4931,7 @@ func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field if data, ok := tmp.(*pb.Maps); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Maps`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Maps`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -5039,7 +5039,7 @@ func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field if data, ok := tmp.(*pb.Any); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Any`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Any`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -5298,7 +5298,7 @@ func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field if data, ok := tmp.(*pb.Ref); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Ref`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Ref`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -5394,7 +5394,7 @@ func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, fiel if data, ok := tmp.(*pb.Oneof); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Oneof`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Oneof`, tmp) }) if err != nil { ec.Error(ctx, err) diff --git a/example/codegen/api/graphql/options/generated.go b/example/codegen/api/graphql/options/generated.go index 9f41d08..008e65e 100644 --- a/example/codegen/api/graphql/options/generated.go +++ b/example/codegen/api/graphql/options/generated.go @@ -14,7 +14,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" + "github.com/stateful/go-proto-gql/example/codegen/api/pb" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -1630,7 +1630,7 @@ func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1722,7 +1722,7 @@ func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1814,7 +1814,7 @@ func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1906,7 +1906,7 @@ func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1998,7 +1998,7 @@ func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Conte if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2090,7 +2090,7 @@ func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2182,7 +2182,7 @@ func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2274,7 +2274,7 @@ func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.Co if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2366,7 +2366,7 @@ func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2458,7 +2458,7 @@ func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field gr if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2550,7 +2550,7 @@ func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field grap if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2642,7 +2642,7 @@ func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2734,7 +2734,7 @@ func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2826,7 +2826,7 @@ func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3047,7 +3047,7 @@ func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3153,7 +3153,7 @@ func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3259,7 +3259,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3365,7 +3365,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3471,7 +3471,7 @@ func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -3577,7 +3577,7 @@ func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/stateful/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) diff --git a/example/codegen/api/pb/options.pb.go b/example/codegen/api/pb/options.pb.go index 042b066..80a9717 100644 --- a/example/codegen/api/pb/options.pb.go +++ b/example/codegen/api/pb/options.pb.go @@ -7,7 +7,7 @@ package pb import ( - _ "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + _ "github.com/stateful/go-proto-gql/pkg/graphqlpb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/example/codegen/api/tools/tools.go b/example/codegen/api/tools/tools.go index 94423c8..ad05be8 100644 --- a/example/codegen/api/tools/tools.go +++ b/example/codegen/api/tools/tools.go @@ -4,5 +4,5 @@ package tools import ( - _ "github.com/danielvladco/go-proto-gql/pkg/types" + _ "github.com/stateful/go-proto-gql/pkg/types" ) diff --git a/example/codegen/main.go b/example/codegen/main.go index 7bef389..0d99edf 100644 --- a/example/codegen/main.go +++ b/example/codegen/main.go @@ -9,9 +9,9 @@ import ( "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/playground" - "github.com/danielvladco/go-proto-gql/example/codegen/api/graphql/constructs" - "github.com/danielvladco/go-proto-gql/example/codegen/api/graphql/options" - pb2 "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" + "github.com/stateful/go-proto-gql/example/codegen/api/graphql/constructs" + "github.com/stateful/go-proto-gql/example/codegen/api/graphql/options" + pb2 "github.com/stateful/go-proto-gql/example/codegen/api/pb" ) const defaultPort = "8088" diff --git a/example/gateway/constructsserver/main.go b/example/gateway/constructsserver/main.go index 47b7982..0060283 100644 --- a/example/gateway/constructsserver/main.go +++ b/example/gateway/constructsserver/main.go @@ -10,7 +10,7 @@ import ( any "google.golang.org/protobuf/types/known/anypb" empty "google.golang.org/protobuf/types/known/emptypb" - pb "github.com/danielvladco/go-proto-gql/example/gateway/constructsserver/pb" + pb "github.com/stateful/go-proto-gql/example/gateway/constructsserver/pb" ) func main() { diff --git a/example/gateway/optionsserver/main.go b/example/gateway/optionsserver/main.go index 73576fe..b62ee6b 100644 --- a/example/gateway/optionsserver/main.go +++ b/example/gateway/optionsserver/main.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/reflection" - pb "github.com/danielvladco/go-proto-gql/example/gateway/optionsserver/pb" + pb "github.com/stateful/go-proto-gql/example/gateway/optionsserver/pb" ) func main() { diff --git a/example/gateway/optionsserver/pb/options.pb.go b/example/gateway/optionsserver/pb/options.pb.go index 055a438..88befa1 100644 --- a/example/gateway/optionsserver/pb/options.pb.go +++ b/example/gateway/optionsserver/pb/options.pb.go @@ -7,7 +7,7 @@ package optionsserver import ( - _ "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + _ "github.com/stateful/go-proto-gql/pkg/graphqlpb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/go.mod b/go.mod index 10039c8..52eec65 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/danielvladco/go-proto-gql +module github.com/stateful/go-proto-gql -go 1.17 +go 1.22 require ( github.com/99designs/gqlgen v0.17.22 @@ -37,5 +37,3 @@ require ( google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/nautilus/graphql v0.0.20 => github.com/nautilus/graphql v0.0.22 diff --git a/pkg/generator/generator.go b/pkg/generator/generator.go index 43f6aea..4f5f693 100644 --- a/pkg/generator/generator.go +++ b/pkg/generator/generator.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/compiler/protogen" descriptor "google.golang.org/protobuf/types/descriptorpb" - gqlpb "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + gqlpb "github.com/stateful/go-proto-gql/pkg/graphqlpb" ) const ( diff --git a/pkg/generator/utils.go b/pkg/generator/utils.go index 5405aac..0878bec 100644 --- a/pkg/generator/utils.go +++ b/pkg/generator/utils.go @@ -10,7 +10,7 @@ import ( descriptor "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/pluginpb" - gqlpb "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + gqlpb "github.com/stateful/go-proto-gql/pkg/graphqlpb" ) func GraphqlMethodOptions(opts proto.Message) *gqlpb.Rpc { diff --git a/pkg/server/gateway.go b/pkg/server/gateway.go index 03ae226..760aa8d 100644 --- a/pkg/server/gateway.go +++ b/pkg/server/gateway.go @@ -7,7 +7,7 @@ import ( "github.com/nautilus/graphql" "github.com/rs/cors" - "github.com/danielvladco/go-proto-gql/pkg/generator" + "github.com/stateful/go-proto-gql/pkg/generator" ) func Server(cfg *Config) (http.Handler, error) { diff --git a/pkg/server/grpc.go b/pkg/server/grpc.go index f600ed5..3ce7035 100644 --- a/pkg/server/grpc.go +++ b/pkg/server/grpc.go @@ -2,17 +2,18 @@ package server import ( "context" - "github.com/danielvladco/go-proto-gql/pkg/protoparser" - "google.golang.org/grpc/credentials" "log" "time" + "github.com/stateful/go-proto-gql/pkg/protoparser" + "google.golang.org/grpc/credentials" + "github.com/golang/protobuf/proto" "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/dynamic/grpcdynamic" "google.golang.org/grpc" - "github.com/danielvladco/go-proto-gql/pkg/reflection" + "github.com/stateful/go-proto-gql/pkg/reflection" ) type Grpc struct { diff --git a/pkg/server/queryer.go b/pkg/server/queryer.go index a77b8a2..e6b0d9f 100644 --- a/pkg/server/queryer.go +++ b/pkg/server/queryer.go @@ -18,7 +18,7 @@ import ( "github.com/vektah/gqlparser/v2/ast" "google.golang.org/protobuf/types/known/anypb" - "github.com/danielvladco/go-proto-gql/pkg/generator" + "github.com/stateful/go-proto-gql/pkg/generator" ) type any = map[string]interface{} diff --git a/protoc-gen-gogql/main.go b/protoc-gen-gogql/main.go index 1fbc92b..63aa75c 100644 --- a/protoc-gen-gogql/main.go +++ b/protoc-gen-gogql/main.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" - "github.com/danielvladco/go-proto-gql/pkg/generator" - gqlpb "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + "github.com/stateful/go-proto-gql/pkg/generator" + gqlpb "github.com/stateful/go-proto-gql/pkg/graphqlpb" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" diff --git a/protoc-gen-gql/main.go b/protoc-gen-gql/main.go index 66a35e8..c8036e1 100644 --- a/protoc-gen-gql/main.go +++ b/protoc-gen-gql/main.go @@ -2,7 +2,6 @@ package main import ( "bytes" - "google.golang.org/protobuf/compiler/protogen" "io/ioutil" "log" "os" @@ -11,11 +10,13 @@ import ( "strconv" "strings" + "google.golang.org/protobuf/compiler/protogen" + "github.com/vektah/gqlparser/v2/formatter" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/pluginpb" - "github.com/danielvladco/go-proto-gql/pkg/generator" + "github.com/stateful/go-proto-gql/pkg/generator" ) func main() { diff --git a/test/gateway_test.go b/test/gateway_test.go index 86ab698..cf6a1ed 100644 --- a/test/gateway_test.go +++ b/test/gateway_test.go @@ -10,12 +10,12 @@ import ( "reflect" "testing" - "github.com/danielvladco/go-proto-gql/pkg/server" - pb "github.com/danielvladco/go-proto-gql/test/testdata" "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" empty "github.com/golang/protobuf/ptypes/empty" "github.com/nautilus/graphql" + "github.com/stateful/go-proto-gql/pkg/server" + pb "github.com/stateful/go-proto-gql/test/testdata" "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" "google.golang.org/grpc" diff --git a/test/generator_test.go b/test/generator_test.go index 6c70e68..876689b 100644 --- a/test/generator_test.go +++ b/test/generator_test.go @@ -16,8 +16,8 @@ import ( "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/types/pluginpb" - "github.com/danielvladco/go-proto-gql/pkg/generator" - "github.com/danielvladco/go-proto-gql/pkg/protoparser" + "github.com/stateful/go-proto-gql/pkg/generator" + "github.com/stateful/go-proto-gql/pkg/protoparser" ) func Test_Generator(t *testing.T) { diff --git a/test/testdata/options-input.pb.go b/test/testdata/options-input.pb.go index 0f95ea4..7b8554e 100644 --- a/test/testdata/options-input.pb.go +++ b/test/testdata/options-input.pb.go @@ -7,7 +7,7 @@ package pb import ( - _ "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" + _ "github.com/stateful/go-proto-gql/pkg/graphqlpb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect"