kleros-v2 icon indicating copy to clipboard operation
kleros-v2 copied to clipboard

feat(web-devtools): shift-gql-request-to-server-side

Open Harman-singh-waraich opened this issue 5 months ago • 3 comments

  • 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.
  • 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.
  • Bug Fixes

    • Adjusted GraphQL request handling to streamline data fetching and improve efficiency.

Harman-singh-waraich avatar Sep 13 '24 11:09 Harman-singh-waraich