Skip to content

Latest commit

Β 

History

History
82 lines (54 loc) Β· 1.58 KB

README.md

File metadata and controls

82 lines (54 loc) Β· 1.58 KB

πŸ‘‰πŸ»β€Query —

This Astro integration allows you to use SQL queries inside your components using PRQL.

πŸš€ Installation

There are two ways to add integrations to your project. Let's try the most convenient option first!

astro add command

Astro includes a CLI tool for adding first party integrations: astro add. This command will:

  1. (Optionally) Install all necessary dependencies and peer dependencies
  2. (Also optionally) Update your astro.config.* file to apply this integration

To install @playform/query, run the following from your project directory and follow the prompts:

Using NPM:

npx astro add @playform/query

Using Yarn:

yarn astro add @playform/query

Using PNPM:

pnpx astro add @playform/query

Install dependencies manually

First, install the @playform/query integration like so:

npm install -D -E @playform/query

Then, apply this integration to your astro.config.* file using the integrations property:

astro.config.ts

import query from "@playform/query";

export default { integrations: [query()] };

Getting started

Set Logger to 0 if you do not want to see debug messages. Default is 2.

astro.config.ts

import query from "@playform/query";

export default {
	integrations: [
		query({
			Logger: 0,
		}),
	],
};

Changelog

See CHANGELOG.md for a history of changes to this integration.