kleros-v2
kleros-v2 copied to clipboard
feat(web-devtools): shift-gql-request-to-server-side
- experimenting using server actions to hide api keys
PR-Codex overview
This PR updates GraphQL fetching logic, adds new enums, components for manual ruling, and changes subgraph URLs.
Detailed summary
- Updated GraphQL fetching logic to use
gqlRequest
function. - Added
RULING_MODE
enum with Manual, AutomaticPreset, and RandomPreset. - Added components for manual ruling:
ChangeDeveloper
,ManualRuling
. - Changed subgraph URLs in
.env.local.example
. - Refactored components and imports in several files.
The following files were skipped due to too many changes:
web-devtools/src/app/(main)/ruler/RulingModes.tsx
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
Summary by CodeRabbit
-
New Features
- Introduced a new
gqlRequest
function for making GraphQL requests, allowing for flexible queries based on parameters.
- Introduced a new
-
Improvements
- Updated environment variable handling for GraphQL URLs by removing the
NEXT_PUBLIC_
prefix, enhancing configuration strategies. - Simplified GraphQL request process by integrating URL resolution within the new
gqlRequest
function.
- Updated environment variable handling for GraphQL URLs by removing the
-
Bug Fixes
- Adjusted GraphQL request handling to streamline data fetching and improve efficiency.