canvas-data-fetching

Community

Fetch and render Drupal content in Canvas SWR

AuthorAJV009
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Fetching and rendering Drupal content in Canvas components can be complex, requiring repeated setup for JSON:API queries, caching, and relationship handling. This skill provides a cohesive pattern to fetch, cache, and render content lists using SWR and the Drupal JSON:API.

Core Features & Use Cases

  • SWR-based data fetching for caching, revalidation, and responsive UIs
  • JSON:API querying with JsonApiClient and DrupalJsonApiParams for building complex queries
  • Relationship includes and field filtering to fetch related content in a single request
  • Use Case: render a dynamic list of articles with related images and categories that updates as data changes

Quick Start

Create a Canvas component that retrieves Drupal content using JSON:API via JsonApiClient and SWR and renders it in a list.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: canvas-data-fetching
Download link: https://github.com/AJV009/drupal-devkit/archive/main.zip#canvas-data-fetching

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.