Skip to main content

Function: useNodesBySubkind()

useNodesBySubkind(subkind, params, options): UseQueryResult<NodesResponse, Error>

Defined in: web/lib/hooks/use-nodes.ts:299

Fetches nodes by subkind.

Parameters​

subkind​

string

Subkind slug (e.g., 'document-format', 'license')

params​

NodeListParams = {}

List parameters

options​

UseNodeOptions = {}

Hook options

Returns​

UseQueryResult<NodesResponse, Error>

Query result with nodes

Example​

// Get all document formats
const { data } = useNodesBySubkind('document-format');

// Get all established licenses
const { data } = useNodesBySubkind('license', { status: 'established' });