Set up graphql for requests

This commit is contained in:
Quinn Hegeman
2026-03-07 18:51:46 +01:00
parent 770198bb5b
commit f914b7db1c
6 changed files with 1202 additions and 538 deletions

View File

@@ -1,14 +1,14 @@
// @ts-check
import { defineConfig } from 'astro/config';
import preact from '@astrojs/preact';
import tailwindcss from '@tailwindcss/vite';
import graphql from '@rollup/plugin-graphql';
// https://astro.build/config
export default defineConfig({
integrations: [preact()],
vite: {
plugins: [tailwindcss()]
plugins: [tailwindcss(), graphql()]
}
});

1720
astro/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,11 +11,13 @@
"dependencies": {
"@astrojs/preact": "^4.1.3",
"@directus/sdk": "^21.2.0",
"@rollup/plugin-graphql": "^2.0.5",
"@tailwindcss/vite": "^4.2.1",
"astro": "^5.17.1",
"mdast-util-to-string": "^4.0.0",
"preact": "^10.28.4",
"reading-time": "^1.5.0",
"tailwindcss": "^4.2.1"
"tailwindcss": "^4.2.1",
"tslib": "^2.8.1"
}
}

5
astro/src/graphql.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
declare module '*.graphql' {
import { DocumentNode } from 'graphql';
const Schema: DocumentNode;
export default Schema;
}

5
astro/src/types/common/images.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
type PhotoProps = {
url: string;
width: number;
height: number;
}

View File

@@ -11,7 +11,7 @@
"jsx": "react-jsx",
"jsxImportSource": "preact",
"paths": {
"@/*": ["./*"]
"@/*": ["./src/*"]
}
}
}