-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
Quoth ChatGPT:
Use a thin Backend-For-Frontend that calls The Graph when you need:
- Keys/secrets (Graph Studio, private subgraphs, or provider fallbacks) you don’t want to expose in the browser,
- Caching and stability (set
Cache-Control, retries, backoff; shield the UI from Graph hiccups), - Normalization / versioning (subgraph schema changes → keep your API stable),
- Joins with your DB (e.g., merge attestations with your
profilestable or permissions), - Aggregation (leaderboards, counts, “top skills”, pagination windows),
- Rate limiting and abuse protection,
- GDPR/logging control (avoid leaking user traces to third parties directly),
- Consistent formatting across clients (web, mobile).
Pattern:
-
/api/attestations?address=…&skill=…→ your backend:- Queries The Graph,
- Merges/filters with Postgres (optional),
- Responds with a stable DTO,
- Sends cache headers (
s-maxage,stale-while-revalidate) for CDNs.
Reactions are currently unavailable