diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-14 11:52:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-14 11:53:08 +0900 |
| commit | 2889b562e64993482bd13fd806af8ed0865bab8b (patch) | |
| tree | 39400ac4d994fb33d2c544e7d4b9d98f8ecbd86a /backend/graphql/resolver/auth_helpers.go | |
| parent | e216c3bc97994b4172d15d52b46d5f6b75f35ea4 (diff) | |
| download | feedaka-2889b562e64993482bd13fd806af8ed0865bab8b.tar.gz feedaka-2889b562e64993482bd13fd806af8ed0865bab8b.tar.zst feedaka-2889b562e64993482bd13fd806af8ed0865bab8b.zip | |
refactor: migrate API from GraphQL to REST (TypeSpec/OpenAPI)
Replace the entire GraphQL stack (gqlgen, urql, graphql-codegen) with a
TypeSpec → OpenAPI 3.x pipeline using oapi-codegen for Go server stubs
and openapi-fetch + openapi-typescript for the frontend client.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'backend/graphql/resolver/auth_helpers.go')
| -rw-r--r-- | backend/graphql/resolver/auth_helpers.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/backend/graphql/resolver/auth_helpers.go b/backend/graphql/resolver/auth_helpers.go deleted file mode 100644 index dcc09fb..0000000 --- a/backend/graphql/resolver/auth_helpers.go +++ /dev/null @@ -1,29 +0,0 @@ -package resolver - -import ( - "context" - "errors" - "fmt" - - "github.com/labstack/echo/v4" - appcontext "undef.ninja/x/feedaka/context" -) - -// getUserIDFromContext retrieves the authenticated user ID from context -// This is a wrapper around the GetUserID function from the context package -func getUserIDFromContext(ctx context.Context) (int64, error) { - userID, ok := appcontext.GetUserID(ctx) - if !ok { - return 0, fmt.Errorf("authentication required") - } - return userID, nil -} - -// Helper function to get Echo context from GraphQL context -func getEchoContext(ctx context.Context) (echo.Context, error) { - echoCtx, ok := ctx.Value("echo").(echo.Context) - if !ok { - return nil, errors.New("echo context not found") - } - return echoCtx, nil -} |
