Skip to content

new landing — fixes #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: new-landing--what-is-graphql
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,53 @@ on:
- main

jobs:
link-check:
name: Broken link checker
runs-on: ubuntu-latest
link-check:
name: Broken link checker
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build static site
run: pnpm build
- name: Build static site
run: pnpm build

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install lychee
run: cargo install lychee
- name: Install lychee
run: cargo install lychee

- name: Check links
run: lychee --verbose --no-progress './out/**/*.html'
- name: Check links
run: lychee --verbose --no-progress './out/**/*.html'

code-validate:
name: Code snippet and GraphQL validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
code-validate:
name: Code snippet and GraphQL validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run validation w/ annotations
run: pnpm lint:docs:ci
- name: Run validation w/ annotations
run: pnpm lint:docs:ci

- name: Validate code snippets
run: pnpm validate:snippets
- name: Validate code snippets
run: pnpm validate:snippets
20 changes: 17 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"private": true,
"packageManager": "[email protected]",
"scripts": {
"build": "next build && next-image-export-optimizer",
"serve": "pnpx serve out",
"analyze": "ANALYZE=true next build",
"build": "next build && next-image-export-optimizer",
"check:links": "lychee --verbose --no-progress './src/pages/**/*.mdx' --base https://graphql.org",
"dev": "next",
"format": "pnpm format:check --write",
Expand All @@ -17,7 +16,9 @@
"lint:docs:ci": "eslint --ignore-path .gitignore src/pages/learn --format eslint-formatter-github",
"postbuild": "next-sitemap",
"prebuild": "tsx src/get-github-info.ts",
"test": "echo \"no tests\" && exit 1",
"serve": "pnpx serve out",
"test": "playwright test",
"test:ui": "playwright test --ui",
"validate:snippets": "node scripts/validate-snippets.js"
},
"dependencies": {
Expand Down Expand Up @@ -72,9 +73,13 @@
"unist-util-visit": "^5.0.0",
"use-query-params": "^2.2.1"
},
"optionalDependencies": {
"playwright": "^1.54.2"
},
"devDependencies": {
"@graphql-eslint/eslint-plugin": "4.3.0",
"@next/eslint-plugin-next": "^15.3.3",
"@playwright/test": "^1.54.2",
"@svgr/webpack": "^8.1.0",
"@types/codemirror": "5.60.16",
"@types/hast": "3.0.4",
Expand All @@ -99,6 +104,15 @@
"tsx": "^4.19.4",
"typescript": "^5.8.3"
},
"browserslist": [
"chrome >0 and last 2.5 years",
"edge >0 and last 2.5 years",
"safari >0 and last 2.5 years",
"firefox >0 and last 2.5 years",
"and_chr >0 and last 2.5 years",
"and_ff >0 and last 2.5 years",
"ios >0 and last 2.5 years"
],
"pnpm": {
"patchedDependencies": {
"nextra": "patches/nextra.patch"
Expand Down
31 changes: 31 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineConfig, devices } from "@playwright/test"

/**
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: "./test/e2e",
outputDir: "./test/out",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: "html",
use: {
baseURL: "http://localhost:3000",
trace: "on-first-retry",
},

projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],

webServer: {
command: "pnpm dev",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},
})
85 changes: 64 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading