Skip to content

Add the wires / API gateway section #39

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 59 commits into
base: new-landing--data-colocation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d52eeed
wip
hasparus Jul 30, 2025
425a13a
wip
hasparus Jul 31, 2025
f26d592
Add missing Webkit prefixes for older Chrome.
hasparus Jul 31, 2025
0c4ea61
wip
hasparus Jul 31, 2025
39ddc6a
simplify
hasparus Jul 31, 2025
abb1b30
wip
hasparus Jul 31, 2025
3e13f54
wip
hasparus Jul 31, 2025
b620c29
Animate wires
hasparus Jul 31, 2025
668991d
Add a TODO comment
hasparus Jul 31, 2025
5887575
Bugfix mobile Data Colocation section
hasparus Aug 1, 2025
a4b08a9
Remove redundant comment
hasparus Aug 1, 2025
8b927d9
Make the step transition nice
hasparus Aug 1, 2025
7c9dcb6
wip
hasparus Aug 1, 2025
0b62b46
wip
hasparus Aug 1, 2025
65d09f2
Okay, this is pretty good
hasparus Aug 1, 2025
8655478
Tweak styles
hasparus Aug 1, 2025
b7ac078
Change gql keyword color
hasparus Aug 1, 2025
90c4f73
Update Search input and Kbd styles
hasparus Aug 2, 2025
309a4f4
Run format
hasparus Aug 2, 2025
4764b3f
Revert to old footer links, simplify the code
hasparus Aug 3, 2025
7746fef
Tweak the navbar link styles
hasparus Aug 3, 2025
308e1a5
Polish the footer links
hasparus Aug 3, 2025
7d1a444
Improve data allocation layout for tablets
hasparus Aug 3, 2025
353acab
Highlight query
hasparus Aug 3, 2025
2ae8782
wip (transition between 2 and 3 still bad)
hasparus Aug 3, 2025
67ca7c8
wip
hasparus Aug 3, 2025
d9945d8
Fix Safari
hasparus Aug 3, 2025
8978300
Rotate queries in X axis
hasparus Aug 4, 2025
5a29f2b
Fix styles
hasparus Aug 4, 2025
960a8be
Make the What is GraphQL illustration taller on mobiles
hasparus Aug 4, 2025
0f9e11d
Fix sponsor logos on Safari
hasparus Aug 4, 2025
a47623f
Fix social icon colors if user localStorage color scheme doesn't matc…
hasparus Aug 4, 2025
29eff63
Fix double spins (again)
hasparus Aug 4, 2025
5ed6b36
Disable overscroll-y in Safari to make the hero look less weird
hasparus Aug 4, 2025
23f3320
Fix Nicolai's pic, remove scroll-snap
hasparus Aug 4, 2025
01af07b
Add shrink-0 to fix Safari
hasparus Aug 4, 2025
8fb4feb
Format
hasparus Aug 4, 2025
e45c502
Tweak mobile styles
hasparus Aug 5, 2025
54c1d40
Fix lint error (bad class)
hasparus Aug 5, 2025
a6c237e
Add a subtle background to Hero
hasparus Aug 5, 2025
30b8e3e
Update copy and add shrink-0
hasparus Aug 5, 2025
15b3bca
Speed up the animation by 2x
hasparus Aug 5, 2025
6aa5253
Bump the stroke width
hasparus Aug 5, 2025
7d79c20
Add serve:build script
hasparus Aug 5, 2025
5b55dde
Change h4 to h3 to fix the order
hasparus Aug 5, 2025
a09c97d
Add aria-label to company logos
hasparus Aug 5, 2025
cc19e84
Add fetchPriority to ImageLoaded and use it in Hero
hasparus Aug 5, 2025
7690281
Move hero to a directory
hasparus Aug 5, 2025
442e2c8
Add aria-label to social icons
hasparus Aug 5, 2025
641adb6
Add aria-label, change blur logo to webp
hasparus Aug 5, 2025
15b6b1a
Add description
hasparus Aug 5, 2025
e50c521
Add longer texts with sr-only
hasparus Aug 5, 2025
64e2b34
Inherit tabIndex in Pre
hasparus Aug 5, 2025
8ac3b92
Run image export optimizer
hasparus Aug 6, 2025
7da99eb
post-audit improvements
hasparus Aug 6, 2025
422ea02
Add fetchpriority=low
hasparus Aug 6, 2025
462bb4a
Add fetchPriority=low to testimonials images
hasparus Aug 6, 2025
9e3e27d
Add bundle analyzer
hasparus Aug 6, 2025
9855c27
Add meta description
hasparus Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"tailwindCSS.classFunctions": ["clsx"]
"tailwindCSS.classFunctions": ["clsx"],
"editor.quickSuggestions": {
"strings": "on"
}
}
256 changes: 138 additions & 118 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import nextra from "nextra"
import path from "node:path"
import withLess from "next-with-less"
import nextBundleAnalyzer from "@next/bundle-analyzer"
import fs from "fs"

