Overview
Composables
Nuxt KQL offers intuitive composables to return data for KQL queries or Kirby API requests. All composables are auto-imported and globally available inside your <script setup>
.
To query data with KQL, you can use the following composables:
If you want to retrieve data from the Kirby API (generally available at /api
), you can use:
Type Declarations
Common types are importable from the #nuxt-kql
module alias:
An example use case would be a reactive query using a typed ref():
ts
const query = ref<KirbyQueryRequest>({
query: 'site',
select: ['title', 'isListed']
})