From 03b14fd81ec3481ddc364200eb8f385b7ca91f36 Mon Sep 17 00:00:00 2001 From: pedraumcosta Date: Mon, 18 Mar 2024 17:49:24 -0300 Subject: [PATCH 01/31] feat: support file upload in router --- .../employees/subgraph/schema.graphqls | 5 + .../employees/subgraph/schema.resolvers.go | 15 +++ router-tests/integration_test.go | 47 ++++++++++ router-tests/testenv/testenv.go | 85 ++++++++++++++++- router/core/context.go | 6 ++ router/core/graphql_handler.go | 1 + router/core/graphql_prehandler.go | 92 ++++++++++++++++--- router/core/operation_planner.go | 1 + router/core/operation_processor.go | 14 ++- router/core/websocket.go | 2 +- 10 files changed, 248 insertions(+), 20 deletions(-) diff --git a/demo/pkg/subgraphs/employees/subgraph/schema.graphqls b/demo/pkg/subgraphs/employees/subgraph/schema.graphqls index 268ebf9934..ccfa130999 100644 --- a/demo/pkg/subgraphs/employees/subgraph/schema.graphqls +++ b/demo/pkg/subgraphs/employees/subgraph/schema.graphqls @@ -13,8 +13,13 @@ type Query { firstEmployee: Employee! @tag(name: "internal") } +scalar Upload + type Mutation { updateEmployeeTag(id: Int!, tag: String!): Employee + + singleUpload(file: Upload!): Boolean! + multipleUpload(files: [Upload!]!): Boolean! } type Subscription { diff --git a/demo/pkg/subgraphs/employees/subgraph/schema.resolvers.go b/demo/pkg/subgraphs/employees/subgraph/schema.resolvers.go index 53e8d48a24..777755a5d2 100644 --- a/demo/pkg/subgraphs/employees/subgraph/schema.resolvers.go +++ b/demo/pkg/subgraphs/employees/subgraph/schema.resolvers.go @@ -9,6 +9,7 @@ import ( "fmt" "time" + "github.com/99designs/gqlgen/graphql" "github.com/wundergraph/cosmo/demo/pkg/subgraphs/employees/subgraph/generated" "github.com/wundergraph/cosmo/demo/pkg/subgraphs/employees/subgraph/model" ) @@ -69,6 +70,20 @@ func (r *mutationResolver) UpdateEmployeeTag(ctx context.Context, id int, tag st return nil, nil } +// SingleUpload is the resolver for the singleUpload field. +func (r *mutationResolver) SingleUpload(ctx context.Context, file graphql.Upload) (bool, error) { + fmt.Printf("uploading file %s with size %d", file.Filename, file.Size) + return true, nil +} + +// MultipleUpload is the resolver for the multipleUpload field. +func (r *mutationResolver) MultipleUpload(ctx context.Context, files []*graphql.Upload) (bool, error) { + for _, file := range files { + fmt.Printf("uploading file %s with size %d", file.Filename, file.Size) + } + return true, nil +} + // Employees is the resolver for the employees field. func (r *operatorResolver) Employees(ctx context.Context, obj *model.Operator) ([]*model.Employee, error) { return r.Resolver.Employees(ctx, obj) diff --git a/router-tests/integration_test.go b/router-tests/integration_test.go index 179594db89..083865617a 100644 --- a/router-tests/integration_test.go +++ b/router-tests/integration_test.go @@ -80,6 +80,53 @@ func TestIntegration(t *testing.T) { }) } +func TestSingleFileUpload(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + Subgraphs: testenv.SubgraphsConfig{ + GlobalMiddleware: func(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(`{"data":{"singleUpload": true}}`)) + }) + }, + }, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 1) + files[0] = []byte("File content as text") + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file: Upload!){singleUpload(file: $file)}", + Variables: []byte(`{"file":null}`), + Files: files, + }) + require.JSONEq(t, `{"data":{"singleUpload": true}}`, res.Body) + }) +} + +func TestMultipleFilesUpload(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + Subgraphs: testenv.SubgraphsConfig{ + GlobalMiddleware: func(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(`{"data":{"multipleUpload": true}}`)) + }) + }, + }, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 2) + files[0] = []byte("File1 content as text") + files[1] = []byte("File2 content as text") + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file1: Upload!, $file2: Upload!){multipleUpload(files: [$file1, $file2])}", + Variables: []byte(`{"file1":null, "file2":null}`), + Files: files, + }) + require.JSONEq(t, `{"data":{"multipleUpload": true}}`, res.Body) + }) +} + func TestPlayground(t *testing.T) { t.Parallel() diff --git a/router-tests/testenv/testenv.go b/router-tests/testenv/testenv.go index 22eb3e4a9a..ad7f81a172 100644 --- a/router-tests/testenv/testenv.go +++ b/router-tests/testenv/testenv.go @@ -12,6 +12,7 @@ import ( "io" "log" "math/rand" + "mime/multipart" "net/http" "net/http/httptest" "net/url" @@ -807,6 +808,7 @@ type GraphQLRequest struct { Extensions json.RawMessage `json:"extensions,omitempty"` OperationName json.RawMessage `json:"operationName,omitempty"` Header http.Header `json:"-"` + Files [][]byte `json:"-"` } type TestResponse struct { @@ -840,7 +842,13 @@ func (e *Environment) WaitForServer(ctx context.Context, url string, timeoutMs i } func (e *Environment) MakeGraphQLRequestOK(request GraphQLRequest) *TestResponse { - resp, err := e.MakeGraphQLRequest(request) + var resp *TestResponse + var err error + if request.Files == nil { + resp, err = e.MakeGraphQLRequest(request) + } else { + resp, err = e.MakeGraphQLRequestAsMultipartForm(request) + } require.NoError(e.t, err) require.Equal(e.t, http.StatusOK, resp.Response.StatusCode) return resp @@ -875,6 +883,81 @@ func (e *Environment) MakeGraphQLRequest(request GraphQLRequest) (*TestResponse, }, nil } +func (e *Environment) MakeGraphQLRequestAsMultipartForm(request GraphQLRequest) (*TestResponse, error) { + data, err := json.Marshal(request) + require.NoError(e.t, err) + + formValues := map[string]io.Reader{ + "operations": bytes.NewReader(data), + "map": strings.NewReader(`{ "0": ["variables.file"] }`), + "0": bytes.NewReader(request.Files[0]), + } + multipartBody, contentType, err := multipartBytes(formValues) + if err != nil { + return nil, err + } + + req, err := http.NewRequestWithContext(e.Context, http.MethodPost, e.GraphQLRequestURL(), &multipartBody) + if err != nil { + return nil, err + } + + if request.Header != nil { + req.Header = request.Header + } + req.Header.Add("Content-Type", contentType) + + resp, err := e.RouterClient.Do(req) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(resp.Body) + if err != nil { + return nil, err + } + resp.Body = io.NopCloser(bytes.NewReader(buf.Bytes())) + body := buf.String() + + return &TestResponse{ + Body: strings.TrimSpace(body), + Response: resp, + Proto: resp.Proto, + }, nil +} + +func multipartBytes(values map[string]io.Reader) (bytes.Buffer, string, error) { + var err error + var b bytes.Buffer + w := multipart.NewWriter(&b) + for key, r := range values { + var fw io.Writer + if x, ok := r.(io.Closer); ok { + defer x.Close() + } + // Add a file + if x, ok := r.(*os.File); ok { + if fw, err = w.CreateFormFile(key, x.Name()); err != nil { + return b, "", err + } + } else { + // Add other fields + if fw, err = w.CreateFormField(key); err != nil { + return b, "", err + } + } + if _, err = io.Copy(fw, r); err != nil { + return b, "", err + } + + } + w.Close() + + return b, w.FormDataContentType(), nil +} + func (e *Environment) MakeRequest(method, path string, header http.Header, body io.Reader) (*http.Response, error) { requestURL, err := url.JoinPath(e.RouterURL, path) if err != nil { diff --git a/router/core/context.go b/router/core/context.go index 19b9e07cd5..215f81b4ab 100644 --- a/router/core/context.go +++ b/router/core/context.go @@ -2,6 +2,7 @@ package core import ( "context" + "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/datasource/httpclient" "net/http" "net/url" "sync" @@ -362,6 +363,7 @@ type operationContext struct { // Content is the content of the operation content string variables []byte + files []httpclient.File clientInfo *ClientInfo // preparedPlan is the prepared plan of the operation preparedPlan *planWithMetaData @@ -377,6 +379,10 @@ func (o *operationContext) Variables() []byte { return o.variables } +func (o *operationContext) Files() []httpclient.File { + return o.files +} + func (o *operationContext) Name() string { return o.name } diff --git a/router/core/graphql_handler.go b/router/core/graphql_handler.go index 677aa63d4b..736e097e42 100644 --- a/router/core/graphql_handler.go +++ b/router/core/graphql_handler.go @@ -148,6 +148,7 @@ func (h *GraphQLHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { ctx := &resolve.Context{ Variables: operationCtx.Variables(), + Files: operationCtx.Files(), Request: resolve.Request{ Header: r.Header, }, diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 1493c38e6a..2cfc256d5c 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -3,15 +3,17 @@ package core import ( "context" "crypto/ecdsa" - "errors" "fmt" "io" "net/http" + "os" "strconv" + "strings" "sync" "time" "github.com/golang-jwt/jwt/v5" + "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/datasource/httpclient" "github.com/wundergraph/graphql-go-tools/v2/pkg/graphqlerrors" "go.opentelemetry.io/otel/attribute" sdktrace "go.opentelemetry.io/otel/sdk/trace" @@ -23,6 +25,9 @@ import ( rtrace "github.com/wundergraph/cosmo/router/pkg/trace" "github.com/go-chi/chi/v5/middleware" + "github.com/mazrean/formstream" + httpform "github.com/mazrean/formstream/http" + "github.com/pkg/errors" "go.uber.org/zap" "github.com/wundergraph/cosmo/router/internal/pool" @@ -30,6 +35,10 @@ import ( "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/resolve" ) +const ( + MAX_SUPPORTED_FILES_UPLOAD = 10 +) + type PreHandlerOptions struct { Logger *zap.Logger Executor *Executor @@ -167,28 +176,83 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { metrics.Finish(finalErr, statusCode, writtenBytes) }() + var body []byte + var files []httpclient.File + var err error // XXX: This buffer needs to be returned to the pool only // AFTER we're done with body (retrieved from parser.ReadBody()) buf := pool.GetBytesBuffer() defer pool.PutBytesBuffer(buf) + if r.Header.Get("Content-Type") == "" || r.Header.Get("Content-Type") == "application/json" { + body, err = h.operationProcessor.ReadBody(buf, r.Body) + if err != nil { + finalErr = err - body, err := h.operationProcessor.ReadBody(buf, r.Body) - if err != nil { - finalErr = err + // This error is expected e.g. when the client defines (Content-Length) and aborts the request before + // It means that EOF was encountered in the middle of reading the body. This is not a server error. + if errors.Is(err, io.ErrUnexpectedEOF) { + requestLogger.Debug("unexpected EOF while reading request body", zap.Error(err)) + } else { + requestLogger.Error("failed to read request body", zap.Error(err)) + } - // This error is expected e.g. when the client defines (Content-Length) and aborts the request before - // It means that EOF was encountered in the middle of reading the body. This is not a server error. - if errors.Is(err, io.ErrUnexpectedEOF) { - requestLogger.Debug("unexpected EOF while reading request body", zap.Error(err)) - } else { - requestLogger.Error("failed to read request body", zap.Error(err)) + writeOperationError(r, w, requestLogger, err) + return + } + } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { + parser, err := httpform.NewParser(r) + if err != nil { + writeOperationError(r, w, requestLogger, err) + return + } + + err = parser.Register("operations", func(reader io.Reader, header formstream.Header) error { + body, err = h.operationProcessor.ReadBody(buf, reader) + if err != nil { + return err + } + return nil + }, formstream.WithRequiredPart("operations"), formstream.WithRequiredPart("map")) + if err != nil { + writeOperationError(r, w, requestLogger, err) + return + } + + // We will register a handler for each file in the request. AFAIK, we can't know how many files we have + // before parsing the request, so we will support 10 files max. + for i := 0; i < MAX_SUPPORTED_FILES_UPLOAD; i++ { + fileKey := fmt.Sprintf("%d", i) + err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { + // Create and open a temporary file to store the file content + // This file will be deleted after the request is done + file, err := os.CreateTemp("", "tempfile-") + if err != nil { + return err + } + defer file.Close() + _, err = io.Copy(file, reader) + if err != nil { + return err + } + files = append(files, httpclient.NewFile(file.Name(), header.FileName())) + + return nil + }, formstream.WithRequiredPart(fileKey)) + if err != nil { + writeOperationError(r, w, requestLogger, err) + return + } + } + + err = parser.Parse() + if err != nil { + writeOperationError(r, w, requestLogger, err) + return } - writeOperationError(r, w, requestLogger, err) - return } /** - * Parse the operation + * Parse the operation */ if !traceOptions.ExcludeParseStats { @@ -201,7 +265,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { trace.WithAttributes(attributes...), ) - operationKit, err := h.operationProcessor.NewKit(body) + operationKit, err := h.operationProcessor.NewKit(body, files) if err != nil { finalErr = err diff --git a/router/core/operation_planner.go b/router/core/operation_planner.go index 14cc43c4f4..9d58cfdc9f 100644 --- a/router/core/operation_planner.go +++ b/router/core/operation_planner.go @@ -97,6 +97,7 @@ func (p *OperationPlanner) Plan(operation *ParsedOperation, clientInfo *ClientIn hash: operation.ID, clientInfo: clientInfo, variables: operation.Variables, + files: operation.Files, traceOptions: traceOptions, extensions: operation.Extensions, persistedID: operation.PersistedID, diff --git a/router/core/operation_processor.go b/router/core/operation_processor.go index 7837eac8ea..028993b1af 100644 --- a/router/core/operation_processor.go +++ b/router/core/operation_processor.go @@ -19,6 +19,7 @@ import ( "github.com/wundergraph/graphql-go-tools/v2/pkg/astnormalization" "github.com/wundergraph/graphql-go-tools/v2/pkg/astparser" "github.com/wundergraph/graphql-go-tools/v2/pkg/astprinter" + "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/datasource/httpclient" "github.com/wundergraph/graphql-go-tools/v2/pkg/operationreport" "go.uber.org/zap" @@ -43,6 +44,8 @@ type ParsedOperation struct { Type string // Variables in the "variables" field value in the JSON payload Variables []byte + // Files is a list of files, an interface representing the file data needed to be passed forward. + Files []httpclient.File // NormalizedRepresentation is the normalized representation of the operation // as a string. This is provided for modules to be able to access the // operation. Only available after the operation has been normalized. @@ -101,6 +104,7 @@ type parseKit struct { // It must be created for each request and freed after the request is done. type OperationKit struct { data []byte + files []httpclient.File operationDefinitionRef int originalOperationNameRef ast.ByteSliceReference operationParser *OperationProcessor @@ -126,12 +130,13 @@ type GraphQLRequestExtensionsPersistedQuery struct { // NewOperationKit creates a new OperationKit. The kit is used to parse, normalize and validate operations. // It allocates resources that need to be freed by calling OperationKit.Free() -func NewOperationKit(parser *OperationProcessor, data []byte) *OperationKit { +func NewOperationKit(parser *OperationProcessor, data []byte, files []httpclient.File) *OperationKit { return &OperationKit{ operationParser: parser, kit: parser.getKit(), operationDefinitionRef: -1, data: data, + files: files, } } @@ -318,6 +323,7 @@ func (o *OperationKit) Parse(ctx context.Context, clientInfo *ClientInfo, log *z Type: operationType, Extensions: request.Extensions, Variables: variablesCopy, + Files: o.files, } if extensions.PersistedQuery != nil { @@ -445,15 +451,15 @@ func (p *OperationProcessor) NewKitFromReader(r io.Reader) (*OperationKit, error if err != nil { return nil, err } - return NewOperationKit(p, data), nil + return NewOperationKit(p, data, nil), nil } // NewKit creates a new OperationKit. The kit is used to parse, normalize and // validate operations. It also validates if the operation size is within the // limit. -func (p *OperationProcessor) NewKit(data []byte) (*OperationKit, error) { +func (p *OperationProcessor) NewKit(data []byte, files []httpclient.File) (*OperationKit, error) { if len(data) > int(p.maxOperationSizeInBytes) { return nil, p.entityTooLarge() } - return NewOperationKit(p, data), nil + return NewOperationKit(p, data, files), nil } diff --git a/router/core/websocket.go b/router/core/websocket.go index de16979c0b..31daead32b 100644 --- a/router/core/websocket.go +++ b/router/core/websocket.go @@ -663,7 +663,7 @@ func (h *WebSocketConnectionHandler) writeErrorMessage(operationID string, err e } func (h *WebSocketConnectionHandler) parseAndPlan(payload []byte) (*ParsedOperation, *operationContext, error) { - operationKit, err := h.operationProcessor.NewKit(payload) + operationKit, err := h.operationProcessor.NewKit(payload, nil) defer operationKit.Free() if err != nil { return nil, nil, err From a808605bd5a9c39081653f68da5724dabee4bbcf Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Thu, 23 May 2024 15:42:30 +0530 Subject: [PATCH 02/31] support multipart form in injector --- demo/pkg/injector/http.go | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/demo/pkg/injector/http.go b/demo/pkg/injector/http.go index 677ca009a6..59c8d4dcbc 100644 --- a/demo/pkg/injector/http.go +++ b/demo/pkg/injector/http.go @@ -5,6 +5,7 @@ import ( "encoding/json" "io" "net/http" + "strings" ) func HTTP(next http.Handler) http.Handler { @@ -18,12 +19,30 @@ func HTTPFunc(next http.HandlerFunc) http.HandlerFunc { if err != nil { panic(err) } + r.Body = io.NopCloser(bytes.NewReader(body)) + + contentType := r.Header.Get("Content-Type") + if len(body) > 0 { - payload := map[string]interface{}{} - if err := json.Unmarshal(body, &payload); err != nil { - panic(err) + if strings.Contains(contentType, "multipart/form-data") { + clone := r.Clone(r.Context()) + if err := clone.ParseMultipartForm(200 << 20); err != nil { + panic(err) + } + payload := make(map[string]interface{}) + for key, values := range clone.MultipartForm.Value { + if len(values) > 0 { + payload[key] = values[0] + } + } + r = r.WithContext(NewContextWithInitPayload(r.Context(), payload)) + } else { + payload := map[string]interface{}{} + if err := json.Unmarshal(body, &payload); err != nil { + panic(err) + } + r = r.WithContext(NewContextWithInitPayload(r.Context(), payload)) } - r = r.WithContext(NewContextWithInitPayload(r.Context(), payload)) } r.Body = io.NopCloser(bytes.NewReader(body)) next.ServeHTTP(w, r) From 7a2034a31c63d3dccbb7585ab43f0e74cfa5120e Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 29 May 2024 23:14:19 +0530 Subject: [PATCH 03/31] increase limits --- demo/pkg/injector/http.go | 2 +- demo/pkg/subgraphs/demo.go | 4 +++- router/core/graphql_prehandler.go | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/demo/pkg/injector/http.go b/demo/pkg/injector/http.go index 59c8d4dcbc..9f92b8dd76 100644 --- a/demo/pkg/injector/http.go +++ b/demo/pkg/injector/http.go @@ -26,7 +26,7 @@ func HTTPFunc(next http.HandlerFunc) http.HandlerFunc { if len(body) > 0 { if strings.Contains(contentType, "multipart/form-data") { clone := r.Clone(r.Context()) - if err := clone.ParseMultipartForm(200 << 20); err != nil { + if err := clone.ParseMultipartForm(1 << 30); err != nil { panic(err) } payload := make(map[string]interface{}) diff --git a/demo/pkg/subgraphs/demo.go b/demo/pkg/subgraphs/demo.go index 563b1568a3..86bbc3cff7 100644 --- a/demo/pkg/subgraphs/demo.go +++ b/demo/pkg/subgraphs/demo.go @@ -19,7 +19,9 @@ func NewDemoServer(schema graphql.ExecutableSchema) *handler.Server { srv.AddTransport(transport.Options{}) srv.AddTransport(transport.GET{}) srv.AddTransport(transport.POST{}) - srv.AddTransport(transport.MultipartForm{}) + srv.AddTransport(transport.MultipartForm{ + MaxUploadSize: 1 << 30, + }) srv.AddTransport(transport.Websocket{ KeepAlivePingInterval: 10 * time.Second, Upgrader: websocket.Upgrader{ diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 2cfc256d5c..c0273baff0 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -36,7 +36,7 @@ import ( ) const ( - MAX_SUPPORTED_FILES_UPLOAD = 10 + MaxSupportedFilesUpload = 10 ) type PreHandlerOptions struct { @@ -220,7 +220,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { // We will register a handler for each file in the request. AFAIK, we can't know how many files we have // before parsing the request, so we will support 10 files max. - for i := 0; i < MAX_SUPPORTED_FILES_UPLOAD; i++ { + for i := 0; i < MaxSupportedFilesUpload; i++ { fileKey := fmt.Sprintf("%d", i) err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { // Create and open a temporary file to store the file content From 6001cbc3400cc01991931e938a871bc809b33d80 Mon Sep 17 00:00:00 2001 From: pedraumcosta Date: Sun, 23 Jun 2024 18:52:25 -0300 Subject: [PATCH 04/31] Rebase on main --- demo/go.sum | 1 + .../employees/subgraph/generated/generated.go | 255 ++++++++++++++++++ go.work | 4 +- go.work.sum | 34 ++- router/go.mod | 20 +- router/go.sum | 13 + 6 files changed, 315 insertions(+), 12 deletions(-) diff --git a/demo/go.sum b/demo/go.sum index caaf67b0ac..ebe08db45d 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -160,6 +160,7 @@ github.com/wundergraph/cosmo/composition-go v0.0.0-20240124120900-5effe48a4a1d/g github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 h1:K9XWHeGZ2vPqtnt5Qs9xnHkzY8fNkqIAfg4hcwat/hQ= github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769/go.mod h1:U2XYwUmQwZGKCMbSR50/2j/cBiVJ76b0pKN51pFknLY= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/demo/pkg/subgraphs/employees/subgraph/generated/generated.go b/demo/pkg/subgraphs/employees/subgraph/generated/generated.go index fbdbe73ec7..f35d665987 100644 --- a/demo/pkg/subgraphs/employees/subgraph/generated/generated.go +++ b/demo/pkg/subgraphs/employees/subgraph/generated/generated.go @@ -129,6 +129,8 @@ type ComplexityRoot struct { } Mutation struct { + MultipleUpload func(childComplexity int, files []*graphql.Upload) int + SingleUpload func(childComplexity int, file graphql.Upload) int UpdateEmployeeTag func(childComplexity int, id int, tag string) int } @@ -193,6 +195,8 @@ type MarketerResolver interface { } type MutationResolver interface { UpdateEmployeeTag(ctx context.Context, id int, tag string) (*model.Employee, error) + SingleUpload(ctx context.Context, file graphql.Upload) (bool, error) + MultipleUpload(ctx context.Context, files []*graphql.Upload) (bool, error) } type OperatorResolver interface { Employees(ctx context.Context, obj *model.Operator) ([]*model.Employee, error) @@ -530,6 +534,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Marketer.Title(childComplexity), true + case "Mutation.multipleUpload": + if e.complexity.Mutation.MultipleUpload == nil { + break + } + + args, err := ec.field_Mutation_multipleUpload_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.MultipleUpload(childComplexity, args["files"].([]*graphql.Upload)), true + + case "Mutation.singleUpload": + if e.complexity.Mutation.SingleUpload == nil { + break + } + + args, err := ec.field_Mutation_singleUpload_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.SingleUpload(childComplexity, args["file"].(graphql.Upload)), true + case "Mutation.updateEmployeeTag": if e.complexity.Mutation.UpdateEmployeeTag == nil { break @@ -855,8 +883,13 @@ type Query { firstEmployee: Employee! @tag(name: "internal") } +scalar Upload + type Mutation { updateEmployeeTag(id: Int!, tag: String!): Employee + + singleUpload(file: Upload!): Boolean! + multipleUpload(files: [Upload!]!): Boolean! } type Subscription { @@ -1134,6 +1167,36 @@ func (ec *executionContext) field_Entity_findSDKByUpc_args(ctx context.Context, return args, nil } +func (ec *executionContext) field_Mutation_multipleUpload_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 []*graphql.Upload + if tmp, ok := rawArgs["files"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) + arg0, err = ec.unmarshalNUpload2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUploadᚄ(ctx, tmp) + if err != nil { + return nil, err + } + } + args["files"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_singleUpload_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 graphql.Upload + if tmp, ok := rawArgs["file"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("file")) + arg0, err = ec.unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, tmp) + if err != nil { + return nil, err + } + } + args["file"] = arg0 + return args, nil +} + func (ec *executionContext) field_Mutation_updateEmployeeTag_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -3396,6 +3459,116 @@ func (ec *executionContext) fieldContext_Mutation_updateEmployeeTag(ctx context. return fc, nil } +func (ec *executionContext) _Mutation_singleUpload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_singleUpload(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().SingleUpload(rctx, fc.Args["file"].(graphql.Upload)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_singleUpload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_singleUpload_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_multipleUpload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_multipleUpload(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().MultipleUpload(rctx, fc.Args["files"].([]*graphql.Upload)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_multipleUpload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_multipleUpload_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Operator_departments(ctx context.Context, field graphql.CollectedField, obj *model.Operator) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Operator_departments(ctx, field) if err != nil { @@ -7494,6 +7667,20 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_updateEmployeeTag(ctx, field) }) + case "singleUpload": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_singleUpload(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "multipleUpload": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_multipleUpload(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8829,6 +9016,74 @@ func (ec *executionContext) marshalNTime2ᚖgithubᚗcomᚋwundergraphᚋcosmo return ec._Time(ctx, sel, v) } +func (ec *executionContext) unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (graphql.Upload, error) { + res, err := graphql.UnmarshalUpload(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler { + res := graphql.MarshalUpload(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNUpload2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUploadᚄ(ctx context.Context, v interface{}) ([]*graphql.Upload, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*graphql.Upload, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNUpload2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUploadᚄ(ctx context.Context, sel ast.SelectionSet, v []*graphql.Upload) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (*graphql.Upload, error) { + res, err := graphql.UnmarshalUpload(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v *graphql.Upload) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + res := graphql.MarshalUpload(*v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) unmarshalN_Any2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { res, err := graphql.UnmarshalMap(v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/go.work b/go.work index d24617eb96..03b4817ebd 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,6 @@ -go 1.21.0 +go 1.21.5 -toolchain go1.21.8 +toolchain go1.22.0 use ( ./aws-lambda-router diff --git a/go.work.sum b/go.work.sum index 9fe5371618..9b1a070fb7 100644 --- a/go.work.sum +++ b/go.work.sum @@ -27,6 +27,10 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -39,6 +43,10 @@ github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 h1:F1EaeKL/ta07PY/k9Os/UFtwERei2/XzGemhpGnBKNg= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= @@ -113,6 +121,8 @@ github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-fonts/liberation v0.3.0 h1:3BI2iaE7R/s6uUUtzNCjo3QijJu3aS4wmrMgfSpYQ+8= github.com/go-fonts/liberation v0.3.0/go.mod h1:jdJ+cqF+F4SUL2V+qxBth8fvBpBDS7yloUL5Fi8GTGY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= @@ -123,6 +133,8 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198 h1:FSii2UQeSLngl3jFoR4tUKZLprO7qUlh/TKKticc0BM= @@ -164,10 +176,17 @@ github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0= +github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.0 h1:XzdxDbuQTz0RZZEmdU7cnQxUtFUzgCSPq8RCz4BxIi4= @@ -225,6 +244,8 @@ github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcM github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= github.com/paulmach/protoscan v0.2.1 h1:rM0FpcTjUMvPUNk2BhPJrreDKetq43ChnL+x1sRg8O8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -243,8 +264,13 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtse github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vektah/gqlparser/v2 v2.5.10/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= @@ -258,8 +284,6 @@ github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.44 h1:X4xrx6RwfdTL88Jwfclcz github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.44/go.mod h1:hNR2C7S1M+c9Ap24tHCEMe9gFY9K3smX46x5E1U1NQw= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.48 h1:181I6TqMBORu0JEb0ObISRjC7RxqK8r5jccgOAc22xo= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.48/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -290,6 +314,8 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= @@ -305,9 +331,11 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -327,7 +355,6 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= gonum.org/v1/plot v0.10.1 h1:dnifSs43YJuNMDzB7v8wV64O4ABBHReuAVAoBxqBqS4= gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= @@ -335,6 +362,7 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/router/go.mod b/router/go.mod index d8734e0a66..e1f7f75c8b 100644 --- a/router/go.mod +++ b/router/go.mod @@ -1,6 +1,8 @@ module github.com/wundergraph/cosmo/router -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 require ( connectrpc.com/connect v1.16.2 @@ -56,10 +58,10 @@ require ( go.uber.org/automaxprocs v1.5.3 go.uber.org/zap v1.26.0 go.withmatt.com/connect-brotli v0.4.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 golang.org/x/sys v0.20.0 google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -84,11 +86,12 @@ require ( github.com/jensneuse/byte-template v0.0.0-20200214152254-4f3cf06e5c68 // indirect github.com/kingledion/go-tools v0.6.0 // indirect github.com/klauspost/compress v1.17.8 // indirect - github.com/leodido/go-urn v1.2.4 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mazrean/formstream v1.1.1 // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect @@ -107,14 +110,17 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/twmb/franz-go/pkg/kmsg v1.7.0 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/mod v0.11.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.6.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect @@ -123,4 +129,4 @@ require ( nhooyr.io/websocket v1.8.7 // indirect ) -//replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 +replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 diff --git a/router/go.sum b/router/go.sum index 81f6269648..07e5cd1fed 100644 --- a/router/go.sum +++ b/router/go.sum @@ -163,6 +163,7 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -173,6 +174,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mazrean/formstream v1.1.1 h1:8CpESXh2jOxSrVRck5LvaLlliNM8k36vlreMB1Y2Gjw= +github.com/mazrean/formstream v1.1.1/go.mod h1:Rz8+Viu/83GqutUEwcbH/dbRM0oZlGMlULiz2QNpq9g= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -274,6 +277,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= @@ -317,6 +321,8 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -334,15 +340,19 @@ golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -368,6 +378,8 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= @@ -386,6 +398,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 5637f3ba50ccad0d53bcc74d35a093370fdddd17 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Mon, 24 Jun 2024 20:32:40 +0530 Subject: [PATCH 05/31] bump engine --- aws-lambda-router/go.mod | 17 ++++++----- aws-lambda-router/go.sum | 62 +++++++++++++++++++++------------------- demo/go.mod | 8 +++--- demo/go.sum | 16 +++++------ go.work.sum | 27 +++-------------- graphqlmetrics/go.mod | 8 +++--- graphqlmetrics/go.sum | 21 ++++++-------- router-tests/go.mod | 15 ++++++---- router-tests/go.sum | 58 +++++++++++++++++++------------------ router/go.mod | 13 ++++----- router/go.sum | 61 ++++++++++++++++++--------------------- 11 files changed, 142 insertions(+), 164 deletions(-) diff --git a/aws-lambda-router/go.mod b/aws-lambda-router/go.mod index b71749ab5c..c40c83a561 100644 --- a/aws-lambda-router/go.mod +++ b/aws-lambda-router/go.mod @@ -4,7 +4,7 @@ require ( github.com/akrylysov/algnhsa v1.1.0 github.com/aws/aws-lambda-go v1.43.0 github.com/stretchr/testify v1.9.0 - github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 + github.com/wundergraph/cosmo/router v0.0.0-20240624134714-33e6bc775276 go.uber.org/zap v1.26.0 ) @@ -24,11 +24,12 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-chi/chi/v5 v5.0.11 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-redis/redis_rate/v10 v10.0.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect @@ -82,7 +83,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/twmb/franz-go v1.16.1 // indirect github.com/twmb/franz-go/pkg/kmsg v1.7.0 // indirect - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 // indirect + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.23.0 // indirect @@ -103,18 +104,20 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.withmatt.com/connect-brotli v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/grpc v1.61.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect ) -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 diff --git a/aws-lambda-router/go.sum b/aws-lambda-router/go.sum index 0a65a50018..56b7a3c6cd 100644 --- a/aws-lambda-router/go.sum +++ b/aws-lambda-router/go.sum @@ -23,19 +23,21 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -57,8 +59,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -76,8 +78,8 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -152,8 +154,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -165,8 +167,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -191,8 +193,8 @@ github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -273,14 +275,14 @@ github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBD github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= -github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 h1:K9XWHeGZ2vPqtnt5Qs9xnHkzY8fNkqIAfg4hcwat/hQ= -github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769/go.mod h1:U2XYwUmQwZGKCMbSR50/2j/cBiVJ76b0pKN51pFknLY= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= +github.com/wundergraph/cosmo/router v0.0.0-20240624134714-33e6bc775276 h1:Q1WkMlTRyowjGfwfI6Gn2srQfn1O/yQDTVPKK0OdT3A= +github.com/wundergraph/cosmo/router v0.0.0-20240624134714-33e6bc775276/go.mod h1:oCPqwawvcv/0ofktNnqniDhnO4KrAGRyt+w4sMb5dz4= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 h1:YaS5Sk3m9D/sJMGg83a42HYb7cOMb9cKRAFjdSAIv9w= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= @@ -327,8 +329,8 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= @@ -339,11 +341,11 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -385,8 +387,8 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/demo/go.mod b/demo/go.mod index a25388cf24..7022f755a1 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -12,13 +12,13 @@ require ( github.com/vektah/gqlparser/v2 v2.5.11 github.com/wundergraph/cosmo/composition-go v0.0.0-20240124120900-5effe48a4a1d github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 go.opentelemetry.io/otel/sdk v1.24.0 go.uber.org/zap v1.26.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 ) require ( @@ -69,14 +69,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/grpc v1.61.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rogchap.com/v8go v0.9.0 // indirect ) diff --git a/demo/go.sum b/demo/go.sum index ebe08db45d..406c612933 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -159,8 +159,8 @@ github.com/wundergraph/cosmo/composition-go v0.0.0-20240124120900-5effe48a4a1d h github.com/wundergraph/cosmo/composition-go v0.0.0-20240124120900-5effe48a4a1d/go.mod h1:9I3gPMAlAY+m1/cFL20iN7XHTyuZd3VT5ijccdU/FsI= github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 h1:K9XWHeGZ2vPqtnt5Qs9xnHkzY8fNkqIAfg4hcwat/hQ= github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769/go.mod h1:U2XYwUmQwZGKCMbSR50/2j/cBiVJ76b0pKN51pFknLY= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 h1:YaS5Sk3m9D/sJMGg83a42HYb7cOMb9cKRAFjdSAIv9w= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -209,12 +209,12 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -260,8 +260,8 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/go.work.sum b/go.work.sum index 9b1a070fb7..2beca83a0b 100644 --- a/go.work.sum +++ b/go.work.sum @@ -27,15 +27,15 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= -github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= -github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= +github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/chzyer/logex v1.2.0 h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM= github.com/chzyer/readline v1.5.0 h1:lSwwFrbNviGePhkewF1az4oLmcwqCZijQ2/Wi3BGHAI= github.com/chzyer/test v0.0.0-20210722231415-061457976a23 h1:dZ0/VyGgQdVGAss6Ju0dt5P0QltE0SFY5Woh6hbIfiQ= @@ -43,10 +43,6 @@ github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 h1:F1EaeKL/ta07PY/k9Os/UFtwERei2/XzGemhpGnBKNg= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= -github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= -github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= @@ -121,8 +117,6 @@ github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= -github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-fonts/liberation v0.3.0 h1:3BI2iaE7R/s6uUUtzNCjo3QijJu3aS4wmrMgfSpYQ+8= github.com/go-fonts/liberation v0.3.0/go.mod h1:jdJ+cqF+F4SUL2V+qxBth8fvBpBDS7yloUL5Fi8GTGY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= @@ -133,8 +127,6 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= -github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198 h1:FSii2UQeSLngl3jFoR4tUKZLprO7qUlh/TKKticc0BM= @@ -176,8 +168,6 @@ github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= -github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= @@ -186,7 +176,6 @@ github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+k github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.0 h1:XzdxDbuQTz0RZZEmdU7cnQxUtFUzgCSPq8RCz4BxIi4= @@ -244,8 +233,6 @@ github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcM github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= github.com/paulmach/protoscan v0.2.1 h1:rM0FpcTjUMvPUNk2BhPJrreDKetq43ChnL+x1sRg8O8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -264,7 +251,6 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtse github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= -github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= @@ -314,8 +300,6 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= -golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= @@ -331,11 +315,9 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -362,7 +344,6 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/graphqlmetrics/go.mod b/graphqlmetrics/go.mod index 007e848e2d..b5d9760c92 100644 --- a/graphqlmetrics/go.mod +++ b/graphqlmetrics/go.mod @@ -8,7 +8,7 @@ require ( github.com/alitto/pond v1.8.3 github.com/amacneil/dbmate/v2 v2.12.0 github.com/avast/retry-go v3.0.0+incompatible - github.com/go-playground/validator/v10 v10.15.5 + github.com/go-playground/validator/v10 v10.20.0 github.com/golang-jwt/jwt/v5 v5.2.0 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/joho/godotenv v1.5.1 @@ -18,7 +18,7 @@ require ( go.uber.org/automaxprocs v1.5.3 go.uber.org/zap v1.26.0 go.withmatt.com/connect-brotli v0.4.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -32,7 +32,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.17.8 // indirect - github.com/leodido/go-urn v1.2.4 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/paulmach/orb v0.11.1 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -45,7 +45,7 @@ require ( go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/graphqlmetrics/go.sum b/graphqlmetrics/go.sum index da424ca276..12643960c9 100644 --- a/graphqlmetrics/go.sum +++ b/graphqlmetrics/go.sum @@ -27,8 +27,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -60,8 +60,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= @@ -87,12 +87,7 @@ github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -132,8 +127,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -163,8 +158,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/router-tests/go.mod b/router-tests/go.mod index c56fcad1ec..a1a29221cf 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -1,6 +1,8 @@ module github.com/wundergraph/cosmo/router-tests -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 require ( github.com/andybalholm/brotli v1.1.0 @@ -26,14 +28,14 @@ require ( github.com/twmb/franz-go/pkg/kadm v1.11.0 github.com/wundergraph/cosmo/demo v0.0.0-20240620122742-7fbe53fd8769 github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/sdk v1.24.0 go.opentelemetry.io/otel/sdk/metric v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -64,11 +66,12 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-chi/chi/v5 v5.0.11 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-redis/redis_rate/v10 v10.0.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect @@ -147,8 +150,8 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect diff --git a/router-tests/go.sum b/router-tests/go.sum index f8c3f80944..3d91a5ef45 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -39,19 +39,21 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -99,8 +101,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -118,8 +120,8 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -217,8 +219,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -230,8 +232,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= @@ -281,8 +283,8 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= @@ -376,8 +378,8 @@ github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBD github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= @@ -386,8 +388,8 @@ github.com/wundergraph/cosmo/demo v0.0.0-20240620122742-7fbe53fd8769 h1:EkVHyXxp github.com/wundergraph/cosmo/demo v0.0.0-20240620122742-7fbe53fd8769/go.mod h1:KdWzF7jPKvIVNUbXRWjWbDMICOq9pF17W+vUQX9Oe80= github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769 h1:K9XWHeGZ2vPqtnt5Qs9xnHkzY8fNkqIAfg4hcwat/hQ= github.com/wundergraph/cosmo/router v0.0.0-20240620122742-7fbe53fd8769/go.mod h1:U2XYwUmQwZGKCMbSR50/2j/cBiVJ76b0pKN51pFknLY= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 h1:YaS5Sk3m9D/sJMGg83a42HYb7cOMb9cKRAFjdSAIv9w= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -438,8 +440,8 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -460,13 +462,13 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -521,8 +523,8 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/router/go.mod b/router/go.mod index e1f7f75c8b..8d0788db89 100644 --- a/router/go.mod +++ b/router/go.mod @@ -39,7 +39,7 @@ require ( github.com/tidwall/gjson v1.17.0 github.com/tidwall/sjson v1.2.5 github.com/twmb/franz-go v1.16.1 - github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 + github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 // Do not upgrade, it renames attributes we rely on go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 go.opentelemetry.io/contrib/propagators/b3 v1.23.0 @@ -64,6 +64,8 @@ require ( google.golang.org/protobuf v1.34.1 ) +require github.com/mazrean/formstream v1.1.1 + require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect @@ -74,7 +76,6 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/golang/glog v1.1.2 // indirect @@ -86,12 +87,10 @@ require ( github.com/jensneuse/byte-template v0.0.0-20200214152254-4f3cf06e5c68 // indirect github.com/kingledion/go-tools v0.6.0 // indirect github.com/klauspost/compress v1.17.8 // indirect - github.com/leodido/go-urn v1.4.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mazrean/formstream v1.1.1 // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect @@ -108,19 +107,17 @@ require ( github.com/tidwall/pretty v1.2.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/twmb/franz-go/pkg/kmsg v1.7.0 // indirect - github.com/ugorji/go/codec v1.2.12 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/tools v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect diff --git a/router/go.sum b/router/go.sum index 07e5cd1fed..ceadb01ed1 100644 --- a/router/go.sum +++ b/router/go.sum @@ -19,19 +19,21 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -53,8 +55,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -72,8 +74,8 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -148,8 +150,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -161,8 +163,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= @@ -190,8 +191,8 @@ github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -249,7 +250,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -273,15 +273,13 @@ github.com/twmb/franz-go v1.16.1 h1:rpWc7fB9jd7TgmCyfxzenBI+QbgS8ZfJOUQE+tzPtbE= github.com/twmb/franz-go v1.16.1/go.mod h1:/pER254UPPGp/4WfGqRi+SIRGE50RSQzVubQp6+N4FA= github.com/twmb/franz-go/pkg/kmsg v1.7.0 h1:a457IbvezYfA5UkiBvyV3zj0Is3y1i8EJgqjJYoij2E= github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBDAd7pCje47OhSyw= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= @@ -332,26 +330,24 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -378,8 +374,8 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= @@ -396,8 +392,7 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= From a610b74419b400d2c221b4549676b7e897f43f55 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Mon, 24 Jun 2024 20:37:37 +0530 Subject: [PATCH 06/31] update go mod --- router/go.mod | 2 +- router/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/router/go.mod b/router/go.mod index 8d0788db89..cdd1137628 100644 --- a/router/go.mod +++ b/router/go.mod @@ -126,4 +126,4 @@ require ( nhooyr.io/websocket v1.8.7 // indirect ) -replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 +//replace github.com/wundergraph/graphql-go-tools/v2 => ../../graphql-go-tools/v2 diff --git a/router/go.sum b/router/go.sum index ceadb01ed1..634e7c13f7 100644 --- a/router/go.sum +++ b/router/go.sum @@ -280,6 +280,8 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50 h1:YaS5Sk3m9D/sJMGg83a42HYb7cOMb9cKRAFjdSAIv9w= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.50/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= From f2b51a9a1567b5c6880a1a7e20c14a0d3b1e9a14 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Mon, 24 Jun 2024 21:15:20 +0530 Subject: [PATCH 07/31] update config --- router-tests/testenv/testdata/config.json | 34 +++++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/router-tests/testenv/testdata/config.json b/router-tests/testenv/testdata/config.json index 8b3f0e27bf..0875357885 100644 --- a/router-tests/testenv/testdata/config.json +++ b/router-tests/testenv/testdata/config.json @@ -19,7 +19,9 @@ { "typeName": "Mutation", "fieldNames": [ - "updateEmployeeTag" + "updateEmployeeTag", + "singleUpload", + "multipleUpload" ] }, { @@ -186,10 +188,10 @@ }, "federation": { "enabled": true, - "serviceSdl": "directive @goField(\n forceResolver: Boolean\n name: String\n omittable: Boolean\n) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee! @tag(name: \"internal\")\n}\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n}\n\ntype Subscription {\n \"\"\"\n `currentTime` will return a stream of `Time` objects.\n \"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n operatorType: [OperationType!]!\n}\n\ntype Details {\n forename: String! @shareable\n location: Country!\n surname: String! @shareable\n pastLocations: [City!]!\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\n# Using a nested key field simply because it can showcase potential bug\n# vectors / Federation capabilities.\ntype Country @key(fields: \"key { name }\", resolvable: false) {\n key: CountryKey!\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype Employee implements Identifiable @key(fields: \"id\") {\n details: Details! @shareable\n id: Int!\n tag: String!\n role: RoleType!\n notes: String @shareable\n updatedAt: String!\n startDate: String! @requiresScopes(scopes: [[\"read:employee\", \"read:private\"], [\"read:all\"]])\n currentMood: Mood! @external\n derivedMood: Mood! @requires(fields: \"currentMood\")\n # From the `availability` service. Only defined for use in @requires\n isAvailable: Boolean! @external\n rootFieldThrowsError: String @goField(forceResolver: true)\n rootFieldErrorWrapper: ErrorWrapper @goField(forceResolver: true)\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String @goField(forceResolver: true)\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy @key(fields: \"upc\") {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean @requires(fields: \"lead { isAvailable }\")\n}\n\ntype Cosmo implements IProduct @key(fields: \"upc\") {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n}\n\ntype SDK implements IProduct @key(fields: \"upc\") {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n}\n" + "serviceSdl": "directive @goField(\n forceResolver: Boolean\n name: String\n omittable: Boolean\n) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee! @tag(name: \"internal\")\n}\n\nscalar Upload\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n\n singleUpload(file: Upload!): Boolean!\n multipleUpload(files: [Upload!]!): Boolean!\n}\n\ntype Subscription {\n \"\"\"\n `currentTime` will return a stream of `Time` objects.\n \"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]! @goField(forceResolver: true)\n operatorType: [OperationType!]!\n}\n\ntype Details {\n forename: String! @shareable\n location: Country!\n surname: String! @shareable\n pastLocations: [City!]!\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\n# Using a nested key field simply because it can showcase potential bug\n# vectors / Federation capabilities.\ntype Country @key(fields: \"key { name }\", resolvable: false) {\n key: CountryKey!\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype Employee implements Identifiable @key(fields: \"id\") {\n details: Details! @shareable\n id: Int!\n tag: String!\n role: RoleType!\n notes: String @shareable\n updatedAt: String!\n startDate: String! @requiresScopes(scopes: [[\"read:employee\", \"read:private\"], [\"read:all\"]])\n currentMood: Mood! @external\n derivedMood: Mood! @requires(fields: \"currentMood\")\n # From the `availability` service. Only defined for use in @requires\n isAvailable: Boolean! @external\n rootFieldThrowsError: String @goField(forceResolver: true)\n rootFieldErrorWrapper: ErrorWrapper @goField(forceResolver: true)\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String @goField(forceResolver: true)\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy @key(fields: \"upc\") {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean @requires(fields: \"lead { isAvailable }\")\n}\n\ntype Cosmo implements IProduct @key(fields: \"upc\") {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n}\n\ntype SDK implements IProduct @key(fields: \"upc\") {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n}\n" }, "upstreamSchema": { - "key": "76d6e1ee4b9e8c6ec3798af656cd9374d08f4ac9" + "key": "0ee50412fb2ec824b5fef19f3a81e0941ff54722" } }, "requestTimeoutSeconds": "10", @@ -1262,6 +1264,26 @@ } ] }, + { + "typeName": "Mutation", + "fieldName": "singleUpload", + "argumentsConfiguration": [ + { + "name": "file", + "sourceType": "FIELD_ARGUMENT" + } + ] + }, + { + "typeName": "Mutation", + "fieldName": "multipleUpload", + "argumentsConfiguration": [ + { + "name": "files", + "sourceType": "FIELD_ARGUMENT" + } + ] + }, { "typeName": "Mutation", "fieldName": "addFact", @@ -1666,9 +1688,9 @@ } } ], - "graphqlSchema": "directive @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\nscalar openfed__Scope\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee!\n findEmployees(criteria: SearchInput): [Employee!]!\n productTypes: [Products!]!\n topSecretFederationFacts: [TopSecretFact!]!\n factTypes: [TopSecretFactType!]\n\n \"\"\"Returns the value of the received HTTP header.\"\"\"\n headerValue(name: String!): String!\n\n \"\"\"Returns the value of the given key in the WS initial payload.\"\"\"\n initPayloadValue(key: String!): String!\n initialPayload: Map\n\n \"\"\"Returns response after the given delay\"\"\"\n delay(response: String!, ms: Int!): String!\n employeeFromEvent(id: Int!): Employee!\n employeeFromEventMyNats(employeeID: Int!): Employee!\n}\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n addFact(fact: TopSecretFactInput!): TopSecretFact!\n updateAvailability(employeeID: Int!, isAvailable: Boolean!): Employee!\n updateMood(employeeID: Int!, mood: Mood!): Employee!\n updateEmployeeMyKafka(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n updateEmployeeMyNats(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n}\n\ntype Subscription {\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n countHob(max: Int!, intervalMilliseconds: Int!): Int!\n\n \"\"\"Returns a stream with the value of the received HTTP header.\"\"\"\n headerValue(name: String!, repeat: Int): TimestampedString!\n\n \"\"\"\n Returns a stream with the value of value of the given key in the WS initial payload.\n \"\"\"\n initPayloadValue(key: String!, repeat: Int): TimestampedString!\n\n \"\"\"Returns a stream with the value of the WS initial payload.\"\"\"\n initialPayload(repeat: Int): Map\n returnsError: String\n employeeUpdated(employeeID: Int!): Employee!\n employeeUpdatedMyKafka(employeeID: Int!): Employee!\n employeeUpdatedMyNats(id: Int!): Employee!\n employeeUpdatedNatsStream(id: Int!): Employee!\n filteredEmployeeUpdated(id: Int!): Employee!\n filteredEmployeeUpdatedMyKafka(employeeID: ID!): Employee!\n filteredEmployeeUpdatedMyKafkaWithListFieldArguments(firstIds: [ID!]!, secondIds: [ID!]!): Employee!\n filteredEmployeeUpdatedMyKafkaWithNestedListFieldArgument(input: KafkaInput!): Employee!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Details {\n forename: String!\n location: Country!\n surname: String!\n pastLocations: [City!]!\n middlename: String @deprecated\n hasChildren: Boolean!\n maritalStatus: MaritalStatus\n nationality: Nationality!\n pets: [Pet]\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\ntype Country {\n key: CountryKey!\n language: String\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK | Documentation\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean\n name: ProductName!\n}\n\nenum Class {\n FISH\n MAMMAL\n REPTILE\n}\n\nenum Gender {\n FEMALE\n MALE\n UNKNOWN\n}\n\ninterface Animal {\n class: Class!\n gender: Gender!\n}\n\nenum CatType {\n HOME\n STREET\n}\n\nenum DogBreed {\n GOLDEN_RETRIEVER\n POODLE\n ROTTWEILER\n YORKSHIRE_TERRIER\n}\n\nenum MaritalStatus {\n ENGAGED\n MARRIED\n}\n\nenum Nationality {\n AMERICAN\n DUTCH\n ENGLISH\n GERMAN\n INDIAN\n SPANISH\n UKRAINIAN\n}\n\ninput SearchInput {\n hasPets: Boolean\n nationality: Nationality\n nested: NestedSearchInput\n}\n\ninput NestedSearchInput {\n maritalStatus: MaritalStatus\n hasChildren: Boolean\n}\n\nenum ExerciseType {\n CALISTHENICS\n HIKING\n SPORT\n STRENGTH_TRAINING\n}\n\ninterface Experience {\n yearsOfExperience: Float!\n}\n\nenum GameGenre {\n ADVENTURE\n BOARD\n FPS\n CARD\n RPG\n ROGUELITE\n SIMULATION\n STRATEGY\n}\n\nenum ProgrammingLanguage {\n CSHARP\n GO\n RUST\n TYPESCRIPT\n}\n\ninterface Hobby {\n employees: [Employee!]!\n}\n\ninput TopSecretFactInput {\n title: String!\n description: FactContent!\n factType: TopSecretFactType!\n}\n\nenum TopSecretFactType {\n DIRECTIVE\n ENTITY\n MISCELLANEOUS\n}\n\ninterface TopSecretFact {\n description: FactContent!\n factType: TopSecretFactType\n}\n\nscalar FactContent\n\nenum ProductName {\n CONSULTANCY\n COSMO\n ENGINE\n FINANCE\n HUMAN_RESOURCES\n MARKETING\n SDK\n}\n\ntype Documentation {\n url(product: ProductName!): String!\n urls(products: [ProductName!]!): [String!]!\n}\n\nscalar Map\n\ntype TimestampedString {\n \"\"\"The value of the string.\"\"\"\n value: String!\n\n \"\"\"The timestamp when the response was generated.\"\"\"\n unixTime: Int!\n\n \"\"\"Sequence number\"\"\"\n seq: Int!\n\n \"\"\"Total number of responses to be sent\"\"\"\n total: Int!\n initialPayload: Map\n}\n\ninput edfs__NatsStreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\nscalar openfed__SubscriptionFilterValue\n\ninput openfed__SubscriptionFieldCondition {\n fieldPath: String!\n values: [openfed__SubscriptionFilterValue]!\n}\n\ninput openfed__SubscriptionFilterCondition {\n AND: [openfed__SubscriptionFilterCondition!]\n IN: openfed__SubscriptionFieldCondition\n NOT: openfed__SubscriptionFilterCondition\n OR: [openfed__SubscriptionFilterCondition!]\n}\n\ninput UpdateEmployeeInput {\n name: String\n email: String\n}\n\ninput KafkaInput {\n ids: [Int!]!\n}\n\ntype edfs__PublishResult {\n success: Boolean!\n}\n\ninput edfs__StreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n operatorType: [OperationType!]!\n}\n\ntype Employee implements Identifiable {\n details: Details\n id: Int!\n tag: String!\n role: RoleType!\n notes: String\n updatedAt: String!\n startDate: String!\n currentMood: Mood!\n derivedMood: Mood!\n isAvailable: Boolean!\n rootFieldThrowsError: String\n rootFieldErrorWrapper: ErrorWrapper\n hobbies: [Hobby!]\n products: [ProductName!]!\n fieldThrowsError: String\n}\n\ntype Cosmo implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n name: ProductName!\n repositoryURL: String!\n}\n\ntype SDK implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n clientLanguages: [ProgrammingLanguage!]!\n}\n\ninterface Pet implements Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Alligator implements Pet & Animal {\n class: Class!\n dangerous: String!\n gender: Gender!\n name: String!\n}\n\ntype Cat implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n type: CatType!\n}\n\ntype Dog implements Pet & Animal {\n breed: DogBreed!\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Mouse implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Pony implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Exercise implements Hobby {\n employees: [Employee!]!\n category: ExerciseType!\n}\n\ntype Flying implements Experience & Hobby {\n employees: [Employee!]!\n planeModels: [String!]!\n yearsOfExperience: Float!\n}\n\ntype Gaming implements Experience & Hobby {\n employees: [Employee!]!\n genres: [GameGenre!]!\n name: String!\n yearsOfExperience: Float!\n}\n\ntype Other implements Hobby {\n employees: [Employee!]!\n name: String!\n}\n\ntype Programming implements Hobby {\n employees: [Employee!]!\n languages: [ProgrammingLanguage!]!\n}\n\ntype Travelling implements Hobby {\n employees: [Employee!]!\n countriesLived: [Country!]!\n}\n\ntype DirectiveFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype EntityFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype MiscellaneousFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}", + "graphqlSchema": "directive @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\nscalar openfed__Scope\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee!\n findEmployees(criteria: SearchInput): [Employee!]!\n productTypes: [Products!]!\n topSecretFederationFacts: [TopSecretFact!]!\n factTypes: [TopSecretFactType!]\n\n \"\"\"Returns the value of the received HTTP header.\"\"\"\n headerValue(name: String!): String!\n\n \"\"\"Returns the value of the given key in the WS initial payload.\"\"\"\n initPayloadValue(key: String!): String!\n initialPayload: Map\n\n \"\"\"Returns response after the given delay\"\"\"\n delay(response: String!, ms: Int!): String!\n employeeFromEvent(id: Int!): Employee!\n employeeFromEventMyNats(employeeID: Int!): Employee!\n}\n\nscalar Upload\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n singleUpload(file: Upload!): Boolean!\n multipleUpload(files: [Upload!]!): Boolean!\n addFact(fact: TopSecretFactInput!): TopSecretFact!\n updateAvailability(employeeID: Int!, isAvailable: Boolean!): Employee!\n updateMood(employeeID: Int!, mood: Mood!): Employee!\n updateEmployeeMyKafka(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n updateEmployeeMyNats(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n}\n\ntype Subscription {\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n countHob(max: Int!, intervalMilliseconds: Int!): Int!\n\n \"\"\"Returns a stream with the value of the received HTTP header.\"\"\"\n headerValue(name: String!, repeat: Int): TimestampedString!\n\n \"\"\"\n Returns a stream with the value of value of the given key in the WS initial payload.\n \"\"\"\n initPayloadValue(key: String!, repeat: Int): TimestampedString!\n\n \"\"\"Returns a stream with the value of the WS initial payload.\"\"\"\n initialPayload(repeat: Int): Map\n returnsError: String\n employeeUpdated(employeeID: Int!): Employee!\n employeeUpdatedMyKafka(employeeID: Int!): Employee!\n employeeUpdatedMyNats(id: Int!): Employee!\n employeeUpdatedNatsStream(id: Int!): Employee!\n filteredEmployeeUpdated(id: Int!): Employee!\n filteredEmployeeUpdatedMyKafka(employeeID: ID!): Employee!\n filteredEmployeeUpdatedMyKafkaWithListFieldArguments(firstIds: [ID!]!, secondIds: [ID!]!): Employee!\n filteredEmployeeUpdatedMyKafkaWithNestedListFieldArgument(input: KafkaInput!): Employee!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Details {\n forename: String!\n location: Country!\n surname: String!\n pastLocations: [City!]!\n middlename: String @deprecated\n hasChildren: Boolean!\n maritalStatus: MaritalStatus\n nationality: Nationality!\n pets: [Pet]\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\ntype Country {\n key: CountryKey!\n language: String\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK | Documentation\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean\n name: ProductName!\n}\n\nenum Class {\n FISH\n MAMMAL\n REPTILE\n}\n\nenum Gender {\n FEMALE\n MALE\n UNKNOWN\n}\n\ninterface Animal {\n class: Class!\n gender: Gender!\n}\n\nenum CatType {\n HOME\n STREET\n}\n\nenum DogBreed {\n GOLDEN_RETRIEVER\n POODLE\n ROTTWEILER\n YORKSHIRE_TERRIER\n}\n\nenum MaritalStatus {\n ENGAGED\n MARRIED\n}\n\nenum Nationality {\n AMERICAN\n DUTCH\n ENGLISH\n GERMAN\n INDIAN\n SPANISH\n UKRAINIAN\n}\n\ninput SearchInput {\n hasPets: Boolean\n nationality: Nationality\n nested: NestedSearchInput\n}\n\ninput NestedSearchInput {\n maritalStatus: MaritalStatus\n hasChildren: Boolean\n}\n\nenum ExerciseType {\n CALISTHENICS\n HIKING\n SPORT\n STRENGTH_TRAINING\n}\n\ninterface Experience {\n yearsOfExperience: Float!\n}\n\nenum GameGenre {\n ADVENTURE\n BOARD\n FPS\n CARD\n RPG\n ROGUELITE\n SIMULATION\n STRATEGY\n}\n\nenum ProgrammingLanguage {\n CSHARP\n GO\n RUST\n TYPESCRIPT\n}\n\ninterface Hobby {\n employees: [Employee!]!\n}\n\ninput TopSecretFactInput {\n title: String!\n description: FactContent!\n factType: TopSecretFactType!\n}\n\nenum TopSecretFactType {\n DIRECTIVE\n ENTITY\n MISCELLANEOUS\n}\n\ninterface TopSecretFact {\n description: FactContent!\n factType: TopSecretFactType\n}\n\nscalar FactContent\n\nenum ProductName {\n CONSULTANCY\n COSMO\n ENGINE\n FINANCE\n HUMAN_RESOURCES\n MARKETING\n SDK\n}\n\ntype Documentation {\n url(product: ProductName!): String!\n urls(products: [ProductName!]!): [String!]!\n}\n\nscalar Map\n\ntype TimestampedString {\n \"\"\"The value of the string.\"\"\"\n value: String!\n\n \"\"\"The timestamp when the response was generated.\"\"\"\n unixTime: Int!\n\n \"\"\"Sequence number\"\"\"\n seq: Int!\n\n \"\"\"Total number of responses to be sent\"\"\"\n total: Int!\n initialPayload: Map\n}\n\ninput edfs__NatsStreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\nscalar openfed__SubscriptionFilterValue\n\ninput openfed__SubscriptionFieldCondition {\n fieldPath: String!\n values: [openfed__SubscriptionFilterValue]!\n}\n\ninput openfed__SubscriptionFilterCondition {\n AND: [openfed__SubscriptionFilterCondition!]\n IN: openfed__SubscriptionFieldCondition\n NOT: openfed__SubscriptionFilterCondition\n OR: [openfed__SubscriptionFilterCondition!]\n}\n\ninput UpdateEmployeeInput {\n name: String\n email: String\n}\n\ninput KafkaInput {\n ids: [Int!]!\n}\n\ntype edfs__PublishResult {\n success: Boolean!\n}\n\ninput edfs__StreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n operatorType: [OperationType!]!\n}\n\ntype Employee implements Identifiable {\n details: Details\n id: Int!\n tag: String!\n role: RoleType!\n notes: String\n updatedAt: String!\n startDate: String!\n currentMood: Mood!\n derivedMood: Mood!\n isAvailable: Boolean!\n rootFieldThrowsError: String\n rootFieldErrorWrapper: ErrorWrapper\n hobbies: [Hobby!]\n products: [ProductName!]!\n fieldThrowsError: String\n}\n\ntype Cosmo implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n name: ProductName!\n repositoryURL: String!\n}\n\ntype SDK implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n clientLanguages: [ProgrammingLanguage!]!\n}\n\ninterface Pet implements Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Alligator implements Pet & Animal {\n class: Class!\n dangerous: String!\n gender: Gender!\n name: String!\n}\n\ntype Cat implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n type: CatType!\n}\n\ntype Dog implements Pet & Animal {\n breed: DogBreed!\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Mouse implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Pony implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Exercise implements Hobby {\n employees: [Employee!]!\n category: ExerciseType!\n}\n\ntype Flying implements Experience & Hobby {\n employees: [Employee!]!\n planeModels: [String!]!\n yearsOfExperience: Float!\n}\n\ntype Gaming implements Experience & Hobby {\n employees: [Employee!]!\n genres: [GameGenre!]!\n name: String!\n yearsOfExperience: Float!\n}\n\ntype Other implements Hobby {\n employees: [Employee!]!\n name: String!\n}\n\ntype Programming implements Hobby {\n employees: [Employee!]!\n languages: [ProgrammingLanguage!]!\n}\n\ntype Travelling implements Hobby {\n employees: [Employee!]!\n countriesLived: [Country!]!\n}\n\ntype DirectiveFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype EntityFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype MiscellaneousFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}", "stringStorage": { - "76d6e1ee4b9e8c6ec3798af656cd9374d08f4ac9": "schema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\ndirective @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @composeDirective(name: String!) repeatable on SCHEMA\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @goField(forceResolver: Boolean, name: String, omittable: Boolean) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @interfaceObject on OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @link(as: String, for: String, import: [String], url: String!) repeatable on SCHEMA\n\ndirective @override(from: String!) on FIELD_DEFINITION\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @shareable on FIELD_DEFINITION | OBJECT\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype City {\n country: Country\n name: String!\n type: String!\n}\n\ntype Consultancy @key(fields: \"upc\") {\n isLeadAvailable: Boolean @requires(fields: \"lead { isAvailable }\")\n lead: Employee!\n upc: ID!\n}\n\ntype Cosmo implements IProduct @key(fields: \"upc\") {\n engineers: [Employee!]!\n lead: Employee!\n upc: ID!\n}\n\ntype Country @key(fields: \"key { name }\", resolvable: false) {\n key: CountryKey!\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ntype Details {\n forename: String! @shareable\n location: Country!\n pastLocations: [City!]!\n surname: String! @shareable\n}\n\ntype Employee implements Identifiable @key(fields: \"id\") {\n currentMood: Mood! @external\n derivedMood: Mood! @requires(fields: \"currentMood\")\n details: Details! @shareable\n id: Int!\n isAvailable: Boolean! @external\n notes: String @shareable\n role: RoleType!\n rootFieldErrorWrapper: ErrorWrapper @goField(forceResolver: true)\n rootFieldThrowsError: String @goField(forceResolver: true)\n startDate: String! @requiresScopes(scopes: [[\"read:employee\", \"read:private\"], [\"read:all\"]])\n tag: String!\n updatedAt: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n engineerType: EngineerType!\n title: [String!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ntype ErrorWrapper {\n errorField: String @goField(forceResolver: true)\n okField: String\n}\n\ninterface IProduct {\n engineers: [Employee!]!\n upc: ID!\n}\n\ninterface Identifiable {\n id: Int!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n title: [String!]!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n operatorType: [OperationType!]!\n title: [String!]!\n}\n\nunion Products = Consultancy | Cosmo | SDK\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n firstEmployee: Employee! @tag(name: \"internal\")\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n}\n\ninterface RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n title: [String!]!\n}\n\ntype SDK implements IProduct @key(fields: \"upc\") {\n engineers: [Employee!]!\n owner: Employee!\n upc: ID!\n}\n\ntype Subscription {\n countEmp(intervalMilliseconds: Int!, max: Int!): Int!\n countEmp2(intervalMilliseconds: Int!, max: Int!): Int!\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n}\n\ntype Time {\n timeStamp: String!\n unixTime: Int!\n}\n\nscalar openfed__FieldSet\n\nscalar openfed__Scope", + "0ee50412fb2ec824b5fef19f3a81e0941ff54722": "schema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\ndirective @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @composeDirective(name: String!) repeatable on SCHEMA\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @goField(forceResolver: Boolean, name: String, omittable: Boolean) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @interfaceObject on OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @link(as: String, for: String, import: [String], url: String!) repeatable on SCHEMA\n\ndirective @override(from: String!) on FIELD_DEFINITION\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @shareable on FIELD_DEFINITION | OBJECT\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype City {\n country: Country\n name: String!\n type: String!\n}\n\ntype Consultancy @key(fields: \"upc\") {\n isLeadAvailable: Boolean @requires(fields: \"lead { isAvailable }\")\n lead: Employee!\n upc: ID!\n}\n\ntype Cosmo implements IProduct @key(fields: \"upc\") {\n engineers: [Employee!]!\n lead: Employee!\n upc: ID!\n}\n\ntype Country @key(fields: \"key { name }\", resolvable: false) {\n key: CountryKey!\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ntype Details {\n forename: String! @shareable\n location: Country!\n pastLocations: [City!]!\n surname: String! @shareable\n}\n\ntype Employee implements Identifiable @key(fields: \"id\") {\n currentMood: Mood! @external\n derivedMood: Mood! @requires(fields: \"currentMood\")\n details: Details! @shareable\n id: Int!\n isAvailable: Boolean! @external\n notes: String @shareable\n role: RoleType!\n rootFieldErrorWrapper: ErrorWrapper @goField(forceResolver: true)\n rootFieldThrowsError: String @goField(forceResolver: true)\n startDate: String! @requiresScopes(scopes: [[\"read:employee\", \"read:private\"], [\"read:all\"]])\n tag: String!\n updatedAt: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n engineerType: EngineerType!\n title: [String!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ntype ErrorWrapper {\n errorField: String @goField(forceResolver: true)\n okField: String\n}\n\ninterface IProduct {\n engineers: [Employee!]!\n upc: ID!\n}\n\ninterface Identifiable {\n id: Int!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n title: [String!]!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype Mutation {\n multipleUpload(files: [Upload!]!): Boolean!\n singleUpload(file: Upload!): Boolean!\n updateEmployeeTag(id: Int!, tag: String!): Employee\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n operatorType: [OperationType!]!\n title: [String!]!\n}\n\nunion Products = Consultancy | Cosmo | SDK\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n firstEmployee: Employee! @tag(name: \"internal\")\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n}\n\ninterface RoleType {\n departments: [Department!]!\n employees: [Employee!]! @goField(forceResolver: true)\n title: [String!]!\n}\n\ntype SDK implements IProduct @key(fields: \"upc\") {\n engineers: [Employee!]!\n owner: Employee!\n upc: ID!\n}\n\ntype Subscription {\n countEmp(intervalMilliseconds: Int!, max: Int!): Int!\n countEmp2(intervalMilliseconds: Int!, max: Int!): Int!\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n}\n\ntype Time {\n timeStamp: String!\n unixTime: Int!\n}\n\nscalar Upload\n\nscalar openfed__FieldSet\n\nscalar openfed__Scope", "a2004ce79c42883f0c26905f98b3b76f69fcbf1b": "schema {\n query: Query\n}\n\ndirective @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @composeDirective(name: String!) repeatable on SCHEMA\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @interfaceObject on OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @link(as: String, for: String, import: [String], url: String!) repeatable on SCHEMA\n\ndirective @override(from: String!) on FIELD_DEFINITION\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @shareable on FIELD_DEFINITION | OBJECT\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Alligator implements Animal & Pet {\n class: Class!\n dangerous: String!\n gender: Gender!\n name: String!\n}\n\ninterface Animal {\n class: Class!\n gender: Gender!\n}\n\ntype Cat implements Animal & Pet {\n class: Class!\n gender: Gender!\n name: String!\n type: CatType!\n}\n\nenum CatType {\n HOME\n STREET\n}\n\nenum Class {\n FISH\n MAMMAL\n REPTILE\n}\n\ntype Details {\n forename: String! @shareable\n hasChildren: Boolean!\n maritalStatus: MaritalStatus\n middlename: String @deprecated\n nationality: Nationality!\n pets: [Pet]\n surname: String! @shareable\n}\n\ntype Dog implements Animal & Pet {\n breed: DogBreed!\n class: Class!\n gender: Gender!\n name: String!\n}\n\nenum DogBreed {\n GOLDEN_RETRIEVER\n POODLE\n ROTTWEILER\n YORKSHIRE_TERRIER\n}\n\ntype Employee @key(fields: \"id\") {\n details: Details @shareable\n id: Int!\n}\n\nenum Gender {\n FEMALE\n MALE\n UNKNOWN\n}\n\nenum MaritalStatus {\n ENGAGED\n MARRIED\n}\n\ntype Mouse implements Animal & Pet {\n class: Class!\n gender: Gender!\n name: String!\n}\n\nenum Nationality {\n AMERICAN\n DUTCH\n ENGLISH\n GERMAN\n INDIAN\n SPANISH\n UKRAINIAN\n}\n\ninput NestedSearchInput {\n hasChildren: Boolean\n maritalStatus: MaritalStatus\n}\n\ninterface Pet implements Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Pony implements Animal & Pet {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Query {\n findEmployees(criteria: SearchInput): [Employee!]!\n}\n\ninput SearchInput {\n hasPets: Boolean\n nationality: Nationality\n nested: NestedSearchInput\n}\n\nscalar openfed__FieldSet\n\nscalar openfed__Scope", "724c06483343451f5ee86d42c6a9f9cb2610b97d": "schema {\n subscription: Subscription\n}\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @goField(forceResolver: Boolean, name: String, omittable: Boolean) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Country @key(fields: \"key { name }\", resolvable: false) {\n key: CountryKey!\n}\n\ntype CountryKey {\n name: String!\n}\n\ntype Employee @key(fields: \"id\") {\n hobbies: [Hobby!]\n id: Int!\n}\n\ntype Exercise implements Hobby {\n category: ExerciseType!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nenum ExerciseType {\n CALISTHENICS\n HIKING\n SPORT\n STRENGTH_TRAINING\n}\n\ninterface Experience {\n yearsOfExperience: Float!\n}\n\ntype Flying implements Experience & Hobby {\n employees: [Employee!]! @goField(forceResolver: true)\n planeModels: [String!]!\n yearsOfExperience: Float!\n}\n\nenum GameGenre {\n ADVENTURE\n BOARD\n CARD\n FPS\n ROGUELITE\n RPG\n SIMULATION\n STRATEGY\n}\n\ntype Gaming implements Experience & Hobby {\n employees: [Employee!]! @goField(forceResolver: true)\n genres: [GameGenre!]!\n name: String!\n yearsOfExperience: Float!\n}\n\ninterface Hobby {\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\ntype Other implements Hobby {\n employees: [Employee!]! @goField(forceResolver: true)\n name: String!\n}\n\ntype Programming implements Hobby {\n employees: [Employee!]! @goField(forceResolver: true)\n languages: [ProgrammingLanguage!]!\n}\n\nenum ProgrammingLanguage {\n CSHARP\n GO\n RUST\n TYPESCRIPT\n}\n\ntype SDK @key(fields: \"upc\") {\n clientLanguages: [ProgrammingLanguage!]!\n upc: ID!\n}\n\ntype Subscription {\n countHob(intervalMilliseconds: Int!, max: Int!): Int!\n}\n\ntype Travelling implements Hobby {\n countriesLived: [Country!]!\n employees: [Employee!]! @goField(forceResolver: true)\n}\n\nscalar openfed__FieldSet", "3137f2ca7ef4abe0c88c07c16256197ecb9f5673": "schema {\n query: Queries\n mutation: Mutation\n}\n\ndirective @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @composeDirective(name: String!) repeatable on SCHEMA\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ndirective @interfaceObject on OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @link(as: String, for: String, import: [String], url: String!) repeatable on SCHEMA\n\ndirective @override(from: String!) on FIELD_DEFINITION\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @shareable on FIELD_DEFINITION | OBJECT\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Consultancy @key(fields: \"upc\") {\n name: ProductName!\n upc: ID!\n}\n\ntype Cosmo @key(fields: \"upc\") {\n name: ProductName!\n repositoryURL: String!\n upc: ID!\n}\n\ntype DirectiveFact implements TopSecretFact {\n description: FactContent! @authenticated @requiresScopes(scopes: [[\"read:scalar\"], [\"read:all\"]])\n factType: TopSecretFactType @authenticated\n title: String! @authenticated\n}\n\ntype Documentation {\n url(product: ProductName!): String!\n urls(products: [ProductName!]!): [String!]!\n}\n\ntype Employee @key(fields: \"id\") {\n id: Int!\n notes: String\n products: [ProductName!]!\n}\n\ntype EntityFact implements TopSecretFact {\n description: FactContent! @authenticated @requiresScopes(scopes: [[\"read:entity\", \"read:scalar\"], [\"read:entity\", \"read:all\"]])\n factType: TopSecretFactType @authenticated @requiresScopes(scopes: [[\"read:entity\"]])\n title: String! @requiresScopes(scopes: [[\"read:entity\"]])\n}\n\nscalar FactContent\n\ntype MiscellaneousFact implements TopSecretFact {\n description: FactContent! @authenticated @requiresScopes(scopes: [[\"read:miscellaneous\", \"read:scalar\"], [\"read:miscellaneous\", \"read:all\"]])\n factType: TopSecretFactType @authenticated\n title: String!\n}\n\ntype Mutation {\n addFact(fact: TopSecretFactInput!): TopSecretFact! @requiresScopes(scopes: [[\"write:fact\"], [\"write:all\"]])\n}\n\nenum ProductName {\n CONSULTANCY\n COSMO\n ENGINE\n FINANCE\n HUMAN_RESOURCES\n MARKETING\n SDK\n}\n\nunion Products = Consultancy | Cosmo | Documentation\n\ntype Queries {\n factTypes: [TopSecretFactType!]\n productTypes: [Products!]!\n topSecretFederationFacts: [TopSecretFact!]!\n}\n\ninterface TopSecretFact {\n description: FactContent! @authenticated @requiresScopes(scopes: [[\"read:scalar\"], [\"read:all\"]])\n factType: TopSecretFactType @authenticated\n}\n\ninput TopSecretFactInput {\n description: FactContent!\n factType: TopSecretFactType!\n title: String!\n}\n\nenum TopSecretFactType {\n DIRECTIVE\n ENTITY\n MISCELLANEOUS\n}\n\nscalar openfed__FieldSet\n\nscalar openfed__Scope", @@ -1678,7 +1700,7 @@ "c22fbefe427c67589c258911d5697ff4ba708918": "directive @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Country @key(fields: \"key { name }\") {\n key: CountryKey!\n language: String\n}\n\ntype CountryKey {\n name: String!\n}\n\nscalar openfed__FieldSet", "8ccd3a7296285d688902685d1d984d7c2d98cbea": "schema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\ndirective @edfs__kafkaPublish(providerId: String! = \"default\", topic: String!) on FIELD_DEFINITION\n\ndirective @edfs__kafkaPublish(providerId: String! = \"default\", topics: [String!]!) on FIELD_DEFINITION\n\ndirective @edfs__natsPublish(providerId: String! = \"default\", subject: String!) on FIELD_DEFINITION\n\ndirective @edfs__natsRequest(providerId: String! = \"default\", subject: String!) on FIELD_DEFINITION\n\ndirective @edfs__natsSubscribe(providerId: String! = \"default\", streamConfiguration: edfs__NatsStreamConfiguration, subjects: [String!]!) on FIELD_DEFINITION\n\ndirective @extends on INTERFACE | OBJECT\n\ndirective @external on FIELD_DEFINITION | OBJECT\n\ndirective @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT\n\ndirective @openfed__subscriptionFilter(condition: openfed__SubscriptionFilterCondition!) on FIELD_DEFINITION\n\ndirective @provides(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @requires(fields: openfed__FieldSet!) on FIELD_DEFINITION\n\ndirective @tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION\n\ntype Employee @key(fields: \"id\", resolvable: false) {\n id: Int! @external\n}\n\ninput KafkaInput {\n ids: [Int!]!\n}\n\ntype Mutation {\n updateEmployeeMyKafka(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult! @edfs__kafkaPublish(topic: \"employeeUpdated\", providerId: \"my-kafka\")\n updateEmployeeMyNats(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult! @edfs__natsPublish(subject: \"employeeUpdatedMyNats.{{ args.employeeID }}\", providerId: \"my-nats\")\n}\n\ntype Query {\n employeeFromEvent(id: Int!): Employee! @edfs__natsRequest(subject: \"getEmployee.{{ args.id }}\")\n employeeFromEventMyNats(employeeID: Int!): Employee! @edfs__natsRequest(subject: \"getEmployeeMyNats.{{ args.employeeID }}\", providerId: \"my-nats\")\n}\n\ntype Subscription {\n employeeUpdated(employeeID: Int!): Employee! @edfs__natsSubscribe(subjects: [\"employeeUpdated.{{ args.employeeID }}\"])\n employeeUpdatedMyKafka(employeeID: Int!): Employee! @edfs__kafkaSubscribe(topics: [\"employeeUpdated\", \"employeeUpdatedTwo\"], providerId: \"my-kafka\")\n employeeUpdatedMyNats(id: Int!): Employee! @edfs__natsSubscribe(subjects: [\"employeeUpdatedMyNats.{{ args.id }}\", \"employeeUpdatedMyNatsTwo.{{ args.id }}\"], providerId: \"my-nats\")\n employeeUpdatedNatsStream(id: Int!): Employee! @edfs__natsSubscribe(subjects: [\"employeeUpdated.{{ args.id }}\"], streamConfiguration: {consumerName: \"consumerName\", streamName: \"streamName\"})\n filteredEmployeeUpdated(id: Int!): Employee! @edfs__natsSubscribe(subjects: [\"employeeUpdated.{{ args.id }}\"]) @openfed__subscriptionFilter(condition: {NOT: {IN: {fieldPath: \"id\", values: [2, 6, 9, 10, 12]}}})\n filteredEmployeeUpdatedMyKafka(employeeID: ID!): Employee! @edfs__kafkaSubscribe(topics: [\"employeeUpdated\", \"employeeUpdatedTwo\"], providerId: \"my-kafka\") @openfed__subscriptionFilter(condition: {IN: {fieldPath: \"id\", values: [1, 3, 4, 7, 11]}})\n filteredEmployeeUpdatedMyKafkaWithListFieldArguments(firstIds: [ID!]!, secondIds: [ID!]!): Employee! @edfs__kafkaSubscribe(topics: [\"employeeUpdated\", \"employeeUpdatedTwo\"], providerId: \"my-kafka\") @openfed__subscriptionFilter(condition: {IN: {fieldPath: \"id\", values: [\"{{ args.firstIds }}\", \"{{ args.secondIds }}\"]}})\n filteredEmployeeUpdatedMyKafkaWithNestedListFieldArgument(input: KafkaInput!): Employee! @edfs__kafkaSubscribe(topics: [\"employeeUpdated\", \"employeeUpdatedTwo\"], providerId: \"my-kafka\") @openfed__subscriptionFilter(condition: {OR: [{IN: {fieldPath: \"id\", values: [\"{{ args.input.ids }}\"]}}, {IN: {fieldPath: \"id\", values: [\"1\"]}}]})\n}\n\ninput UpdateEmployeeInput {\n email: String\n name: String\n}\n\ninput edfs__NatsStreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\ntype edfs__PublishResult {\n success: Boolean!\n}\n\ninput edfs__StreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\nscalar openfed__FieldSet\n\ninput openfed__SubscriptionFieldCondition {\n fieldPath: String!\n values: [openfed__SubscriptionFilterValue]!\n}\n\ninput openfed__SubscriptionFilterCondition {\n AND: [openfed__SubscriptionFilterCondition!]\n IN: openfed__SubscriptionFieldCondition\n NOT: openfed__SubscriptionFilterCondition\n OR: [openfed__SubscriptionFilterCondition!]\n}\n\nscalar openfed__SubscriptionFilterValue" }, - "graphqlClientSchema": "directive @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\nscalar openfed__Scope\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee!\n findEmployees(criteria: SearchInput): [Employee!]!\n productTypes: [Products!]!\n topSecretFederationFacts: [TopSecretFact!]!\n factTypes: [TopSecretFactType!]\n\n \"\"\"Returns the value of the received HTTP header.\"\"\"\n headerValue(name: String!): String!\n\n \"\"\"Returns the value of the given key in the WS initial payload.\"\"\"\n initPayloadValue(key: String!): String!\n initialPayload: Map\n\n \"\"\"Returns response after the given delay\"\"\"\n delay(response: String!, ms: Int!): String!\n employeeFromEvent(id: Int!): Employee!\n employeeFromEventMyNats(employeeID: Int!): Employee!\n}\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n addFact(fact: TopSecretFactInput!): TopSecretFact!\n updateAvailability(employeeID: Int!, isAvailable: Boolean!): Employee!\n updateMood(employeeID: Int!, mood: Mood!): Employee!\n updateEmployeeMyKafka(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n updateEmployeeMyNats(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n}\n\ntype Subscription {\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n countHob(max: Int!, intervalMilliseconds: Int!): Int!\n\n \"\"\"Returns a stream with the value of the received HTTP header.\"\"\"\n headerValue(name: String!, repeat: Int): TimestampedString!\n\n \"\"\"\n Returns a stream with the value of value of the given key in the WS initial payload.\n \"\"\"\n initPayloadValue(key: String!, repeat: Int): TimestampedString!\n\n \"\"\"Returns a stream with the value of the WS initial payload.\"\"\"\n initialPayload(repeat: Int): Map\n returnsError: String\n employeeUpdated(employeeID: Int!): Employee!\n employeeUpdatedMyKafka(employeeID: Int!): Employee!\n employeeUpdatedMyNats(id: Int!): Employee!\n employeeUpdatedNatsStream(id: Int!): Employee!\n filteredEmployeeUpdated(id: Int!): Employee!\n filteredEmployeeUpdatedMyKafka(employeeID: ID!): Employee!\n filteredEmployeeUpdatedMyKafkaWithListFieldArguments(firstIds: [ID!]!, secondIds: [ID!]!): Employee!\n filteredEmployeeUpdatedMyKafkaWithNestedListFieldArgument(input: KafkaInput!): Employee!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Details {\n forename: String!\n location: Country!\n surname: String!\n pastLocations: [City!]!\n middlename: String @deprecated\n hasChildren: Boolean!\n maritalStatus: MaritalStatus\n nationality: Nationality!\n pets: [Pet]\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\ntype Country {\n key: CountryKey!\n language: String\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK | Documentation\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean\n name: ProductName!\n}\n\nenum Class {\n FISH\n MAMMAL\n REPTILE\n}\n\nenum Gender {\n FEMALE\n MALE\n UNKNOWN\n}\n\ninterface Animal {\n class: Class!\n gender: Gender!\n}\n\nenum CatType {\n HOME\n STREET\n}\n\nenum DogBreed {\n GOLDEN_RETRIEVER\n POODLE\n ROTTWEILER\n YORKSHIRE_TERRIER\n}\n\nenum MaritalStatus {\n ENGAGED\n MARRIED\n}\n\nenum Nationality {\n AMERICAN\n DUTCH\n ENGLISH\n GERMAN\n INDIAN\n SPANISH\n UKRAINIAN\n}\n\ninput SearchInput {\n hasPets: Boolean\n nationality: Nationality\n nested: NestedSearchInput\n}\n\ninput NestedSearchInput {\n maritalStatus: MaritalStatus\n hasChildren: Boolean\n}\n\nenum ExerciseType {\n CALISTHENICS\n HIKING\n SPORT\n STRENGTH_TRAINING\n}\n\ninterface Experience {\n yearsOfExperience: Float!\n}\n\nenum GameGenre {\n ADVENTURE\n BOARD\n FPS\n CARD\n RPG\n ROGUELITE\n SIMULATION\n STRATEGY\n}\n\nenum ProgrammingLanguage {\n CSHARP\n GO\n RUST\n TYPESCRIPT\n}\n\ninterface Hobby {\n employees: [Employee!]!\n}\n\ninput TopSecretFactInput {\n title: String!\n description: FactContent!\n factType: TopSecretFactType!\n}\n\nenum TopSecretFactType {\n DIRECTIVE\n ENTITY\n MISCELLANEOUS\n}\n\ninterface TopSecretFact {\n description: FactContent!\n factType: TopSecretFactType\n}\n\nscalar FactContent\n\nenum ProductName {\n CONSULTANCY\n COSMO\n ENGINE\n FINANCE\n HUMAN_RESOURCES\n MARKETING\n SDK\n}\n\ntype Documentation {\n url(product: ProductName!): String!\n urls(products: [ProductName!]!): [String!]!\n}\n\nscalar Map\n\ntype TimestampedString {\n \"\"\"The value of the string.\"\"\"\n value: String!\n\n \"\"\"The timestamp when the response was generated.\"\"\"\n unixTime: Int!\n\n \"\"\"Sequence number\"\"\"\n seq: Int!\n\n \"\"\"Total number of responses to be sent\"\"\"\n total: Int!\n initialPayload: Map\n}\n\ninput edfs__NatsStreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\nscalar openfed__SubscriptionFilterValue\n\ninput openfed__SubscriptionFieldCondition {\n fieldPath: String!\n values: [openfed__SubscriptionFilterValue]!\n}\n\ninput openfed__SubscriptionFilterCondition {\n AND: [openfed__SubscriptionFilterCondition!]\n IN: openfed__SubscriptionFieldCondition\n NOT: openfed__SubscriptionFilterCondition\n OR: [openfed__SubscriptionFilterCondition!]\n}\n\ninput UpdateEmployeeInput {\n name: String\n email: String\n}\n\ninput KafkaInput {\n ids: [Int!]!\n}\n\ntype edfs__PublishResult {\n success: Boolean!\n}\n\ninput edfs__StreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n operatorType: [OperationType!]!\n}\n\ntype Employee implements Identifiable {\n details: Details\n id: Int!\n tag: String!\n role: RoleType!\n notes: String\n updatedAt: String!\n startDate: String!\n currentMood: Mood!\n derivedMood: Mood!\n isAvailable: Boolean!\n rootFieldThrowsError: String\n rootFieldErrorWrapper: ErrorWrapper\n hobbies: [Hobby!]\n products: [ProductName!]!\n fieldThrowsError: String\n}\n\ntype Cosmo implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n name: ProductName!\n repositoryURL: String!\n}\n\ntype SDK implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n clientLanguages: [ProgrammingLanguage!]!\n}\n\ninterface Pet implements Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Alligator implements Pet & Animal {\n class: Class!\n dangerous: String!\n gender: Gender!\n name: String!\n}\n\ntype Cat implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n type: CatType!\n}\n\ntype Dog implements Pet & Animal {\n breed: DogBreed!\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Mouse implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Pony implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Exercise implements Hobby {\n employees: [Employee!]!\n category: ExerciseType!\n}\n\ntype Flying implements Experience & Hobby {\n employees: [Employee!]!\n planeModels: [String!]!\n yearsOfExperience: Float!\n}\n\ntype Gaming implements Experience & Hobby {\n employees: [Employee!]!\n genres: [GameGenre!]!\n name: String!\n yearsOfExperience: Float!\n}\n\ntype Other implements Hobby {\n employees: [Employee!]!\n name: String!\n}\n\ntype Programming implements Hobby {\n employees: [Employee!]!\n languages: [ProgrammingLanguage!]!\n}\n\ntype Travelling implements Hobby {\n employees: [Employee!]!\n countriesLived: [Country!]!\n}\n\ntype DirectiveFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype EntityFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype MiscellaneousFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}" + "graphqlClientSchema": "directive @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\ndirective @requiresScopes(scopes: [[openfed__Scope!]!]!) on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR\n\nscalar openfed__Scope\n\ntype Query {\n employee(id: Int!): Employee\n employeeAsList(id: Int!): [Employee]\n employees: [Employee]\n products: [Products!]!\n teammates(team: Department!): [Employee!]!\n firstEmployee: Employee!\n findEmployees(criteria: SearchInput): [Employee!]!\n productTypes: [Products!]!\n topSecretFederationFacts: [TopSecretFact!]!\n factTypes: [TopSecretFactType!]\n\n \"\"\"Returns the value of the received HTTP header.\"\"\"\n headerValue(name: String!): String!\n\n \"\"\"Returns the value of the given key in the WS initial payload.\"\"\"\n initPayloadValue(key: String!): String!\n initialPayload: Map\n\n \"\"\"Returns response after the given delay\"\"\"\n delay(response: String!, ms: Int!): String!\n employeeFromEvent(id: Int!): Employee!\n employeeFromEventMyNats(employeeID: Int!): Employee!\n}\n\nscalar Upload\n\ntype Mutation {\n updateEmployeeTag(id: Int!, tag: String!): Employee\n singleUpload(file: Upload!): Boolean!\n multipleUpload(files: [Upload!]!): Boolean!\n addFact(fact: TopSecretFactInput!): TopSecretFact!\n updateAvailability(employeeID: Int!, isAvailable: Boolean!): Employee!\n updateMood(employeeID: Int!, mood: Mood!): Employee!\n updateEmployeeMyKafka(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n updateEmployeeMyNats(employeeID: Int!, update: UpdateEmployeeInput!): edfs__PublishResult!\n}\n\ntype Subscription {\n \"\"\"`currentTime` will return a stream of `Time` objects.\"\"\"\n currentTime: Time!\n countEmp(max: Int!, intervalMilliseconds: Int!): Int!\n countEmp2(max: Int!, intervalMilliseconds: Int!): Int!\n countHob(max: Int!, intervalMilliseconds: Int!): Int!\n\n \"\"\"Returns a stream with the value of the received HTTP header.\"\"\"\n headerValue(name: String!, repeat: Int): TimestampedString!\n\n \"\"\"\n Returns a stream with the value of value of the given key in the WS initial payload.\n \"\"\"\n initPayloadValue(key: String!, repeat: Int): TimestampedString!\n\n \"\"\"Returns a stream with the value of the WS initial payload.\"\"\"\n initialPayload(repeat: Int): Map\n returnsError: String\n employeeUpdated(employeeID: Int!): Employee!\n employeeUpdatedMyKafka(employeeID: Int!): Employee!\n employeeUpdatedMyNats(id: Int!): Employee!\n employeeUpdatedNatsStream(id: Int!): Employee!\n filteredEmployeeUpdated(id: Int!): Employee!\n filteredEmployeeUpdatedMyKafka(employeeID: ID!): Employee!\n filteredEmployeeUpdatedMyKafkaWithListFieldArguments(firstIds: [ID!]!, secondIds: [ID!]!): Employee!\n filteredEmployeeUpdatedMyKafkaWithNestedListFieldArgument(input: KafkaInput!): Employee!\n}\n\nenum Department {\n ENGINEERING\n MARKETING\n OPERATIONS\n}\n\ninterface RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\nenum EngineerType {\n BACKEND\n FRONTEND\n FULLSTACK\n}\n\ninterface Identifiable {\n id: Int!\n}\n\nenum OperationType {\n FINANCE\n HUMAN_RESOURCES\n}\n\ntype Details {\n forename: String!\n location: Country!\n surname: String!\n pastLocations: [City!]!\n middlename: String @deprecated\n hasChildren: Boolean!\n maritalStatus: MaritalStatus\n nationality: Nationality!\n pets: [Pet]\n}\n\ntype City {\n type: String!\n name: String!\n country: Country\n}\n\ntype Country {\n key: CountryKey!\n language: String\n}\n\ntype CountryKey {\n name: String!\n}\n\nenum Mood {\n HAPPY\n SAD\n}\n\ntype ErrorWrapper {\n okField: String\n errorField: String\n}\n\ntype Time {\n unixTime: Int!\n timeStamp: String!\n}\n\nunion Products = Consultancy | Cosmo | SDK | Documentation\n\ninterface IProduct {\n upc: ID!\n engineers: [Employee!]!\n}\n\ntype Consultancy {\n upc: ID!\n lead: Employee!\n isLeadAvailable: Boolean\n name: ProductName!\n}\n\nenum Class {\n FISH\n MAMMAL\n REPTILE\n}\n\nenum Gender {\n FEMALE\n MALE\n UNKNOWN\n}\n\ninterface Animal {\n class: Class!\n gender: Gender!\n}\n\nenum CatType {\n HOME\n STREET\n}\n\nenum DogBreed {\n GOLDEN_RETRIEVER\n POODLE\n ROTTWEILER\n YORKSHIRE_TERRIER\n}\n\nenum MaritalStatus {\n ENGAGED\n MARRIED\n}\n\nenum Nationality {\n AMERICAN\n DUTCH\n ENGLISH\n GERMAN\n INDIAN\n SPANISH\n UKRAINIAN\n}\n\ninput SearchInput {\n hasPets: Boolean\n nationality: Nationality\n nested: NestedSearchInput\n}\n\ninput NestedSearchInput {\n maritalStatus: MaritalStatus\n hasChildren: Boolean\n}\n\nenum ExerciseType {\n CALISTHENICS\n HIKING\n SPORT\n STRENGTH_TRAINING\n}\n\ninterface Experience {\n yearsOfExperience: Float!\n}\n\nenum GameGenre {\n ADVENTURE\n BOARD\n FPS\n CARD\n RPG\n ROGUELITE\n SIMULATION\n STRATEGY\n}\n\nenum ProgrammingLanguage {\n CSHARP\n GO\n RUST\n TYPESCRIPT\n}\n\ninterface Hobby {\n employees: [Employee!]!\n}\n\ninput TopSecretFactInput {\n title: String!\n description: FactContent!\n factType: TopSecretFactType!\n}\n\nenum TopSecretFactType {\n DIRECTIVE\n ENTITY\n MISCELLANEOUS\n}\n\ninterface TopSecretFact {\n description: FactContent!\n factType: TopSecretFactType\n}\n\nscalar FactContent\n\nenum ProductName {\n CONSULTANCY\n COSMO\n ENGINE\n FINANCE\n HUMAN_RESOURCES\n MARKETING\n SDK\n}\n\ntype Documentation {\n url(product: ProductName!): String!\n urls(products: [ProductName!]!): [String!]!\n}\n\nscalar Map\n\ntype TimestampedString {\n \"\"\"The value of the string.\"\"\"\n value: String!\n\n \"\"\"The timestamp when the response was generated.\"\"\"\n unixTime: Int!\n\n \"\"\"Sequence number\"\"\"\n seq: Int!\n\n \"\"\"Total number of responses to be sent\"\"\"\n total: Int!\n initialPayload: Map\n}\n\ninput edfs__NatsStreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\nscalar openfed__SubscriptionFilterValue\n\ninput openfed__SubscriptionFieldCondition {\n fieldPath: String!\n values: [openfed__SubscriptionFilterValue]!\n}\n\ninput openfed__SubscriptionFilterCondition {\n AND: [openfed__SubscriptionFilterCondition!]\n IN: openfed__SubscriptionFieldCondition\n NOT: openfed__SubscriptionFilterCondition\n OR: [openfed__SubscriptionFilterCondition!]\n}\n\ninput UpdateEmployeeInput {\n name: String\n email: String\n}\n\ninput KafkaInput {\n ids: [Int!]!\n}\n\ntype edfs__PublishResult {\n success: Boolean!\n}\n\ninput edfs__StreamConfiguration {\n consumerName: String!\n streamName: String!\n}\n\ntype Engineer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n engineerType: EngineerType!\n}\n\ntype Marketer implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n}\n\ntype Operator implements RoleType {\n departments: [Department!]!\n title: [String!]!\n employees: [Employee!]!\n operatorType: [OperationType!]!\n}\n\ntype Employee implements Identifiable {\n details: Details\n id: Int!\n tag: String!\n role: RoleType!\n notes: String\n updatedAt: String!\n startDate: String!\n currentMood: Mood!\n derivedMood: Mood!\n isAvailable: Boolean!\n rootFieldThrowsError: String\n rootFieldErrorWrapper: ErrorWrapper\n hobbies: [Hobby!]\n products: [ProductName!]!\n fieldThrowsError: String\n}\n\ntype Cosmo implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n lead: Employee!\n name: ProductName!\n repositoryURL: String!\n}\n\ntype SDK implements IProduct {\n upc: ID!\n engineers: [Employee!]!\n owner: Employee!\n clientLanguages: [ProgrammingLanguage!]!\n}\n\ninterface Pet implements Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Alligator implements Pet & Animal {\n class: Class!\n dangerous: String!\n gender: Gender!\n name: String!\n}\n\ntype Cat implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n type: CatType!\n}\n\ntype Dog implements Pet & Animal {\n breed: DogBreed!\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Mouse implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Pony implements Pet & Animal {\n class: Class!\n gender: Gender!\n name: String!\n}\n\ntype Exercise implements Hobby {\n employees: [Employee!]!\n category: ExerciseType!\n}\n\ntype Flying implements Experience & Hobby {\n employees: [Employee!]!\n planeModels: [String!]!\n yearsOfExperience: Float!\n}\n\ntype Gaming implements Experience & Hobby {\n employees: [Employee!]!\n genres: [GameGenre!]!\n name: String!\n yearsOfExperience: Float!\n}\n\ntype Other implements Hobby {\n employees: [Employee!]!\n name: String!\n}\n\ntype Programming implements Hobby {\n employees: [Employee!]!\n languages: [ProgrammingLanguage!]!\n}\n\ntype Travelling implements Hobby {\n employees: [Employee!]!\n countriesLived: [Country!]!\n}\n\ntype DirectiveFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype EntityFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}\n\ntype MiscellaneousFact implements TopSecretFact {\n title: String!\n description: FactContent!\n factType: TopSecretFactType\n}" }, "subgraphs": [ { From 0cb31516da19b7edd66bd083144acf2939577ac7 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Mon, 24 Jun 2024 21:17:15 +0530 Subject: [PATCH 08/31] sync --- aws-lambda-router/go.mod | 6 +++--- aws-lambda-router/go.sum | 12 ++++-------- demo/go.mod | 4 ++-- demo/go.sum | 6 ++---- router-tests/go.mod | 6 +++--- router-tests/go.sum | 12 ++++-------- router/go.mod | 7 +++---- router/go.sum | 13 ++++--------- 8 files changed, 25 insertions(+), 41 deletions(-) diff --git a/aws-lambda-router/go.mod b/aws-lambda-router/go.mod index 1edc1e4828..52004ba57c 100644 --- a/aws-lambda-router/go.mod +++ b/aws-lambda-router/go.mod @@ -28,7 +28,7 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-redis/redis_rate/v10 v10.0.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect @@ -103,7 +103,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.withmatt.com/connect-brotli v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect @@ -111,7 +111,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/grpc v1.61.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect diff --git a/aws-lambda-router/go.sum b/aws-lambda-router/go.sum index 3c4518f581..1ad2695d23 100644 --- a/aws-lambda-router/go.sum +++ b/aws-lambda-router/go.sum @@ -76,8 +76,7 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -165,8 +164,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -339,8 +337,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -385,8 +382,7 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/demo/go.mod b/demo/go.mod index 8733157743..ba15d8d239 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -69,14 +69,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/grpc v1.61.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rogchap.com/v8go v0.9.0 // indirect ) diff --git a/demo/go.sum b/demo/go.sum index fd9ff6adbe..eaadc8d355 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -208,8 +208,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= @@ -259,8 +258,7 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/router-tests/go.mod b/router-tests/go.mod index 1ec6925c91..f47eb71b73 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -33,7 +33,7 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -68,7 +68,7 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-redis/redis_rate/v10 v10.0.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect @@ -147,7 +147,7 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect diff --git a/router-tests/go.sum b/router-tests/go.sum index 4b71622644..e80c66aa93 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -118,8 +118,7 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -230,8 +229,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= @@ -460,8 +458,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -521,8 +518,7 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/router/go.mod b/router/go.mod index 485542fe35..0d98a39fe3 100644 --- a/router/go.mod +++ b/router/go.mod @@ -59,7 +59,7 @@ require ( golang.org/x/sync v0.6.0 golang.org/x/sys v0.20.0 google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -72,7 +72,7 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/golang/glog v1.1.2 // indirect @@ -84,7 +84,6 @@ require ( github.com/jensneuse/byte-template v0.0.0-20200214152254-4f3cf06e5c68 // indirect github.com/kingledion/go-tools v0.6.0 // indirect github.com/klauspost/compress v1.17.8 // indirect - github.com/leodido/go-urn v1.2.4 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -113,7 +112,7 @@ require ( go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect diff --git a/router/go.sum b/router/go.sum index 26ba23f0bc..1ca0062f8d 100644 --- a/router/go.sum +++ b/router/go.sum @@ -72,8 +72,7 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= -github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -161,8 +160,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -246,7 +244,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -338,8 +335,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -384,8 +380,7 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 79e318043fdb37c1bfccb5bbd352f7da8ad586f1 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Mon, 24 Jun 2024 21:19:40 +0530 Subject: [PATCH 09/31] sync --- aws-lambda-router/go.mod | 7 ++++-- aws-lambda-router/go.sum | 28 ++++++++--------------- demo/go.mod | 2 +- demo/go.sum | 3 +-- router-tests/go.mod | 7 ++++-- router-tests/go.sum | 28 ++++++++--------------- router/go.mod | 14 ++++++++---- router/go.sum | 49 +++++++++++++++++++++++++--------------- 8 files changed, 72 insertions(+), 66 deletions(-) diff --git a/aws-lambda-router/go.mod b/aws-lambda-router/go.mod index 52004ba57c..0e26643958 100644 --- a/aws-lambda-router/go.mod +++ b/aws-lambda-router/go.mod @@ -24,6 +24,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-chi/chi/v5 v5.0.11 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -104,7 +105,7 @@ require ( go.withmatt.com/connect-brotli v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -117,4 +118,6 @@ require ( nhooyr.io/websocket v1.8.7 // indirect ) -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 diff --git a/aws-lambda-router/go.sum b/aws-lambda-router/go.sum index 1ad2695d23..dce71476b1 100644 --- a/aws-lambda-router/go.sum +++ b/aws-lambda-router/go.sum @@ -23,19 +23,17 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -57,8 +55,7 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -151,8 +148,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -189,8 +185,7 @@ github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -271,8 +266,7 @@ github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBD github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/wundergraph/cosmo/router v0.0.0-20240624134714-33e6bc775276 h1:Q1WkMlTRyowjGfwfI6Gn2srQfn1O/yQDTVPKK0OdT3A= @@ -325,8 +319,7 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= @@ -339,8 +332,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/demo/go.mod b/demo/go.mod index ba15d8d239..e35867fdfd 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -18,7 +18,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 go.opentelemetry.io/otel/sdk v1.24.0 go.uber.org/zap v1.26.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 ) require ( diff --git a/demo/go.sum b/demo/go.sum index eaadc8d355..7af4dfcac5 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -211,8 +211,7 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/router-tests/go.mod b/router-tests/go.mod index f47eb71b73..56761d806d 100644 --- a/router-tests/go.mod +++ b/router-tests/go.mod @@ -1,6 +1,8 @@ module github.com/wundergraph/cosmo/router-tests -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 require ( github.com/andybalholm/brotli v1.1.0 @@ -64,6 +66,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-chi/chi/v5 v5.0.11 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -148,7 +151,7 @@ require ( golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect diff --git a/router-tests/go.sum b/router-tests/go.sum index e80c66aa93..35bde2d943 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -39,19 +39,17 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -99,8 +97,7 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -216,8 +213,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -279,8 +275,7 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= @@ -374,8 +369,7 @@ github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBD github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= @@ -436,8 +430,7 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -462,8 +455,7 @@ golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/router/go.mod b/router/go.mod index 0d98a39fe3..14f9805e38 100644 --- a/router/go.mod +++ b/router/go.mod @@ -1,6 +1,8 @@ module github.com/wundergraph/cosmo/router -go 1.21.0 +go 1.21.5 + +toolchain go1.22.0 require ( connectrpc.com/connect v1.16.2 @@ -56,12 +58,14 @@ require ( go.uber.org/automaxprocs v1.5.3 go.uber.org/zap v1.26.0 go.withmatt.com/connect-brotli v0.4.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 golang.org/x/sys v0.20.0 google.golang.org/grpc v1.61.0 google.golang.org/protobuf v1.34.1 ) +require github.com/mazrean/formstream v1.1.1 + require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect @@ -72,7 +76,6 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/golang/glog v1.1.2 // indirect @@ -104,16 +107,17 @@ require ( github.com/tidwall/pretty v1.2.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/twmb/franz-go/pkg/kmsg v1.7.0 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect + golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect diff --git a/router/go.sum b/router/go.sum index 1ca0062f8d..354117b5cc 100644 --- a/router/go.sum +++ b/router/go.sum @@ -19,19 +19,21 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -53,8 +55,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -73,6 +75,7 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -147,8 +150,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -161,6 +164,7 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -171,6 +175,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mazrean/formstream v1.1.1 h1:8CpESXh2jOxSrVRck5LvaLlliNM8k36vlreMB1Y2Gjw= +github.com/mazrean/formstream v1.1.1/go.mod h1:Rz8+Viu/83GqutUEwcbH/dbRM0oZlGMlULiz2QNpq9g= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -185,8 +191,8 @@ github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -267,10 +273,11 @@ github.com/twmb/franz-go v1.16.1 h1:rpWc7fB9jd7TgmCyfxzenBI+QbgS8ZfJOUQE+tzPtbE= github.com/twmb/franz-go v1.16.1/go.mod h1:/pER254UPPGp/4WfGqRi+SIRGE50RSQzVubQp6+N4FA= github.com/twmb/franz-go/pkg/kmsg v1.7.0 h1:a457IbvezYfA5UkiBvyV3zj0Is3y1i8EJgqjJYoij2E= github.com/twmb/franz-go/pkg/kmsg v1.7.0/go.mod h1:se9Mjdt0Nwzc9lnjJ0HyDtLyBnaBDAd7pCje47OhSyw= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.51 h1:fVxtKLXUgcWgLntp1ky592riTeHmQEauYzjmX88jAsk= @@ -314,6 +321,8 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -323,22 +332,24 @@ go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -364,6 +375,7 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= @@ -381,6 +393,7 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 032e760c483713e47d6468336e53e470f0a550b0 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 14:50:13 +0530 Subject: [PATCH 10/31] refactor test --- router-tests/file_upload_test.go | 56 ++++++++++++++++++++++++++++++++ router-tests/integration_test.go | 47 --------------------------- router-tests/testenv/testenv.go | 8 ++--- 3 files changed, 60 insertions(+), 51 deletions(-) create mode 100644 router-tests/file_upload_test.go diff --git a/router-tests/file_upload_test.go b/router-tests/file_upload_test.go new file mode 100644 index 0000000000..3fdf895840 --- /dev/null +++ b/router-tests/file_upload_test.go @@ -0,0 +1,56 @@ +package integration_test + +import ( + "github.com/stretchr/testify/require" + "net/http" + "testing" + + "github.com/wundergraph/cosmo/router-tests/testenv" +) + +func TestSingleFileUpload(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + Subgraphs: testenv.SubgraphsConfig{ + GlobalMiddleware: func(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(`{"data":{"singleUpload": true}}`)) + }) + }, + }, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 1) + files[0] = []byte("File content as text") + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file: Upload!){singleUpload(file: $file)}", + Variables: []byte(`{"file":null}`), + Files: files, + }) + require.JSONEq(t, `{"data":{"singleUpload": true}}`, res.Body) + }) +} + +func TestMultipleFilesUpload(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + Subgraphs: testenv.SubgraphsConfig{ + GlobalMiddleware: func(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(`{"data":{"multipleUpload": true}}`)) + }) + }, + }, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 2) + files[0] = []byte("File1 content as text") + files[1] = []byte("File2 content as text") + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file1: Upload!, $file2: Upload!){multipleUpload(files: [$file1, $file2])}", + Variables: []byte(`{"file1":null, "file2":null}`), + Files: files, + }) + require.JSONEq(t, `{"data":{"multipleUpload": true}}`, res.Body) + }) +} diff --git a/router-tests/integration_test.go b/router-tests/integration_test.go index 083865617a..179594db89 100644 --- a/router-tests/integration_test.go +++ b/router-tests/integration_test.go @@ -80,53 +80,6 @@ func TestIntegration(t *testing.T) { }) } -func TestSingleFileUpload(t *testing.T) { - t.Parallel() - testenv.Run(t, &testenv.Config{ - Subgraphs: testenv.SubgraphsConfig{ - GlobalMiddleware: func(handler http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(`{"data":{"singleUpload": true}}`)) - }) - }, - }, - }, func(t *testing.T, xEnv *testenv.Environment) { - files := make([][]byte, 1) - files[0] = []byte("File content as text") - res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ - Query: "mutation ($file: Upload!){singleUpload(file: $file)}", - Variables: []byte(`{"file":null}`), - Files: files, - }) - require.JSONEq(t, `{"data":{"singleUpload": true}}`, res.Body) - }) -} - -func TestMultipleFilesUpload(t *testing.T) { - t.Parallel() - testenv.Run(t, &testenv.Config{ - Subgraphs: testenv.SubgraphsConfig{ - GlobalMiddleware: func(handler http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(`{"data":{"multipleUpload": true}}`)) - }) - }, - }, - }, func(t *testing.T, xEnv *testenv.Environment) { - files := make([][]byte, 2) - files[0] = []byte("File1 content as text") - files[1] = []byte("File2 content as text") - res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ - Query: "mutation ($file1: Upload!, $file2: Upload!){multipleUpload(files: [$file1, $file2])}", - Variables: []byte(`{"file1":null, "file2":null}`), - Files: files, - }) - require.JSONEq(t, `{"data":{"multipleUpload": true}}`, res.Body) - }) -} - func TestPlayground(t *testing.T) { t.Parallel() diff --git a/router-tests/testenv/testenv.go b/router-tests/testenv/testenv.go index ad7f81a172..86f158b17e 100644 --- a/router-tests/testenv/testenv.go +++ b/router-tests/testenv/testenv.go @@ -934,9 +934,7 @@ func multipartBytes(values map[string]io.Reader) (bytes.Buffer, string, error) { w := multipart.NewWriter(&b) for key, r := range values { var fw io.Writer - if x, ok := r.(io.Closer); ok { - defer x.Close() - } + x, ok := r.(io.Closer) // Add a file if x, ok := r.(*os.File); ok { if fw, err = w.CreateFormFile(key, x.Name()); err != nil { @@ -951,7 +949,9 @@ func multipartBytes(values map[string]io.Reader) (bytes.Buffer, string, error) { if _, err = io.Copy(fw, r); err != nil { return b, "", err } - + if ok { + x.Close() + } } w.Close() From b541e3900377666891d15263c3ec6373c67e88f1 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 17:26:21 +0530 Subject: [PATCH 11/31] update config and add more tests --- router-tests/file_upload_test.go | 116 +++++++++++++++++---- router-tests/testenv/testenv.go | 23 +++- router/core/graphql_prehandler.go | 19 +++- router/core/router.go | 8 +- router/internal/middleware/request_size.go | 21 ++++ router/pkg/config/config.go | 4 +- router/pkg/config/config.schema.json | 13 +++ 7 files changed, 171 insertions(+), 33 deletions(-) create mode 100644 router/internal/middleware/request_size.go diff --git a/router-tests/file_upload_test.go b/router-tests/file_upload_test.go index 3fdf895840..bf35f269ea 100644 --- a/router-tests/file_upload_test.go +++ b/router-tests/file_upload_test.go @@ -1,7 +1,10 @@ package integration_test import ( + "fmt" "github.com/stretchr/testify/require" + "github.com/wundergraph/cosmo/router/core" + "github.com/wundergraph/cosmo/router/pkg/config" "net/http" "testing" @@ -10,16 +13,7 @@ import ( func TestSingleFileUpload(t *testing.T) { t.Parallel() - testenv.Run(t, &testenv.Config{ - Subgraphs: testenv.SubgraphsConfig{ - GlobalMiddleware: func(handler http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(`{"data":{"singleUpload": true}}`)) - }) - }, - }, - }, func(t *testing.T, xEnv *testenv.Environment) { + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 1) files[0] = []byte("File content as text") res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ @@ -31,26 +25,106 @@ func TestSingleFileUpload(t *testing.T) { }) } -func TestMultipleFilesUpload(t *testing.T) { +func TestSingleFileUpload_InvalidFileFormat(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file: Upload!){singleUpload(file: $file)}", + Variables: []byte(`{"file":"invalid_format"}`), + }) + require.JSONEq(t, `{"errors":[{"message":"Failed to fetch from Subgraph '0' at Path 'mutation'.","extensions":{"errors":[{"message":"string is not an Upload","path":["singleUpload","file"]}],"statusCode":200}},{"message":"Cannot return null for non-nullable field 'Mutation.singleUpload'.","path":["singleUpload"]}],"data":null}`, res.Body) + }) +} + +func TestSingleFileUpload_NoFileProvided(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation ($file: Upload!){singleUpload(file: $file)}", + Variables: []byte(`{"file":null}`), + }) + require.JSONEq(t, `{"errors":[{"message":"Failed to fetch from Subgraph '0' at Path 'mutation'.","extensions":{"errors":[{"message":"cannot be null","path":["variable","file"],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}],"statusCode":422}},{"message":"Cannot return null for non-nullable field 'Mutation.singleUpload'.","path":["singleUpload"]}],"data":null}`, res.Body) + }) +} + +func TestSingleFileUpload_FileSizeExceedsLimit(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - Subgraphs: testenv.SubgraphsConfig{ - GlobalMiddleware: func(handler http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(`{"data":{"multipleUpload": true}}`)) - }) - }, - }, + RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ + MaxUploadRequestBodyBytes: 100, + })}, }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 1) + files[0] = []byte("This is an example of a large file that exceeds the max request body size.") + res, err := xEnv.MakeGraphQLRequest(testenv.GraphQLRequest{ + Query: "mutation ($file: Upload!){singleUpload(file: $file)}", + Variables: []byte(`{"file":null}`), + Files: files, + }) + require.NoError(t, err) + require.Equal(t, http.StatusRequestEntityTooLarge, res.Response.StatusCode) + require.Equal(t, `{"errors":[{"message":"request body too large"}],"data":null}`, res.Body) + }) +} + +func TestMultipleFilesUpload(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 2) files[0] = []byte("File1 content as text") files[1] = []byte("File2 content as text") res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ - Query: "mutation ($file1: Upload!, $file2: Upload!){multipleUpload(files: [$file1, $file2])}", - Variables: []byte(`{"file1":null, "file2":null}`), + Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", + Variables: []byte(`{"files":[null, null]}`), Files: files, }) require.JSONEq(t, `{"data":{"multipleUpload": true}}`, res.Body) }) } + +func TestMultipleFilesUpload_InvalidFileFormat(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", + Variables: []byte(`{"files":["invalid_format1", "invalid_format2"]}`), + }) + require.JSONEq(t, `{"errors":[{"message":"Failed to fetch from Subgraph '0' at Path 'mutation'.","extensions":{"errors":[{"message":"string is not an Upload","path":["multipleUpload","files",0]}],"statusCode":200}},{"message":"Cannot return null for non-nullable field 'Mutation.multipleUpload'.","path":["multipleUpload"]}],"data":null}`, res.Body) + }) +} + +func TestMultipleFilesUpload_NoFilesProvided(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ + Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", + Variables: []byte(`{"files":null}`), + }) + fmt.Println(res.Body) + require.JSONEq(t, `{"errors":[{"message":"Failed to fetch from Subgraph '0' at Path 'mutation'.","extensions":{"errors":[{"message":"could not render fetch input","path":[]}]}},{"message":"Cannot return null for non-nullable field 'Mutation.multipleUpload'.","path":["multipleUpload"]}],"data":null}`, res.Body) + }) +} + +func TestMultipleFilesUpload_FileSizeExceedsLimit(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ + MaxUploadRequestBodyBytes: 100, + })}, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 2) + files[0] = []byte("This is an example of a large file that exceeds the max request body size.") + files[1] = []byte("Another file.") + res, err := xEnv.MakeGraphQLRequest(testenv.GraphQLRequest{ + Header: map[string][]string{ + "Content-Type": {"multipart/form-data"}, + }, + Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", + Variables: []byte(`{"files":[null, null]}`), + Files: files, + }) + require.NoError(t, err) + require.Equal(t, http.StatusRequestEntityTooLarge, res.Response.StatusCode) + require.Equal(t, `{"errors":[{"message":"request body too large"}],"data":null}`, res.Body) + }) +} diff --git a/router-tests/testenv/testenv.go b/router-tests/testenv/testenv.go index 86f158b17e..500e16460a 100644 --- a/router-tests/testenv/testenv.go +++ b/router-tests/testenv/testenv.go @@ -886,12 +886,27 @@ func (e *Environment) MakeGraphQLRequest(request GraphQLRequest) (*TestResponse, func (e *Environment) MakeGraphQLRequestAsMultipartForm(request GraphQLRequest) (*TestResponse, error) { data, err := json.Marshal(request) require.NoError(e.t, err) + formValues := make(map[string]io.Reader) + formValues["operations"] = bytes.NewReader(data) - formValues := map[string]io.Reader{ - "operations": bytes.NewReader(data), - "map": strings.NewReader(`{ "0": ["variables.file"] }`), - "0": bytes.NewReader(request.Files[0]), + if len(request.Files) == 1 { + formValues["map"] = strings.NewReader(`{ "0": ["variables.file"] }`) + formValues["0"] = bytes.NewReader(request.Files[0]) + } else { + mapStr := `{` + for i := 0; i < len(request.Files); i++ { + if i > 0 { + mapStr += ", " + } + mapStr += fmt.Sprintf(`"%d": ["variables.files.%d"]`, i, i) + } + mapStr += `}` + formValues["map"] = strings.NewReader(mapStr) + for i := 0; i < len(request.Files); i++ { + formValues[fmt.Sprintf("%d", i)] = bytes.NewReader(request.Files[i]) + } } + multipartBody, contentType, err := multipartBytes(formValues) if err != nil { return nil, err diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index c0273baff0..db9afc113d 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -1,6 +1,7 @@ package core import ( + "bytes" "context" "crypto/ecdsa" "fmt" @@ -35,10 +36,6 @@ import ( "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/resolve" ) -const ( - MaxSupportedFilesUpload = 10 -) - type PreHandlerOptions struct { Logger *zap.Logger Executor *Executor @@ -54,6 +51,7 @@ type PreHandlerOptions struct { FlushTelemetryAfterResponse bool TraceExportVariables bool SpanAttributesMapper func(r *http.Request) []attribute.KeyValue + MaxUploadFiles int } type PreHandler struct { @@ -72,6 +70,7 @@ type PreHandler struct { tracer trace.Tracer traceExportVariables bool spanAttributesMapper func(r *http.Request) []attribute.KeyValue + maxUploadFiles int } func NewPreHandler(opts *PreHandlerOptions) *PreHandler { @@ -94,6 +93,7 @@ func NewPreHandler(opts *PreHandlerOptions) *PreHandler { "wundergraph/cosmo/router/pre_handler", trace.WithInstrumentationVersion("0.0.1"), ), + maxUploadFiles: opts.MaxUploadFiles, } } @@ -200,6 +200,15 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return } } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { + tempBuf := pool.GetBytesBuffer() + defer pool.PutBytesBuffer(tempBuf) + if _, err = h.operationProcessor.ReadBody(tempBuf, r.Body); err != nil { + finalErr = err + writeOperationError(r, w, requestLogger, err) + return + } + r.Body = io.NopCloser(bytes.NewReader(tempBuf.Bytes())) + parser, err := httpform.NewParser(r) if err != nil { writeOperationError(r, w, requestLogger, err) @@ -220,7 +229,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { // We will register a handler for each file in the request. AFAIK, we can't know how many files we have // before parsing the request, so we will support 10 files max. - for i := 0; i < MaxSupportedFilesUpload; i++ { + for i := 0; i < h.maxUploadFiles; i++ { fileKey := fmt.Sprintf("%d", i) err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { // Create and open a temporary file to store the file content diff --git a/router/core/router.go b/router/core/router.go index 87bf37eb19..94ebc72696 100644 --- a/router/core/router.go +++ b/router/core/router.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "io" - "net" "net/http" "net/url" @@ -25,6 +24,7 @@ import ( "github.com/redis/go-redis/v9" + rmiddleware "github.com/wundergraph/cosmo/router/internal/middleware" "github.com/wundergraph/cosmo/router/internal/recoveryhandler" "github.com/wundergraph/cosmo/router/internal/requestlogger" "github.com/wundergraph/cosmo/router/pkg/config" @@ -1108,7 +1108,10 @@ func (r *Router) newServer(ctx context.Context, routerConfig *nodev1.RouterConfi httpRouter := chi.NewRouter() httpRouter.Use(recoveryHandler) - httpRouter.Use(middleware.RequestSize(int64(r.routerTrafficConfig.MaxRequestBodyBytes))) + httpRouter.Use(rmiddleware.RequestSize( + int64(r.routerTrafficConfig.MaxRequestBodyBytes), + int64(r.routerTrafficConfig.MaxUploadRequestBodyBytes)), + ) httpRouter.Use(middleware.Compress(5, CustomCompressibleContentTypes...)) brCompressor := middleware.NewCompressor(5, CustomCompressibleContentTypes...) @@ -1342,6 +1345,7 @@ func (r *Router) newServer(ctx context.Context, routerConfig *nodev1.RouterConfi FlushTelemetryAfterResponse: r.awsLambda, TraceExportVariables: r.traceConfig.ExportGraphQLVariables.Enabled, SpanAttributesMapper: r.traceConfig.SpanAttributesMapper, + MaxUploadFiles: r.routerTrafficConfig.MaxUploadFiles, }) graphqlChiRouter := chi.NewRouter() diff --git a/router/internal/middleware/request_size.go b/router/internal/middleware/request_size.go new file mode 100644 index 0000000000..0f73ea8203 --- /dev/null +++ b/router/internal/middleware/request_size.go @@ -0,0 +1,21 @@ +package middleware + +import ( + "net/http" + "strings" +) + +func RequestSize(bytes int64, uploadBytes int64) func(http.Handler) http.Handler { + f := func(h http.Handler) http.Handler { + fn := func(w http.ResponseWriter, r *http.Request) { + if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { + r.Body = http.MaxBytesReader(w, r.Body, uploadBytes) + } else { + r.Body = http.MaxBytesReader(w, r.Body, bytes) + } + h.ServeHTTP(w, r) + } + return http.HandlerFunc(fn) + } + return f +} diff --git a/router/pkg/config/config.go b/router/pkg/config/config.go index 832b009b1d..cf9c43bdda 100644 --- a/router/pkg/config/config.go +++ b/router/pkg/config/config.go @@ -126,7 +126,9 @@ type TrafficShapingRules struct { type RouterTrafficConfiguration struct { // MaxRequestBodyBytes is the maximum size of the request body in bytes - MaxRequestBodyBytes BytesString `yaml:"max_request_body_size" default:"5MB"` + MaxRequestBodyBytes BytesString `yaml:"max_request_body_size" default:"5MB"` + MaxUploadRequestBodyBytes BytesString `yaml:"max_upload_request_body_size" default:"5MB"` + MaxUploadFiles int `yaml:"max_upload_files" default:"10"` } type GlobalSubgraphRequestRule struct { diff --git a/router/pkg/config/config.schema.json b/router/pkg/config/config.schema.json index 6d5c8a3363..0b149fdb22 100644 --- a/router/pkg/config/config.schema.json +++ b/router/pkg/config/config.schema.json @@ -639,6 +639,19 @@ "minimum": "1MB" }, "description": "The maximum request body size. The size is specified as a string with a number and a unit, e.g. 10KB, 1MB, 1GB. The supported units are 'KB', 'MB', 'GB'." + }, + "max_upload_request_body_size": { + "type": "string", + "bytes": { + "minimum": "1MB" + }, + "description": "The maximum request body size for file uploads. The size is specified as a string with a number and a unit, e.g. 10KB, 1MB, 1GB. The supported units are 'KB', 'MB', 'GB'." + }, + "max_upload_files": { + "type": "integer", + "default": 10, + "minimum": 1, + "description": "The maximum number of files that can be uploaded." } } }, From 76ec0ce01cebc8ec79b593a9dc7dab4eba83b94c Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 17:30:18 +0530 Subject: [PATCH 12/31] update snapshots --- router/pkg/config/testdata/config_defaults.json | 4 +++- router/pkg/config/testdata/config_full.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/router/pkg/config/testdata/config_defaults.json b/router/pkg/config/testdata/config_defaults.json index d9bcc2d217..b7a09af174 100644 --- a/router/pkg/config/testdata/config_defaults.json +++ b/router/pkg/config/testdata/config_defaults.json @@ -104,7 +104,9 @@ "KeepAliveProbeInterval": 30000000000 }, "Router": { - "MaxRequestBodyBytes": 5000000 + "MaxRequestBodyBytes": 5000000, + "MaxUploadRequestBodyBytes": 5000000, + "MaxUploadFiles": 10 } }, "ListenAddr": "localhost:3002", diff --git a/router/pkg/config/testdata/config_full.json b/router/pkg/config/testdata/config_full.json index a01d5a6bc4..88f9a53ec6 100644 --- a/router/pkg/config/testdata/config_full.json +++ b/router/pkg/config/testdata/config_full.json @@ -160,7 +160,9 @@ "KeepAliveProbeInterval": 30000000000 }, "Router": { - "MaxRequestBodyBytes": 5000000 + "MaxRequestBodyBytes": 5000000, + "MaxUploadRequestBodyBytes": 5000000, + "MaxUploadFiles": 10 } }, "ListenAddr": "localhost:3002", From 7510ae9c9c29523d366d5f9231894d5586abe1d1 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 17:59:19 +0530 Subject: [PATCH 13/31] fix test --- router/core/router.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/router/core/router.go b/router/core/router.go index 94ebc72696..746d53f12d 100644 --- a/router/core/router.go +++ b/router/core/router.go @@ -1110,8 +1110,8 @@ func (r *Router) newServer(ctx context.Context, routerConfig *nodev1.RouterConfi httpRouter.Use(recoveryHandler) httpRouter.Use(rmiddleware.RequestSize( int64(r.routerTrafficConfig.MaxRequestBodyBytes), - int64(r.routerTrafficConfig.MaxUploadRequestBodyBytes)), - ) + int64(r.routerTrafficConfig.MaxUploadRequestBodyBytes), + )) httpRouter.Use(middleware.Compress(5, CustomCompressibleContentTypes...)) brCompressor := middleware.NewCompressor(5, CustomCompressibleContentTypes...) @@ -1848,7 +1848,9 @@ func WithLocalhostFallbackInsideDocker(fallback bool) Option { func DefaultRouterTrafficConfig() *config.RouterTrafficConfiguration { return &config.RouterTrafficConfiguration{ - MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB + MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB + MaxUploadRequestBodyBytes: 1000 * 1000 * 5, // 5 MB, + MaxUploadFiles: 10, } } From a1da287ba7065759a2d2e767b872c1e2865e67b9 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 21:29:53 +0530 Subject: [PATCH 14/31] improve --- router-tests/file_upload_test.go | 51 +++++++++---------- router/core/graphql_prehandler.go | 50 +++++++++++++++++- router/core/router.go | 4 +- router/pkg/config/config.go | 2 +- .../pkg/config/testdata/config_defaults.json | 2 +- router/pkg/config/testdata/config_full.json | 2 +- 6 files changed, 78 insertions(+), 33 deletions(-) diff --git a/router-tests/file_upload_test.go b/router-tests/file_upload_test.go index bf35f269ea..c12a13cfa5 100644 --- a/router-tests/file_upload_test.go +++ b/router-tests/file_upload_test.go @@ -47,7 +47,7 @@ func TestSingleFileUpload_NoFileProvided(t *testing.T) { }) } -func TestSingleFileUpload_FileSizeExceedsLimit(t *testing.T) { +func TestFileUpload_FilesSizeExceedsLimit(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ @@ -56,7 +56,7 @@ func TestSingleFileUpload_FileSizeExceedsLimit(t *testing.T) { }, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 1) files[0] = []byte("This is an example of a large file that exceeds the max request body size.") - res, err := xEnv.MakeGraphQLRequest(testenv.GraphQLRequest{ + res, err := xEnv.MakeGraphQLRequestAsMultipartForm(testenv.GraphQLRequest{ Query: "mutation ($file: Upload!){singleUpload(file: $file)}", Variables: []byte(`{"file":null}`), Files: files, @@ -67,6 +67,29 @@ func TestSingleFileUpload_FileSizeExceedsLimit(t *testing.T) { }) } +func TestFileUpload_FilesExceedsLimit(t *testing.T) { + t.Parallel() + testenv.Run(t, &testenv.Config{ + RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ + MaxUploadFiles: 2, + MaxRequestBodyBytes: 50000, + MaxUploadRequestBodyBytes: 50000, + })}, + }, func(t *testing.T, xEnv *testenv.Environment) { + files := make([][]byte, 3) + files[0] = []byte("File1 content as text") + files[1] = []byte("File2 content as text") + files[2] = []byte("File3 content as text") + res, _ := xEnv.MakeGraphQLRequestAsMultipartForm(testenv.GraphQLRequest{ + Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", + Variables: []byte(`{"files":[null, null, null]}`), + Files: files, + }) + require.Equal(t, http.StatusBadRequest, res.Response.StatusCode) + require.Equal(t, `{"errors":[{"message":"too many files: 3, max allowed: 2"}],"data":null}`, res.Body) + }) +} + func TestMultipleFilesUpload(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { @@ -104,27 +127,3 @@ func TestMultipleFilesUpload_NoFilesProvided(t *testing.T) { require.JSONEq(t, `{"errors":[{"message":"Failed to fetch from Subgraph '0' at Path 'mutation'.","extensions":{"errors":[{"message":"could not render fetch input","path":[]}]}},{"message":"Cannot return null for non-nullable field 'Mutation.multipleUpload'.","path":["multipleUpload"]}],"data":null}`, res.Body) }) } - -func TestMultipleFilesUpload_FileSizeExceedsLimit(t *testing.T) { - t.Parallel() - testenv.Run(t, &testenv.Config{ - RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ - MaxUploadRequestBodyBytes: 100, - })}, - }, func(t *testing.T, xEnv *testenv.Environment) { - files := make([][]byte, 2) - files[0] = []byte("This is an example of a large file that exceeds the max request body size.") - files[1] = []byte("Another file.") - res, err := xEnv.MakeGraphQLRequest(testenv.GraphQLRequest{ - Header: map[string][]string{ - "Content-Type": {"multipart/form-data"}, - }, - Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", - Variables: []byte(`{"files":[null, null]}`), - Files: files, - }) - require.NoError(t, err) - require.Equal(t, http.StatusRequestEntityTooLarge, res.Response.StatusCode) - require.Equal(t, `{"errors":[{"message":"request body too large"}],"data":null}`, res.Body) - }) -} diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index db9afc113d..16ed3a6e2c 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -6,6 +6,8 @@ import ( "crypto/ecdsa" "fmt" "io" + "mime" + "mime/multipart" "net/http" "os" "strconv" @@ -209,8 +211,50 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { } r.Body = io.NopCloser(bytes.NewReader(tempBuf.Bytes())) + contentType := r.Header.Get("Content-Type") + _, params, err := mime.ParseMediaType(contentType) + if err != nil { + finalErr = err + writeOperationError(r, w, requestLogger, err) + return + } + boundary, ok := params["boundary"] + if !ok { + finalErr = fmt.Errorf("missing boundary in Content-Type") + writeOperationError(r, w, requestLogger, finalErr) + return + } + + multipartReader := multipart.NewReader(bytes.NewReader(tempBuf.Bytes()), boundary) + filePartsCount := 0 + for { + part, err := multipartReader.NextPart() + if err == io.EOF { + break + } + if err != nil { + finalErr = err + writeOperationError(r, w, requestLogger, err) + return + } + if _, err := strconv.ParseFloat(part.FormName(), 64); err == nil { + filePartsCount++ + } + part.Close() + } + + if filePartsCount > h.maxUploadFiles { + finalErr = &inputError{ + message: fmt.Sprintf("too many files: %d, max allowed: %d", filePartsCount, h.maxUploadFiles), + statusCode: http.StatusBadRequest, + } + writeOperationError(r, w, requestLogger, finalErr) + return + } + parser, err := httpform.NewParser(r) if err != nil { + finalErr = err writeOperationError(r, w, requestLogger, err) return } @@ -223,12 +267,12 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return nil }, formstream.WithRequiredPart("operations"), formstream.WithRequiredPart("map")) if err != nil { + finalErr = err writeOperationError(r, w, requestLogger, err) return } - // We will register a handler for each file in the request. AFAIK, we can't know how many files we have - // before parsing the request, so we will support 10 files max. + // We will register a handler for each file in the request. for i := 0; i < h.maxUploadFiles; i++ { fileKey := fmt.Sprintf("%d", i) err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { @@ -248,6 +292,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return nil }, formstream.WithRequiredPart(fileKey)) if err != nil { + finalErr = err writeOperationError(r, w, requestLogger, err) return } @@ -255,6 +300,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { err = parser.Parse() if err != nil { + finalErr = err writeOperationError(r, w, requestLogger, err) return } diff --git a/router/core/router.go b/router/core/router.go index 746d53f12d..f96ff29a5b 100644 --- a/router/core/router.go +++ b/router/core/router.go @@ -1848,8 +1848,8 @@ func WithLocalhostFallbackInsideDocker(fallback bool) Option { func DefaultRouterTrafficConfig() *config.RouterTrafficConfiguration { return &config.RouterTrafficConfiguration{ - MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB - MaxUploadRequestBodyBytes: 1000 * 1000 * 5, // 5 MB, + MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB + MaxUploadRequestBodyBytes: 1000 * 1000 * 50, // 50 MB, MaxUploadFiles: 10, } } diff --git a/router/pkg/config/config.go b/router/pkg/config/config.go index 7ec2bd240e..e2cf8f56eb 100644 --- a/router/pkg/config/config.go +++ b/router/pkg/config/config.go @@ -127,7 +127,7 @@ type TrafficShapingRules struct { type RouterTrafficConfiguration struct { // MaxRequestBodyBytes is the maximum size of the request body in bytes MaxRequestBodyBytes BytesString `yaml:"max_request_body_size" default:"5MB"` - MaxUploadRequestBodyBytes BytesString `yaml:"max_upload_request_body_size" default:"5MB"` + MaxUploadRequestBodyBytes BytesString `yaml:"max_upload_request_body_size" default:"50MB"` MaxUploadFiles int `yaml:"max_upload_files" default:"10"` } diff --git a/router/pkg/config/testdata/config_defaults.json b/router/pkg/config/testdata/config_defaults.json index b7a09af174..5325891355 100644 --- a/router/pkg/config/testdata/config_defaults.json +++ b/router/pkg/config/testdata/config_defaults.json @@ -105,7 +105,7 @@ }, "Router": { "MaxRequestBodyBytes": 5000000, - "MaxUploadRequestBodyBytes": 5000000, + "MaxUploadRequestBodyBytes": 50000000, "MaxUploadFiles": 10 } }, diff --git a/router/pkg/config/testdata/config_full.json b/router/pkg/config/testdata/config_full.json index 88f9a53ec6..950ca30256 100644 --- a/router/pkg/config/testdata/config_full.json +++ b/router/pkg/config/testdata/config_full.json @@ -161,7 +161,7 @@ }, "Router": { "MaxRequestBodyBytes": 5000000, - "MaxUploadRequestBodyBytes": 5000000, + "MaxUploadRequestBodyBytes": 50000000, "MaxUploadFiles": 10 } }, From 37284a24a0d577c6f4579a59858e3e8297be201b Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 21:39:08 +0530 Subject: [PATCH 15/31] cleanup files --- router/core/graphql_prehandler.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 16ed3a6e2c..6fec6fee9b 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -272,6 +272,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return } + var tempFiles []*os.File // We will register a handler for each file in the request. for i := 0; i < h.maxUploadFiles; i++ { fileKey := fmt.Sprintf("%d", i) @@ -279,10 +280,10 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { // Create and open a temporary file to store the file content // This file will be deleted after the request is done file, err := os.CreateTemp("", "tempfile-") + tempFiles = append(tempFiles, file) if err != nil { return err } - defer file.Close() _, err = io.Copy(file, reader) if err != nil { return err @@ -298,6 +299,13 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { } } + defer func() { + for _, file := range tempFiles { + file.Close() + os.Remove(file.Name()) + } + }() + err = parser.Parse() if err != nil { finalErr = err From 7a30116982c62a99717feff3b77e986788fd3b32 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Tue, 25 Jun 2024 21:45:59 +0530 Subject: [PATCH 16/31] improve --- router-tests/file_upload_test.go | 3 +-- router/core/graphql_prehandler.go | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/router-tests/file_upload_test.go b/router-tests/file_upload_test.go index c12a13cfa5..27b99b49f6 100644 --- a/router-tests/file_upload_test.go +++ b/router-tests/file_upload_test.go @@ -80,12 +80,11 @@ func TestFileUpload_FilesExceedsLimit(t *testing.T) { files[0] = []byte("File1 content as text") files[1] = []byte("File2 content as text") files[2] = []byte("File3 content as text") - res, _ := xEnv.MakeGraphQLRequestAsMultipartForm(testenv.GraphQLRequest{ + res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", Variables: []byte(`{"files":[null, null, null]}`), Files: files, }) - require.Equal(t, http.StatusBadRequest, res.Response.StatusCode) require.Equal(t, `{"errors":[{"message":"too many files: 3, max allowed: 2"}],"data":null}`, res.Body) }) } diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 6fec6fee9b..4d9f1ee083 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -233,6 +233,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { break } if err != nil { + part.Close() finalErr = err writeOperationError(r, w, requestLogger, err) return @@ -246,7 +247,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { if filePartsCount > h.maxUploadFiles { finalErr = &inputError{ message: fmt.Sprintf("too many files: %d, max allowed: %d", filePartsCount, h.maxUploadFiles), - statusCode: http.StatusBadRequest, + statusCode: http.StatusOK, } writeOperationError(r, w, requestLogger, finalErr) return @@ -274,7 +275,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { var tempFiles []*os.File // We will register a handler for each file in the request. - for i := 0; i < h.maxUploadFiles; i++ { + for i := 0; i < filePartsCount; i++ { fileKey := fmt.Sprintf("%d", i) err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { // Create and open a temporary file to store the file content From cbf8563da7cf3e4fe0e93a77475666c976e9b7a6 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 14:15:19 +0530 Subject: [PATCH 17/31] improve form parsing --- router-tests/file_upload_test.go | 23 ++-- router-tests/testenv/testenv.go | 6 +- router/core/graphql_prehandler.go | 129 ++++++++---------- router/core/router.go | 12 +- router/internal/middleware/request_size.go | 6 +- router/pkg/config/config.go | 6 +- router/pkg/config/config.schema.json | 4 +- .../pkg/config/testdata/config_defaults.json | 2 +- router/pkg/config/testdata/config_full.json | 2 +- 9 files changed, 84 insertions(+), 106 deletions(-) diff --git a/router-tests/file_upload_test.go b/router-tests/file_upload_test.go index 27b99b49f6..c271fde7ea 100644 --- a/router-tests/file_upload_test.go +++ b/router-tests/file_upload_test.go @@ -1,6 +1,7 @@ package integration_test import ( + "bytes" "fmt" "github.com/stretchr/testify/require" "github.com/wundergraph/cosmo/router/core" @@ -14,8 +15,8 @@ import ( func TestSingleFileUpload(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { - files := make([][]byte, 1) - files[0] = []byte("File content as text") + fileContent := bytes.Repeat([]byte("a"), 40*1024*1024) + files := [][]byte{fileContent} res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ Query: "mutation ($file: Upload!){singleUpload(file: $file)}", Variables: []byte(`{"file":null}`), @@ -51,7 +52,9 @@ func TestFileUpload_FilesSizeExceedsLimit(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ - MaxUploadRequestBodyBytes: 100, + MaxUploadFiles: 1, + MaxRequestBodyBytes: 100, + MaxUploadFileSizeBytes: 50, })}, }, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 1) @@ -62,8 +65,8 @@ func TestFileUpload_FilesSizeExceedsLimit(t *testing.T) { Files: files, }) require.NoError(t, err) - require.Equal(t, http.StatusRequestEntityTooLarge, res.Response.StatusCode) - require.Equal(t, `{"errors":[{"message":"request body too large"}],"data":null}`, res.Body) + require.Equal(t, http.StatusOK, res.Response.StatusCode) + require.Equal(t, `{"errors":[{"message":"file too large to upload"}],"data":null}`, res.Body) }) } @@ -71,9 +74,9 @@ func TestFileUpload_FilesExceedsLimit(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ RouterOptions: []core.Option{core.WithRouterTrafficConfig(&config.RouterTrafficConfiguration{ - MaxUploadFiles: 2, - MaxRequestBodyBytes: 50000, - MaxUploadRequestBodyBytes: 50000, + MaxUploadFiles: 2, + MaxRequestBodyBytes: 50000, + MaxUploadFileSizeBytes: 50000, })}, }, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 3) @@ -93,8 +96,8 @@ func TestMultipleFilesUpload(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{}, func(t *testing.T, xEnv *testenv.Environment) { files := make([][]byte, 2) - files[0] = []byte("File1 content as text") - files[1] = []byte("File2 content as text") + files[0] = []byte("Contents of first file") + files[1] = []byte("Contents of second file") res := xEnv.MakeGraphQLRequestOK(testenv.GraphQLRequest{ Query: "mutation($files: [Upload!]!) { multipleUpload(files: $files)}", Variables: []byte(`{"files":[null, null]}`), diff --git a/router-tests/testenv/testenv.go b/router-tests/testenv/testenv.go index 500e16460a..8fbe0949bc 100644 --- a/router-tests/testenv/testenv.go +++ b/router-tests/testenv/testenv.go @@ -950,9 +950,9 @@ func multipartBytes(values map[string]io.Reader) (bytes.Buffer, string, error) { for key, r := range values { var fw io.Writer x, ok := r.(io.Closer) - // Add a file - if x, ok := r.(*os.File); ok { - if fw, err = w.CreateFormFile(key, x.Name()); err != nil { + if key != "operations" && key != "map" { + // Add a file + if fw, err = w.CreateFormFile(key, uuid.NewString()); err != nil { return b, "", err } } else { diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 4d9f1ee083..487877152a 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -1,7 +1,6 @@ package core import ( - "bytes" "context" "crypto/ecdsa" "fmt" @@ -28,8 +27,6 @@ import ( rtrace "github.com/wundergraph/cosmo/router/pkg/trace" "github.com/go-chi/chi/v5/middleware" - "github.com/mazrean/formstream" - httpform "github.com/mazrean/formstream/http" "github.com/pkg/errors" "go.uber.org/zap" @@ -54,6 +51,7 @@ type PreHandlerOptions struct { TraceExportVariables bool SpanAttributesMapper func(r *http.Request) []attribute.KeyValue MaxUploadFiles int + MaxUploadFileSize int } type PreHandler struct { @@ -73,6 +71,7 @@ type PreHandler struct { traceExportVariables bool spanAttributesMapper func(r *http.Request) []attribute.KeyValue maxUploadFiles int + maxUploadFileSize int } func NewPreHandler(opts *PreHandlerOptions) *PreHandler { @@ -95,7 +94,8 @@ func NewPreHandler(opts *PreHandlerOptions) *PreHandler { "wundergraph/cosmo/router/pre_handler", trace.WithInstrumentationVersion("0.0.1"), ), - maxUploadFiles: opts.MaxUploadFiles, + maxUploadFiles: opts.MaxUploadFiles, + maxUploadFileSize: opts.MaxUploadFileSize, } } @@ -202,117 +202,96 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return } } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { - tempBuf := pool.GetBytesBuffer() - defer pool.PutBytesBuffer(tempBuf) - if _, err = h.operationProcessor.ReadBody(tempBuf, r.Body); err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - r.Body = io.NopCloser(bytes.NewReader(tempBuf.Bytes())) - contentType := r.Header.Get("Content-Type") - _, params, err := mime.ParseMediaType(contentType) - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) + d, params, err := mime.ParseMediaType(contentType) + if err != nil || d != "multipart/form-data" { + finalErr = errors.New("could not parse multipart request") + writeOperationError(r, w, requestLogger, finalErr) return } + boundary, ok := params["boundary"] if !ok { - finalErr = fmt.Errorf("missing boundary in Content-Type") + finalErr = errors.New("could not find request boundary") writeOperationError(r, w, requestLogger, finalErr) return } - multipartReader := multipart.NewReader(bytes.NewReader(tempBuf.Bytes()), boundary) - filePartsCount := 0 - for { - part, err := multipartReader.NextPart() - if err == io.EOF { - break - } - if err != nil { - part.Close() - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - if _, err := strconv.ParseFloat(part.FormName(), 64); err == nil { - filePartsCount++ + reader := multipart.NewReader(r.Body, boundary) + form, err := reader.ReadForm(0) + if err != nil { + finalErr = &inputError{ + message: err.Error(), + statusCode: http.StatusOK, } - part.Close() + writeOperationError(r, w, requestLogger, finalErr) + return } - if filePartsCount > h.maxUploadFiles { + if len(form.File) > h.maxUploadFiles { finalErr = &inputError{ - message: fmt.Sprintf("too many files: %d, max allowed: %d", filePartsCount, h.maxUploadFiles), + message: fmt.Sprintf("too many files: %d, max allowed: %d", len(form.File), h.maxUploadFiles), statusCode: http.StatusOK, } writeOperationError(r, w, requestLogger, finalErr) return } - parser, err := httpform.NewParser(r) + body, err = h.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(form.Value["operations"], ""))) if err != nil { finalErr = err writeOperationError(r, w, requestLogger, err) return } - err = parser.Register("operations", func(reader io.Reader, header formstream.Header) error { - body, err = h.operationProcessor.ReadBody(buf, reader) + var manuallyWrittenDiskFiles []*os.File + for _, filePart := range form.File { + file, err := filePart[0].Open() if err != nil { - return err + finalErr = err + writeOperationError(r, w, requestLogger, err) + return } - return nil - }, formstream.WithRequiredPart("operations"), formstream.WithRequiredPart("map")) - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - var tempFiles []*os.File - // We will register a handler for each file in the request. - for i := 0; i < filePartsCount; i++ { - fileKey := fmt.Sprintf("%d", i) - err = parser.Register(fileKey, func(reader io.Reader, header formstream.Header) error { - // Create and open a temporary file to store the file content - // This file will be deleted after the request is done - file, err := os.CreateTemp("", "tempfile-") - tempFiles = append(tempFiles, file) + if filePart[0].Size > int64(h.maxUploadFileSize) { + finalErr = &inputError{ + message: "file too large to upload", + statusCode: http.StatusOK, + } + writeOperationError(r, w, requestLogger, finalErr) + return + } + + // Check if the file was written to the disk + if diskFile, ok := file.(*os.File); ok { + files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) + } else { + // The file is in memory. We write it manually to the disk. + tempFile, err := os.CreateTemp("", "tempfile-") if err != nil { - return err + finalErr = err + writeOperationError(r, w, requestLogger, err) + return } - _, err = io.Copy(file, reader) + _, err = io.Copy(tempFile, file) if err != nil { - return err + finalErr = err + writeOperationError(r, w, requestLogger, err) + return } - files = append(files, httpclient.NewFile(file.Name(), header.FileName())) - - return nil - }, formstream.WithRequiredPart(fileKey)) - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return + manuallyWrittenDiskFiles = append(manuallyWrittenDiskFiles, tempFile) + files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) } } + // Cleanup all files defer func() { - for _, file := range tempFiles { + for _, file := range manuallyWrittenDiskFiles { file.Close() os.Remove(file.Name()) } + form.RemoveAll() }() - - err = parser.Parse() - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } } /** diff --git a/router/core/router.go b/router/core/router.go index f96ff29a5b..91343a65fe 100644 --- a/router/core/router.go +++ b/router/core/router.go @@ -1108,10 +1108,7 @@ func (r *Router) newServer(ctx context.Context, routerConfig *nodev1.RouterConfi httpRouter := chi.NewRouter() httpRouter.Use(recoveryHandler) - httpRouter.Use(rmiddleware.RequestSize( - int64(r.routerTrafficConfig.MaxRequestBodyBytes), - int64(r.routerTrafficConfig.MaxUploadRequestBodyBytes), - )) + httpRouter.Use(rmiddleware.RequestSize(int64(r.routerTrafficConfig.MaxRequestBodyBytes))) httpRouter.Use(middleware.Compress(5, CustomCompressibleContentTypes...)) brCompressor := middleware.NewCompressor(5, CustomCompressibleContentTypes...) @@ -1346,6 +1343,7 @@ func (r *Router) newServer(ctx context.Context, routerConfig *nodev1.RouterConfi TraceExportVariables: r.traceConfig.ExportGraphQLVariables.Enabled, SpanAttributesMapper: r.traceConfig.SpanAttributesMapper, MaxUploadFiles: r.routerTrafficConfig.MaxUploadFiles, + MaxUploadFileSize: int(r.routerTrafficConfig.MaxUploadFileSizeBytes), }) graphqlChiRouter := chi.NewRouter() @@ -1848,9 +1846,9 @@ func WithLocalhostFallbackInsideDocker(fallback bool) Option { func DefaultRouterTrafficConfig() *config.RouterTrafficConfiguration { return &config.RouterTrafficConfiguration{ - MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB - MaxUploadRequestBodyBytes: 1000 * 1000 * 50, // 50 MB, - MaxUploadFiles: 10, + MaxRequestBodyBytes: 1000 * 1000 * 5, // 5 MB + MaxUploadFileSizeBytes: 1000 * 1000 * 50, // 50 MB, + MaxUploadFiles: 10, } } diff --git a/router/internal/middleware/request_size.go b/router/internal/middleware/request_size.go index 0f73ea8203..f560cdeacb 100644 --- a/router/internal/middleware/request_size.go +++ b/router/internal/middleware/request_size.go @@ -5,12 +5,10 @@ import ( "strings" ) -func RequestSize(bytes int64, uploadBytes int64) func(http.Handler) http.Handler { +func RequestSize(bytes int64) func(http.Handler) http.Handler { f := func(h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { - if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { - r.Body = http.MaxBytesReader(w, r.Body, uploadBytes) - } else { + if !strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { r.Body = http.MaxBytesReader(w, r.Body, bytes) } h.ServeHTTP(w, r) diff --git a/router/pkg/config/config.go b/router/pkg/config/config.go index e2cf8f56eb..74473ec2a1 100644 --- a/router/pkg/config/config.go +++ b/router/pkg/config/config.go @@ -126,9 +126,9 @@ type TrafficShapingRules struct { type RouterTrafficConfiguration struct { // MaxRequestBodyBytes is the maximum size of the request body in bytes - MaxRequestBodyBytes BytesString `yaml:"max_request_body_size" default:"5MB"` - MaxUploadRequestBodyBytes BytesString `yaml:"max_upload_request_body_size" default:"50MB"` - MaxUploadFiles int `yaml:"max_upload_files" default:"10"` + MaxRequestBodyBytes BytesString `yaml:"max_request_body_size" default:"5MB"` + MaxUploadFileSizeBytes BytesString `yaml:"max_upload_file_size" default:"50MB"` + MaxUploadFiles int `yaml:"max_upload_files" default:"10"` } type GlobalSubgraphRequestRule struct { diff --git a/router/pkg/config/config.schema.json b/router/pkg/config/config.schema.json index 0e7d024c0b..e638844d98 100644 --- a/router/pkg/config/config.schema.json +++ b/router/pkg/config/config.schema.json @@ -640,12 +640,12 @@ }, "description": "The maximum request body size. The size is specified as a string with a number and a unit, e.g. 10KB, 1MB, 1GB. The supported units are 'KB', 'MB', 'GB'." }, - "max_upload_request_body_size": { + "max_upload_file_size": { "type": "string", "bytes": { "minimum": "1MB" }, - "description": "The maximum request body size for file uploads. The size is specified as a string with a number and a unit, e.g. 10KB, 1MB, 1GB. The supported units are 'KB', 'MB', 'GB'." + "description": "The maximum size of a file that can be uploaded. The size is specified as a string with a number and a unit, e.g. 10KB, 1MB, 1GB. The supported units are 'KB', 'MB', 'GB'." }, "max_upload_files": { "type": "integer", diff --git a/router/pkg/config/testdata/config_defaults.json b/router/pkg/config/testdata/config_defaults.json index 5325891355..0d0eea722d 100644 --- a/router/pkg/config/testdata/config_defaults.json +++ b/router/pkg/config/testdata/config_defaults.json @@ -105,7 +105,7 @@ }, "Router": { "MaxRequestBodyBytes": 5000000, - "MaxUploadRequestBodyBytes": 50000000, + "MaxUploadFileSizeBytes": 50000000, "MaxUploadFiles": 10 } }, diff --git a/router/pkg/config/testdata/config_full.json b/router/pkg/config/testdata/config_full.json index 950ca30256..baf1a3a8d0 100644 --- a/router/pkg/config/testdata/config_full.json +++ b/router/pkg/config/testdata/config_full.json @@ -161,7 +161,7 @@ }, "Router": { "MaxRequestBodyBytes": 5000000, - "MaxUploadRequestBodyBytes": 50000000, + "MaxUploadFileSizeBytes": 50000000, "MaxUploadFiles": 10 } }, From 42c5aff37298cbc1544c504cc4c49e8b6cc7b1c5 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 14:18:14 +0530 Subject: [PATCH 18/31] sync workspace --- aws-lambda-router/go.mod | 2 +- aws-lambda-router/go.sum | 18 ++++++++++++++++-- demo/go.sum | 4 ++++ go.work.sum | 14 ++++++++++++-- router/go.mod | 7 ++----- router/go.sum | 6 ------ 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/aws-lambda-router/go.mod b/aws-lambda-router/go.mod index 3b37fd5ece..3492795998 100644 --- a/aws-lambda-router/go.mod +++ b/aws-lambda-router/go.mod @@ -4,7 +4,7 @@ require ( github.com/akrylysov/algnhsa v1.1.0 github.com/aws/aws-lambda-go v1.43.0 github.com/stretchr/testify v1.9.0 - github.com/wundergraph/cosmo/router v0.0.0-20240625113344-34359c7407af + github.com/wundergraph/cosmo/router v0.0.0-20240625195639-282d8112250b go.uber.org/zap v1.26.0 ) diff --git a/aws-lambda-router/go.sum b/aws-lambda-router/go.sum index 45e1602271..f1f54cecca 100644 --- a/aws-lambda-router/go.sum +++ b/aws-lambda-router/go.sum @@ -24,7 +24,9 @@ github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0 github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -33,7 +35,9 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -56,6 +60,7 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -74,6 +79,7 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -149,6 +155,7 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -161,6 +168,7 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -186,6 +194,7 @@ github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDm github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -267,10 +276,11 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= -github.com/wundergraph/cosmo/router v0.0.0-20240625113344-34359c7407af h1:m98M5wg+Zv/9gDa9Lm1Kus0oqELCZKrBmPGH8l+9WWs= -github.com/wundergraph/cosmo/router v0.0.0-20240625113344-34359c7407af/go.mod h1:NoM4IzMakYcUsFkf8xo9Q9qRQKmYzA3NXF2WaM0j6ic= +github.com/wundergraph/cosmo/router v0.0.0-20240625195639-282d8112250b h1:3tF8CavnNJ+2lwXNN6wptwqZvDRzaIy+r6gBERvqi0U= +github.com/wundergraph/cosmo/router v0.0.0-20240625195639-282d8112250b/go.mod h1:3PdSfLfZxKZhJ6e3nhHGINqd2Ntf8gww5exjsE6vHdM= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53 h1:LAreN8Tix1nXnjWp5rz+YmjqdTOf4l8LPIux5SzMvwo= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= @@ -320,6 +330,7 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= @@ -331,8 +342,10 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -375,6 +388,7 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/demo/go.sum b/demo/go.sum index 9da2d99b5d..ce636e07bd 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -160,6 +160,7 @@ github.com/wundergraph/cosmo/composition-go v0.0.0-20240124120900-5effe48a4a1d/g github.com/wundergraph/cosmo/router v0.0.0-20240625121919-74836724e8e3 h1:Rea2SjZmpuwY3Xqnle2yN2LqGzqZI9J4SOXxF8qMnpY= github.com/wundergraph/cosmo/router v0.0.0-20240625121919-74836724e8e3/go.mod h1:OUIYJdNLSiRoAPRue3yy6oJDjlNicYj4hBZ0pZqmbUQ= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53 h1:LAreN8Tix1nXnjWp5rz+YmjqdTOf4l8LPIux5SzMvwo= +github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI= github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -209,9 +210,11 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -258,6 +261,7 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/go.work.sum b/go.work.sum index 7eada05e6b..940e13cec5 100644 --- a/go.work.sum +++ b/go.work.sum @@ -31,7 +31,11 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= +github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/chzyer/logex v1.2.0 h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM= github.com/chzyer/readline v1.5.0 h1:lSwwFrbNviGePhkewF1az4oLmcwqCZijQ2/Wi3BGHAI= github.com/chzyer/test v0.0.0-20210722231415-061457976a23 h1:dZ0/VyGgQdVGAss6Ju0dt5P0QltE0SFY5Woh6hbIfiQ= @@ -168,6 +172,10 @@ github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0= +github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.0 h1:XzdxDbuQTz0RZZEmdU7cnQxUtFUzgCSPq8RCz4BxIi4= @@ -245,6 +253,10 @@ github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BG github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vektah/gqlparser/v2 v2.5.10/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= @@ -260,8 +272,6 @@ github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.48 h1:181I6TqMBORu0JEb0ObIS github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.48/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49 h1:MJiSz5RhRH4MvYS6Y597RasRtrcMYQ4TpM/hvRtRJLo= github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.49/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53 h1:LAreN8Tix1nXnjWp5rz+YmjqdTOf4l8LPIux5SzMvwo= -github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.53/go.mod h1:YCJyt5TSr4luj4YWFGk93ayC/0KwHVEJmhgcNhcfLBc= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= diff --git a/router/go.mod b/router/go.mod index 3348ba6490..0d9bd2f8fe 100644 --- a/router/go.mod +++ b/router/go.mod @@ -64,8 +64,6 @@ require ( google.golang.org/protobuf v1.34.1 ) -require github.com/mazrean/formstream v1.1.1 - require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect @@ -73,9 +71,11 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/golang/glog v1.1.2 // indirect @@ -111,13 +111,10 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect - go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect diff --git a/router/go.sum b/router/go.sum index 04fc07d6c7..7e56603794 100644 --- a/router/go.sum +++ b/router/go.sum @@ -175,8 +175,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mazrean/formstream v1.1.1 h1:8CpESXh2jOxSrVRck5LvaLlliNM8k36vlreMB1Y2Gjw= -github.com/mazrean/formstream v1.1.1/go.mod h1:Rz8+Viu/83GqutUEwcbH/dbRM0oZlGMlULiz2QNpq9g= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -321,8 +319,6 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -340,7 +336,6 @@ golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -375,7 +370,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= From 44ef26a78dc85683ed15a46b0a22d406269c8d2d Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 14:19:30 +0530 Subject: [PATCH 19/31] sync workspace --- router-tests/go.sum | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/router-tests/go.sum b/router-tests/go.sum index 3cf2bf53e1..f099302610 100644 --- a/router-tests/go.sum +++ b/router-tests/go.sum @@ -40,7 +40,9 @@ github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0 github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -49,7 +51,9 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -98,6 +102,7 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -116,6 +121,7 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo= github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -214,6 +220,7 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -226,6 +233,7 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= @@ -276,6 +284,7 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g= @@ -370,6 +379,7 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= @@ -431,6 +441,7 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.withmatt.com/connect-brotli v0.4.0 h1:7ObWkYmEbUXK3EKglD0Lgj0BBnnD3jNdAxeDRct3l8E= go.withmatt.com/connect-brotli v0.4.0/go.mod h1:c2eELz56za+/Mxh1yJrlglZ4VM9krpOCPqS2Vxf8NVk= golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -452,10 +463,12 @@ golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -511,6 +524,7 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 5324982f244983aee584952c03ac3c6a6ddb0bfb Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 15:22:59 +0530 Subject: [PATCH 20/31] refactor --- router/core/graphql_prehandler.go | 87 ++------------------------ router/core/parse_multipart.go | 100 ++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 81 deletions(-) create mode 100644 router/core/parse_multipart.go diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 487877152a..5289c6f884 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -5,8 +5,6 @@ import ( "crypto/ecdsa" "fmt" "io" - "mime" - "mime/multipart" "net/http" "os" "strconv" @@ -202,95 +200,22 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { return } } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { - contentType := r.Header.Get("Content-Type") - d, params, err := mime.ParseMediaType(contentType) - if err != nil || d != "multipart/form-data" { - finalErr = errors.New("could not parse multipart request") - writeOperationError(r, w, requestLogger, finalErr) - return - } - - boundary, ok := params["boundary"] - if !ok { - finalErr = errors.New("could not find request boundary") - writeOperationError(r, w, requestLogger, finalErr) - return - } - - reader := multipart.NewReader(r.Body, boundary) - form, err := reader.ReadForm(0) - if err != nil { - finalErr = &inputError{ - message: err.Error(), - statusCode: http.StatusOK, - } - writeOperationError(r, w, requestLogger, finalErr) - return - } - - if len(form.File) > h.maxUploadFiles { - finalErr = &inputError{ - message: fmt.Sprintf("too many files: %d, max allowed: %d", len(form.File), h.maxUploadFiles), - statusCode: http.StatusOK, - } - writeOperationError(r, w, requestLogger, finalErr) - return - } + multipartParser := NewMultipartParser(h.operationProcessor, h.maxUploadFiles, h.maxUploadFileSize) + var fileHandlers []*os.File - body, err = h.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(form.Value["operations"], ""))) + body, files, fileHandlers, err = multipartParser.parse(r, buf) if err != nil { finalErr = err - writeOperationError(r, w, requestLogger, err) + writeOperationError(r, w, requestLogger, finalErr) return } - var manuallyWrittenDiskFiles []*os.File - for _, filePart := range form.File { - file, err := filePart[0].Open() - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - - if filePart[0].Size > int64(h.maxUploadFileSize) { - finalErr = &inputError{ - message: "file too large to upload", - statusCode: http.StatusOK, - } - writeOperationError(r, w, requestLogger, finalErr) - return - } - - // Check if the file was written to the disk - if diskFile, ok := file.(*os.File); ok { - files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) - } else { - // The file is in memory. We write it manually to the disk. - tempFile, err := os.CreateTemp("", "tempfile-") - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - _, err = io.Copy(tempFile, file) - if err != nil { - finalErr = err - writeOperationError(r, w, requestLogger, err) - return - } - manuallyWrittenDiskFiles = append(manuallyWrittenDiskFiles, tempFile) - files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) - } - } - - // Cleanup all files + // Cleanup all files. Must happen in here, so it is run after response is sent. defer func() { - for _, file := range manuallyWrittenDiskFiles { + for _, file := range fileHandlers { file.Close() os.Remove(file.Name()) } - form.RemoveAll() }() } diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go new file mode 100644 index 0000000000..55042ccf76 --- /dev/null +++ b/router/core/parse_multipart.go @@ -0,0 +1,100 @@ +package core + +import ( + "bytes" + "errors" + "fmt" + "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/datasource/httpclient" + "io" + "mime" + "mime/multipart" + "net/http" + "os" + "strings" +) + +type MultipartParser struct { + operationProcessor *OperationProcessor + maxUploadFiles int + maxUploadFileSize int +} + +func NewMultipartParser(operationProcessor *OperationProcessor, maxUploadFiles int, maxUploadFileSize int) *MultipartParser { + return &MultipartParser{ + operationProcessor: operationProcessor, + maxUploadFiles: maxUploadFiles, + maxUploadFileSize: maxUploadFileSize, + } +} + +func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, []*os.File, error) { + var body []byte + var files []httpclient.File + var fileHandlers []*os.File + + contentType := r.Header.Get("Content-Type") + d, params, err := mime.ParseMediaType(contentType) + if err != nil || d != "multipart/form-data" { + return body, files, fileHandlers, err + } + + boundary, ok := params["boundary"] + if !ok { + return body, files, fileHandlers, errors.New("could not find request boundary") + } + + reader := multipart.NewReader(r.Body, boundary) + form, err := reader.ReadForm(0) + if err != nil { + return body, files, fileHandlers, &inputError{ + message: err.Error(), + statusCode: http.StatusOK, + } + } + + if len(form.File) > p.maxUploadFiles { + return body, files, fileHandlers, &inputError{ + message: fmt.Sprintf("too many files: %d, max allowed: %d", len(form.File), p.maxUploadFiles), + statusCode: http.StatusOK, + } + } + + body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(form.Value["operations"], ""))) + if err != nil { + return body, files, fileHandlers, err + } + + for _, filePart := range form.File { + file, err := filePart[0].Open() + if err != nil { + return body, files, fileHandlers, err + } + + if filePart[0].Size > int64(p.maxUploadFileSize) { + return body, files, fileHandlers, &inputError{ + message: "file too large to upload", + statusCode: http.StatusOK, + } + } + + // Check if the file was written to the disk + if diskFile, ok := file.(*os.File); ok { + fileHandlers = append(fileHandlers, diskFile) + files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) + } else { + // The file is in memory. We write it manually to the disk. + tempFile, err := os.CreateTemp("", "cosmo-upload-") + if err != nil { + return body, files, fileHandlers, err + } + _, err = io.Copy(tempFile, file) + if err != nil { + return body, files, fileHandlers, err + } + fileHandlers = append(fileHandlers, tempFile) + files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) + } + } + + return body, files, fileHandlers, nil +} From 9b92de3b293804c404f97d3867159ba2d850dd66 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 15:31:13 +0530 Subject: [PATCH 21/31] close files --- router/core/parse_multipart.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 55042ccf76..3e83494316 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -93,7 +93,10 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h } fileHandlers = append(fileHandlers, tempFile) files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) + tempFile.Close() } + + file.Close() } return body, files, fileHandlers, nil From b6025ee06ef485d84633e184e68a97607e329c05 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 15:35:19 +0530 Subject: [PATCH 22/31] refactor --- router/core/graphql_prehandler.go | 9 ++------ router/core/parse_multipart.go | 36 ++++++++++++++++++------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 5289c6f884..39e38e657b 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "net/http" - "os" "strconv" "strings" "sync" @@ -201,9 +200,8 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { } } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { multipartParser := NewMultipartParser(h.operationProcessor, h.maxUploadFiles, h.maxUploadFileSize) - var fileHandlers []*os.File - body, files, fileHandlers, err = multipartParser.parse(r, buf) + body, files, err = multipartParser.parse(r, buf) if err != nil { finalErr = err writeOperationError(r, w, requestLogger, finalErr) @@ -212,10 +210,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { // Cleanup all files. Must happen in here, so it is run after response is sent. defer func() { - for _, file := range fileHandlers { - file.Close() - os.Remove(file.Name()) - } + multipartParser.removeAll() }() } diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 3e83494316..878d380204 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -17,6 +17,7 @@ type MultipartParser struct { operationProcessor *OperationProcessor maxUploadFiles int maxUploadFileSize int + fileHandlers []*os.File } func NewMultipartParser(operationProcessor *OperationProcessor, maxUploadFiles int, maxUploadFileSize int) *MultipartParser { @@ -27,33 +28,38 @@ func NewMultipartParser(operationProcessor *OperationProcessor, maxUploadFiles i } } -func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, []*os.File, error) { +func (p *MultipartParser) removeAll() { + for _, file := range p.fileHandlers { + file.Close() + os.Remove(file.Name()) + } +} + +func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { var body []byte var files []httpclient.File - var fileHandlers []*os.File - contentType := r.Header.Get("Content-Type") d, params, err := mime.ParseMediaType(contentType) if err != nil || d != "multipart/form-data" { - return body, files, fileHandlers, err + return body, files, err } boundary, ok := params["boundary"] if !ok { - return body, files, fileHandlers, errors.New("could not find request boundary") + return body, files, errors.New("could not find request boundary") } reader := multipart.NewReader(r.Body, boundary) form, err := reader.ReadForm(0) if err != nil { - return body, files, fileHandlers, &inputError{ + return body, files, &inputError{ message: err.Error(), statusCode: http.StatusOK, } } if len(form.File) > p.maxUploadFiles { - return body, files, fileHandlers, &inputError{ + return body, files, &inputError{ message: fmt.Sprintf("too many files: %d, max allowed: %d", len(form.File), p.maxUploadFiles), statusCode: http.StatusOK, } @@ -61,17 +67,17 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(form.Value["operations"], ""))) if err != nil { - return body, files, fileHandlers, err + return body, files, err } for _, filePart := range form.File { file, err := filePart[0].Open() if err != nil { - return body, files, fileHandlers, err + return body, files, err } if filePart[0].Size > int64(p.maxUploadFileSize) { - return body, files, fileHandlers, &inputError{ + return body, files, &inputError{ message: "file too large to upload", statusCode: http.StatusOK, } @@ -79,19 +85,19 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h // Check if the file was written to the disk if diskFile, ok := file.(*os.File); ok { - fileHandlers = append(fileHandlers, diskFile) + p.fileHandlers = append(p.fileHandlers, diskFile) files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) } else { // The file is in memory. We write it manually to the disk. tempFile, err := os.CreateTemp("", "cosmo-upload-") if err != nil { - return body, files, fileHandlers, err + return body, files, err } _, err = io.Copy(tempFile, file) if err != nil { - return body, files, fileHandlers, err + return body, files, err } - fileHandlers = append(fileHandlers, tempFile) + p.fileHandlers = append(p.fileHandlers, tempFile) files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) tempFile.Close() } @@ -99,5 +105,5 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h file.Close() } - return body, files, fileHandlers, nil + return body, files, nil } From da1fc7d2dc98e8582a007616705819a1faee415e Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 15:43:48 +0530 Subject: [PATCH 23/31] refactor --- router/core/parse_multipart.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 878d380204..781822f87f 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -18,6 +18,7 @@ type MultipartParser struct { maxUploadFiles int maxUploadFileSize int fileHandlers []*os.File + form *multipart.Form } func NewMultipartParser(operationProcessor *OperationProcessor, maxUploadFiles int, maxUploadFileSize int) *MultipartParser { @@ -33,6 +34,9 @@ func (p *MultipartParser) removeAll() { file.Close() os.Remove(file.Name()) } + if p.form != nil { + p.form.RemoveAll() + } } func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { @@ -50,7 +54,7 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h } reader := multipart.NewReader(r.Body, boundary) - form, err := reader.ReadForm(0) + p.form, err = reader.ReadForm(0) if err != nil { return body, files, &inputError{ message: err.Error(), @@ -58,19 +62,19 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h } } - if len(form.File) > p.maxUploadFiles { + if len(p.form.File) > p.maxUploadFiles { return body, files, &inputError{ - message: fmt.Sprintf("too many files: %d, max allowed: %d", len(form.File), p.maxUploadFiles), + message: fmt.Sprintf("too many files: %d, max allowed: %d", len(p.form.File), p.maxUploadFiles), statusCode: http.StatusOK, } } - body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(form.Value["operations"], ""))) + body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(p.form.Value["operations"], ""))) if err != nil { return body, files, err } - for _, filePart := range form.File { + for _, filePart := range p.form.File { file, err := filePart[0].Open() if err != nil { return body, files, err From 53adf8e9efea599bd49f9732d8f3292d029ad423 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 15:50:46 +0530 Subject: [PATCH 24/31] refactor --- router/core/parse_multipart.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 781822f87f..0ad9d2ee2c 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -94,6 +94,7 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h } else { // The file is in memory. We write it manually to the disk. tempFile, err := os.CreateTemp("", "cosmo-upload-") + p.fileHandlers = append(p.fileHandlers, tempFile) if err != nil { return body, files, err } @@ -101,13 +102,15 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h if err != nil { return body, files, err } - p.fileHandlers = append(p.fileHandlers, tempFile) files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) - tempFile.Close() } - - file.Close() } + defer func() { + for _, file := range p.fileHandlers { + file.Close() + } + }() + return body, files, nil } From 7f9485759224cb66b179b6a8402f54b5132a5d28 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:05:14 +0530 Subject: [PATCH 25/31] refactor --- router/core/graphql_prehandler.go | 4 +- router/core/parse_multipart.go | 81 ++++++++++++++++++------------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/router/core/graphql_prehandler.go b/router/core/graphql_prehandler.go index 39e38e657b..0edcc7eda1 100644 --- a/router/core/graphql_prehandler.go +++ b/router/core/graphql_prehandler.go @@ -201,7 +201,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { } else if strings.Contains(r.Header.Get("Content-Type"), "multipart/form-data") { multipartParser := NewMultipartParser(h.operationProcessor, h.maxUploadFiles, h.maxUploadFileSize) - body, files, err = multipartParser.parse(r, buf) + body, files, err = multipartParser.Parse(r, buf) if err != nil { finalErr = err writeOperationError(r, w, requestLogger, finalErr) @@ -210,7 +210,7 @@ func (h *PreHandler) Handler(next http.Handler) http.Handler { // Cleanup all files. Must happen in here, so it is run after response is sent. defer func() { - multipartParser.removeAll() + multipartParser.RemoveAll() }() } diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 0ad9d2ee2c..b8ef85f78c 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -29,7 +29,7 @@ func NewMultipartParser(operationProcessor *OperationProcessor, maxUploadFiles i } } -func (p *MultipartParser) removeAll() { +func (p *MultipartParser) RemoveAll() { for _, file := range p.fileHandlers { file.Close() os.Remove(file.Name()) @@ -39,7 +39,49 @@ func (p *MultipartParser) removeAll() { } } -func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { +func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { + // The file is in memory. We write it manually to the disk. + tempFile, err := os.CreateTemp("", "cosmo-upload-") + p.fileHandlers = append(p.fileHandlers, tempFile) + if err != nil { + return body, files, err + } + _, err = io.Copy(tempFile, file) + if err != nil { + return body, files, err + } + files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) + + return body, files, err +} + +func (p *MultipartParser) processFilePart(filePart []*multipart.FileHeader, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { + file, err := filePart[0].Open() + if err != nil { + return body, files, err + } + defer file.Close() + + if filePart[0].Size > int64(p.maxUploadFileSize) { + return body, files, &inputError{ + message: "file too large to upload", + statusCode: http.StatusOK, + } + } + + // Check if the file was written to the disk + if diskFile, ok := file.(*os.File); ok { + p.fileHandlers = append(p.fileHandlers, diskFile) + files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) + } else { + // The file is in memory. We write it manually to the disk. + body, files, err = p.processInMemoryFile(filePart, file, body, files) + } + + return body, files, err +} + +func (p *MultipartParser) Parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { var body []byte var files []httpclient.File contentType := r.Header.Get("Content-Type") @@ -75,42 +117,11 @@ func (p *MultipartParser) parse(r *http.Request, buf *bytes.Buffer) ([]byte, []h } for _, filePart := range p.form.File { - file, err := filePart[0].Open() + body, files, err = p.processFilePart(filePart, body, files) if err != nil { return body, files, err } - - if filePart[0].Size > int64(p.maxUploadFileSize) { - return body, files, &inputError{ - message: "file too large to upload", - statusCode: http.StatusOK, - } - } - - // Check if the file was written to the disk - if diskFile, ok := file.(*os.File); ok { - p.fileHandlers = append(p.fileHandlers, diskFile) - files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) - } else { - // The file is in memory. We write it manually to the disk. - tempFile, err := os.CreateTemp("", "cosmo-upload-") - p.fileHandlers = append(p.fileHandlers, tempFile) - if err != nil { - return body, files, err - } - _, err = io.Copy(tempFile, file) - if err != nil { - return body, files, err - } - files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) - } } - defer func() { - for _, file := range p.fileHandlers { - file.Close() - } - }() - - return body, files, nil + return body, files, err } From 5ce7642661d7713cd851aab7385b50007ab932f3 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:06:09 +0530 Subject: [PATCH 26/31] refactor --- router/core/parse_multipart.go | 1 + 1 file changed, 1 insertion(+) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index b8ef85f78c..07a4f6cbda 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -42,6 +42,7 @@ func (p *MultipartParser) RemoveAll() { func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { // The file is in memory. We write it manually to the disk. tempFile, err := os.CreateTemp("", "cosmo-upload-") + defer tempFile.Close() p.fileHandlers = append(p.fileHandlers, tempFile) if err != nil { return body, files, err From 88aa2f299c6a56fc7fc5eab9cecdb58ababcc3f8 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:07:17 +0530 Subject: [PATCH 27/31] refactor --- router/core/parse_multipart.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 07a4f6cbda..3b64e15709 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -42,11 +42,12 @@ func (p *MultipartParser) RemoveAll() { func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { // The file is in memory. We write it manually to the disk. tempFile, err := os.CreateTemp("", "cosmo-upload-") - defer tempFile.Close() - p.fileHandlers = append(p.fileHandlers, tempFile) if err != nil { return body, files, err } + + defer tempFile.Close() + p.fileHandlers = append(p.fileHandlers, tempFile) _, err = io.Copy(tempFile, file) if err != nil { return body, files, err From 9ef04d440c538fedf3e3fe907ee6cba53c738df1 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:08:01 +0530 Subject: [PATCH 28/31] refactor --- router/core/parse_multipart.go | 1 - 1 file changed, 1 deletion(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 3b64e15709..45fab36b60 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -40,7 +40,6 @@ func (p *MultipartParser) RemoveAll() { } func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { - // The file is in memory. We write it manually to the disk. tempFile, err := os.CreateTemp("", "cosmo-upload-") if err != nil { return body, files, err From 471744e3559550c4fa30251023e6a1254e4b5d54 Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:13:00 +0530 Subject: [PATCH 29/31] refactor --- router/core/parse_multipart.go | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 45fab36b60..464dc99861 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -17,6 +17,8 @@ type MultipartParser struct { operationProcessor *OperationProcessor maxUploadFiles int maxUploadFileSize int + body []byte + files []httpclient.File fileHandlers []*os.File form *multipart.Form } @@ -39,32 +41,32 @@ func (p *MultipartParser) RemoveAll() { } } -func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { +func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File) error { tempFile, err := os.CreateTemp("", "cosmo-upload-") if err != nil { - return body, files, err + return err } defer tempFile.Close() p.fileHandlers = append(p.fileHandlers, tempFile) _, err = io.Copy(tempFile, file) if err != nil { - return body, files, err + return err } - files = append(files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) + p.files = append(p.files, httpclient.NewFile(tempFile.Name(), filePart[0].Filename)) - return body, files, err + return err } -func (p *MultipartParser) processFilePart(filePart []*multipart.FileHeader, body []byte, files []httpclient.File) ([]byte, []httpclient.File, error) { +func (p *MultipartParser) processFilePart(filePart []*multipart.FileHeader) error { file, err := filePart[0].Open() if err != nil { - return body, files, err + return err } defer file.Close() if filePart[0].Size > int64(p.maxUploadFileSize) { - return body, files, &inputError{ + return &inputError{ message: "file too large to upload", statusCode: http.StatusOK, } @@ -73,56 +75,54 @@ func (p *MultipartParser) processFilePart(filePart []*multipart.FileHeader, body // Check if the file was written to the disk if diskFile, ok := file.(*os.File); ok { p.fileHandlers = append(p.fileHandlers, diskFile) - files = append(files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) + p.files = append(p.files, httpclient.NewFile(diskFile.Name(), filePart[0].Filename)) } else { // The file is in memory. We write it manually to the disk. - body, files, err = p.processInMemoryFile(filePart, file, body, files) + err = p.processInMemoryFile(filePart, file) } - return body, files, err + return err } func (p *MultipartParser) Parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { - var body []byte - var files []httpclient.File contentType := r.Header.Get("Content-Type") d, params, err := mime.ParseMediaType(contentType) if err != nil || d != "multipart/form-data" { - return body, files, err + return p.body, p.files, err } boundary, ok := params["boundary"] if !ok { - return body, files, errors.New("could not find request boundary") + return p.body, p.files, errors.New("could not find request boundary") } reader := multipart.NewReader(r.Body, boundary) p.form, err = reader.ReadForm(0) if err != nil { - return body, files, &inputError{ + return p.body, p.files, &inputError{ message: err.Error(), statusCode: http.StatusOK, } } if len(p.form.File) > p.maxUploadFiles { - return body, files, &inputError{ + return p.body, p.files, &inputError{ message: fmt.Sprintf("too many files: %d, max allowed: %d", len(p.form.File), p.maxUploadFiles), statusCode: http.StatusOK, } } - body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(p.form.Value["operations"], ""))) + p.body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(p.form.Value["operations"], ""))) if err != nil { - return body, files, err + return p.body, p.files, err } for _, filePart := range p.form.File { - body, files, err = p.processFilePart(filePart, body, files) + err = p.processFilePart(filePart) if err != nil { - return body, files, err + return p.body, p.files, err } } - return body, files, err + return p.body, p.files, err } From d86db3abdfe48a660400b32fa86b14e68fb2c6ba Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:14:31 +0530 Subject: [PATCH 30/31] fix file name --- router/core/parse_multipart.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index 464dc99861..b0f1d53ca1 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -42,7 +42,7 @@ func (p *MultipartParser) RemoveAll() { } func (p *MultipartParser) processInMemoryFile(filePart []*multipart.FileHeader, file multipart.File) error { - tempFile, err := os.CreateTemp("", "cosmo-upload-") + tempFile, err := os.CreateTemp("", "cosmo-upload-*") if err != nil { return err } From 294839baccc15fd5e738d810a01bf0668560ebae Mon Sep 17 00:00:00 2001 From: thisisnithin Date: Wed, 26 Jun 2024 16:18:50 +0530 Subject: [PATCH 31/31] refactor --- router/core/parse_multipart.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/router/core/parse_multipart.go b/router/core/parse_multipart.go index b0f1d53ca1..e04472f1f9 100644 --- a/router/core/parse_multipart.go +++ b/router/core/parse_multipart.go @@ -17,7 +17,6 @@ type MultipartParser struct { operationProcessor *OperationProcessor maxUploadFiles int maxUploadFileSize int - body []byte files []httpclient.File fileHandlers []*os.File form *multipart.Form @@ -85,44 +84,46 @@ func (p *MultipartParser) processFilePart(filePart []*multipart.FileHeader) erro } func (p *MultipartParser) Parse(r *http.Request, buf *bytes.Buffer) ([]byte, []httpclient.File, error) { + var body []byte + contentType := r.Header.Get("Content-Type") d, params, err := mime.ParseMediaType(contentType) if err != nil || d != "multipart/form-data" { - return p.body, p.files, err + return body, p.files, err } boundary, ok := params["boundary"] if !ok { - return p.body, p.files, errors.New("could not find request boundary") + return body, p.files, errors.New("could not find request boundary") } reader := multipart.NewReader(r.Body, boundary) p.form, err = reader.ReadForm(0) if err != nil { - return p.body, p.files, &inputError{ + return body, p.files, &inputError{ message: err.Error(), statusCode: http.StatusOK, } } if len(p.form.File) > p.maxUploadFiles { - return p.body, p.files, &inputError{ + return body, p.files, &inputError{ message: fmt.Sprintf("too many files: %d, max allowed: %d", len(p.form.File), p.maxUploadFiles), statusCode: http.StatusOK, } } - p.body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(p.form.Value["operations"], ""))) + body, err = p.operationProcessor.ReadBody(buf, strings.NewReader(strings.Join(p.form.Value["operations"], ""))) if err != nil { - return p.body, p.files, err + return body, p.files, err } for _, filePart := range p.form.File { err = p.processFilePart(filePart) if err != nil { - return p.body, p.files, err + return body, p.files, err } } - return p.body, p.files, err + return body, p.files, err }