import { remarkGraphiQLComment } from "./src/remark-graphiql-comment.js"
Expand All @@ -29,130 +30,149 @@ const ALLOWED_SVG_REGEX = new RegExp(`${sep}icons${sep}.+\\.svg$`)
/**
* @type {import('next').NextConfig}
*/
export default withLess(
withNextra({
// reactStrictMode: true, provoke duplicated codemirror editors
webpack(config) {
// #region MDX
const mdxRule = config.module.rules.find(rule =>
rule.test?.test?.(".mdx"),
)
if (mdxRule) {
mdxRule.resourceQuery = {
not: /raw/,
}
const config = {
// reactStrictMode: true, provoke duplicated codemirror editors
webpack(config) {
// #region MDX
const mdxRule = config.module.rules.find(rule => rule.test?.test?.(".mdx"))
if (mdxRule) {
mdxRule.resourceQuery = {
not: /raw/,
}
// Instead of transforming MDX, with ?source we can get
// the raw content to process in a Server Component.
config.module.rules.push({
test: /\.mdx$/i,
resourceQuery: /raw/,
type: "asset/source",
})
// #endregion MDX
}
// Instead of transforming MDX, with ?source we can get
// the raw content to process in a Server Component.
config.module.rules.push({
test: /\.mdx$/i,
resourceQuery: /raw/,
type: "asset/source",
})
// #endregion MDX

// #region SVGs
const fileLoaderRule = config.module.rules.find(rule =>
rule.test?.test?.(".svg"),
)
// #region SVGs
const fileLoaderRule = config.module.rules.find(rule =>
rule.test?.test?.(".svg"),
)

fileLoaderRule.exclude = /\.svg$/i
fileLoaderRule.exclude = /\.svg$/i

config.module.rules.push(
// All .svg from /icons/ and with ?svgr are going to be processed by @svgr/webpack
{
test: ALLOWED_SVG_REGEX,
use: ["@svgr/webpack"],
},
{
test: /\.svg$/i,
exclude: ALLOWED_SVG_REGEX,
resourceQuery: /svgr/,
use: [
{
loader: "@svgr/webpack",
options: {
dimensions: false, // **adds** viewBox.
config.module.rules.push(
// All .svg from /icons/ and with ?svgr are going to be processed by @svgr/webpack
{
test: ALLOWED_SVG_REGEX,
use: ["@svgr/webpack"],
},
{
test: /\.svg$/i,
exclude: ALLOWED_SVG_REGEX,
resourceQuery: /svgr/,
use: [
{
loader: "@svgr/webpack",
options: {
typescript: true,
svgoConfig: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
minifyStyles: false,
removeViewBox: false,
removeTitle: false,
},
},
},
"removeXMLNS",
"removeXlink",
"prefixIds",
],
},
},
],
},
// Otherwise, we use the default file loader
{
...fileLoaderRule,
test: /\.svg$/i,
exclude: ALLOWED_SVG_REGEX,
resourceQuery: {
not: [...fileLoaderRule.resourceQuery.not, /svgr/],
},
],
},
// Otherwise, we use the default file loader
{
...fileLoaderRule,
test: /\.svg$/i,
exclude: ALLOWED_SVG_REGEX,
resourceQuery: {
not: [...fileLoaderRule.resourceQuery.not, /svgr/],
},
)
// #endregion SVGs
},
)
// #endregion SVGs

return config
},
output: "export",
images: {
loader: "custom",
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
},
transpilePackages: ["next-image-export-optimizer"],
env: {
nextImageExportOptimizer_imageFolderPath: "public/images",
nextImageExportOptimizer_exportFolderPath: "out",
nextImageExportOptimizer_quality: "75",
nextImageExportOptimizer_storePicturesInWEBP: "true",
nextImageExportOptimizer_exportFolderName: "nextImageExportOptimizer",
// If you do not want to use blurry placeholder images, then you can set
// nextImageExportOptimizer_generateAndUseBlurImages to false and pass
// `placeholder="empty"` to all <ExportedImage> components.
nextImageExportOptimizer_generateAndUseBlurImages: "true",
// If you want to cache the remote images, you can set the time to live of the cache in seconds.
// The default value is 0 seconds.
nextImageExportOptimizer_remoteImageCacheTTL: "0",
NEXT_PUBLIC_GA_ID:
process.env.NODE_ENV === "production" ? "UA-44373548-16" : "",
},
headers: async () => {
return [
{
source: "/graphql",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*",
},
{
key: "Access-Control-Allow-Methods",
value: "GET, POST, OPTIONS",
},
{
key: "Access-Control-Allow-Headers",
value: "Content-Type",
},
],
},
]
},
trailingSlash: true,
// Only for local development, skip 200 statusCode due following error:
//
// `statusCode` is not undefined or valid statusCode for route {"source":"/conf/attendee/:path*","destination":"https://graphql-conf-attendee-nextjs.vercel.app/:path*","statusCode":200}
// `statusCode` is not undefined or valid statusCode for route {"source":"/swapi-graphql/:path*","destination":"https://graphql.github.io/swapi-graphql/:path*","statusCode":200}
// Valid redirect statusCode values are 301, 302, 303, 307, 308
redirects: () => vercelJSON.redirects.filter(o => o.statusCode !== 200),
async rewrites() {
return [
{
source: "/swapi-graphql/:path*",
destination: "https://swapi-graphql.netlify.app/:path*",
},
{
source: "/graphql",
destination: "https://swapi-graphql.netlify.app/graphql",
},
]
},
}),
)
return config
},
output: "export",
images: {
loader: "custom",
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
},
transpilePackages: ["next-image-export-optimizer"],
env: {
nextImageExportOptimizer_imageFolderPath: "public/images",
nextImageExportOptimizer_exportFolderPath: "out",
nextImageExportOptimizer_quality: "75",
nextImageExportOptimizer_storePicturesInWEBP: "true",
nextImageExportOptimizer_exportFolderName: "nextImageExportOptimizer",
// If you do not want to use blurry placeholder images, then you can set
// nextImageExportOptimizer_generateAndUseBlurImages to false and pass
// `placeholder="empty"` to all <ExportedImage> components.
nextImageExportOptimizer_generateAndUseBlurImages: "true",
// If you want to cache the remote images, you can set the time to live of the cache in seconds.
// The default value is 0 seconds.
nextImageExportOptimizer_remoteImageCacheTTL: "0",
NEXT_PUBLIC_GA_ID:
process.env.NODE_ENV === "production" ? "UA-44373548-16" : "",
},
headers: async () => {
return [
{
source: "/graphql",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*",
},
{
key: "Access-Control-Allow-Methods",
value: "GET, POST, OPTIONS",
},
{
key: "Access-Control-Allow-Headers",
value: "Content-Type",
},
],
},
]
},
trailingSlash: true,
// Only for local development, skip 200 statusCode due following error:
//
// `statusCode` is not undefined or valid statusCode for route {"source":"/conf/attendee/:path*","destination":"https://graphql-conf-attendee-nextjs.vercel.app/:path*","statusCode":200}
// `statusCode` is not undefined or valid statusCode for route {"source":"/swapi-graphql/:path*","destination":"https://graphql.github.io/swapi-graphql/:path*","statusCode":200}
// Valid redirect statusCode values are 301, 302, 303, 307, 308
redirects: () => vercelJSON.redirects.filter(o => o.statusCode !== 200),
async rewrites() {
return [
{
source: "/swapi-graphql/:path*",
destination: "https://swapi-graphql.netlify.app/:path*",
},
{
source: "/graphql",
destination: "https://swapi-graphql.netlify.app/graphql",
},
]
},
}

const withBundleAnalyzer = nextBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
})

export default withBundleAnalyzer(withLess(withNextra(config)))
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"packageManager": "[email protected]",
"scripts": {
"build": "next build && next-image-export-optimizer",
"serve": "pnpx serve out",
"analyze": "ANALYZE=true next build",
"check:links": "lychee --verbose --no-progress './src/pages/**/*.mdx' --base https://graphql.org",
"dev": "next",
"format": "pnpm format:check --write",
Expand All @@ -15,13 +17,14 @@
"lint:docs:ci": "eslint --ignore-path .gitignore src/pages/learn --format eslint-formatter-github",
"postbuild": "next-sitemap",
"prebuild": "tsx src/get-github-info.ts",
"start": "next start",
"test": "echo \"no tests\" && exit 1",
"validate:snippets": "node scripts/validate-snippets.js"
},
"dependencies": {
"@graphql-tools/schema": "10.0.23",
"@headlessui/react": "^2.2.4",
"@igorkowalczyk/is-browser": "^5.1.0",
"@next/bundle-analyzer": "^15.4.5",
"@radix-ui/react-radio-group": "^1.2.2",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
Expand Down
Loading
Loading