Stuart Clark (Deciphered): JSON:API Views 8.x-1.2
微信内可能无法直接打开本站。请点右上角 ··· → 在浏览器打开,或复制链接。
Stuart Clark (Deciphered): JSON:API Views 8.x-1.2
RSS 官方收录 · 可信分层展示
关键摘要
JSON:API on its own gets you decoupled entities: fetch a node, fetch a set of IDs, done.…
- It doesn't get you the filtering, sorting and pagination that most rea…
- You either reimplement that logic on the frontend, or Drupal ships a h…
- That gap is the same regardless of what's rendering on the other end, …
摘要引擎:抽取
正文提要
JSON:API on its own gets you decoupled entities: fetch a node, fetch a set of IDs, done. It doesn't get you the filtering, sorting and pagination that most real content listings actually need - a list of articles by tag, a paginated product catalogue, an events calendar with a date filter. You either reimplement that logic on the frontend, or Drupal ships a hand-written custom resource for every list on the site. That gap is the same regardless of what's rendering on the other end, React and Next.js, Vue and Nuxt, or anything else that can call an API.
JSON:API Views closes it: whatever a View can already do, a decoupled frontend can ask for over JSON:API, using the access checks and query logic the view already has, no separate endpoint to write or maintain. It's also, not coincidentally, why I still maintain the module at all: it's the backend half of DruxtViews, the piece that makes Views work in Druxt, my own Nuxt-based decoupled Drupal framework.