Persisted documents by default?

Aperta
#392 0 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
graphql
Ambito
api

Direzione di ricerca

Inizia leggendo le proposte in #370 e #379 insieme a questa issue, quindi esamina i documenti persistiti, gli URL dei documenti persistiti e il lavoro su Golden Path a cui si fa riferimento qui. L’issue non indica file né test; sarà completata solo quando il progetto avrà preso una decisione sul comportamento predefinito dei documenti attendibili e sulle modifiche al tooling e al protocollo necessarie per supportarlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Persisted documents are a great bandwidth optimization, but when used as a "document allow list" (aka "trusted documents" - just those approved by your engineering team) they're also a significant security protection, avoiding the need to protect your endpoint against arbitrary potentially malicious documents.

Not all APIs can support "trusted documents" - the GitHub and Shopify public APIs for example are expected to run queries from untrusted third parties - but most GraphQL APIs are only intended to be used with an organization's own applications (web/mobile/desktop/CLI/service-to-service/etc).

If we launched GraphQL today, given what we know now, I think we would want to make trusted documents the default experience[^1] so that users were protected by default. Those who wished to accept arbitrary documents could opt into that more dangerous behavior - whether that be for public APIs or just for LLM-written queries - and know that they need to add additional protections.

Since #370 and #379 are proposing dropping backward-compatibility anyway, I thought it would be worth discussing if we should go the whole hog and really encourage the patterns of GraphQL usage we'd like to see by default going forward.

Note: GitHub is currently having an outage w.r.t. seeing pull requests, so I can't pull up the persisted documents, persisted documents URLs, and related PRs currently.

[^1]: This would also involve improving the tooling and protocols around it, streamlining it to ease usage - something I intend to work on as part of the Golden Path.

Lingua principale
JavaScript
Stelle
428
Fork
70
Merge medio
11m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di graphql/graphql-over-http

Tutte le issue di graphql/graphql-over-http

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.