Skip to content

Commit 953ff06

Browse files
committed
Merge branch 'source' into graphql-ai-blog
2 parents 497ac87 + 3a8c092 commit 953ff06

File tree

141 files changed

+23478
-1164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+23478
-1164
lines changed

.eslintrc.cjs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ const MARKDOWN_EXT = "md,mdx"
55

66
module.exports = {
77
root: true,
8-
plugins: ["@graphql-eslint", "mdx", "@typescript-eslint", "tailwindcss"],
8+
plugins: [
9+
"@graphql-eslint",
10+
"mdx",
11+
"@typescript-eslint",
12+
"tailwindcss",
13+
"react",
14+
"@next/next",
15+
"react-hooks",
16+
],
917
overrides: [
1018
{
1119
files: [`**/*.{${CODE_EXT}}`],
@@ -14,8 +22,42 @@ module.exports = {
1422
"plugin:@typescript-eslint/recommended",
1523
"plugin:tailwindcss/recommended",
1624
"prettier",
25+
"plugin:@next/next/recommended",
26+
"plugin:react-hooks/recommended-legacy",
27+
"plugin:react/recommended",
1728
],
1829
rules: {
30+
"react/react-in-jsx-scope": "off", // TS checks this
31+
"react/prop-types": "off", // and this
32+
"no-undef": "off", // and this too
33+
// This is type checking for projects without `@types/react`. Disabled due to false positives.
34+
"react/no-unknown-property": "off",
35+
36+
"react/no-unescaped-entities": [
37+
"warn", // quotes and apostrophes are okay
38+
{
39+
forbid: [
40+
{
41+
char: "<",
42+
alternatives: ["&lt;"],
43+
},
44+
{
45+
char: ">",
46+
alternatives: ["&gt;"],
47+
},
48+
{
49+
char: "{",
50+
alternatives: ["&#123;"],
51+
},
52+
{
53+
char: "}",
54+
alternatives: ["&#125;"],
55+
},
56+
],
57+
},
58+
],
59+
"@next/next/no-img-element": "off", // straight up upsell, small `img`s actually don't need optimization
60+
1961
"tailwindcss/classnames-order": "off",
2062
"@typescript-eslint/no-restricted-imports": [
2163
"error",
@@ -41,6 +83,9 @@ module.exports = {
4183
tailwindcss: {
4284
whitelist: ["roboto-mono"],
4385
},
86+
react: {
87+
version: "detect",
88+
},
4489
},
4590
},
4691
{
@@ -63,6 +108,8 @@ module.exports = {
63108
},
64109
rules: {
65110
"mdx/remark": "error",
111+
"no-unused-expressions": "off",
112+
"react/jsx-no-undef": "off",
66113
},
67114
},
68115
{
@@ -90,7 +137,9 @@ module.exports = {
90137
{
91138
files: [
92139
`src/pages/blog/**/*.{${MARKDOWN_EXT}}`,
140+
`src/pages/graphql-js/running-an-express-graphql-server.mdx`,
93141
`src/code/**/*.{${MARKDOWN_EXT}}`,
142+
`src/app/conf/**/*.{${MARKDOWN_EXT}}`,
94143
],
95144
rules: {
96145
// Disable `remark-lint-first-heading-level` since in blogs we don't want to enforce the first heading to be an `h1`

.github/workflows/prettier.yml renamed to .github/workflows/check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Prettier Check
1+
name: Lint and check formatting
22

33
on: pull_request
44

@@ -16,5 +16,9 @@ jobs:
1616

1717
- name: Install Dependencies
1818
run: pnpm i
19+
20+
- name: Run ESLint
21+
run: pnpm lint --quiet
22+
1923
- name: Run Prettier Check
2024
run: pnpm format:check

.github/workflows/conference-sync.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Sched's API rate limits are very limited, so we sync non-critical part of the data on a cron.
2+
on:
3+
workflow_dispatch:
4+
# schedule:
5+
# - cron: "*/10 * * * *" # every ten minutes
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Sync conference data from Sched
17+
run: |
18+
tsx scripts/sync-sched/sync.ts --year 2025
19+
env:
20+
SCHED_ACCESS_TOKEN_2025: ${{ secrets.SCHED_ACCESS_TOKEN_2025 }}
21+
22+
- name: Commit changes
23+
uses: stefanzweifel/git-auto-commit-action@v5
24+
with:
25+
file_pattern: "scripts/sync-sched/*.json"
26+
commit_message: "Sync conference data from Sched"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@ src/__generated__/
6161
.next/
6262
public/sitemap.xml
6363
out/
64+
65+
tsconfig.tsbuildinfo

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ pnpm-lock.yaml
44
!src/pages/blog/2024-04-11-announcing-new-graphql-website/index.mdx
55
!src/pages/blog/2024-08-15-graphql-local-initiative.mdx
66
!src/pages/community/foundation/community-grant.mdx
7+
!src/pages/blog/2025-06-01-graphiql-4/index.mdx
78
*.jpg
9+
10+
scripts/sync-sched/*.json
11+
src/github-stats.json

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ There are many ways to get involved. Follow this guide and feel free to [reach o
2020
- [Add a resource to the Community page](#add-a-resource-to-the-community-page)
2121
- [Add a question to the FAQ](#add-a-question-to-the-faq)
2222
- [Write a new section or guide](#write-a-new-section-or-guide)
23+
- [Add a blog post](#add-a-blog-post)
2324
- [Making changes to the code](#making-changes-to-the-code)
2425
- [Browser support](#browser-support)
2526
- [Contributing something else](#contributing-something-else)
@@ -149,6 +150,12 @@ Then, use our [development guide](#development-guide) to determine where your ne
149150

150151
Once it's ready for review, please [open a pull request](https://github.com/graphql/graphql.github.io/pulls).
151152

153+
### Add a blog post
154+
155+
This repository holds the [graphql.org blog](https://graphql.org/blog/) at [source/src/pages/blog](https://github.com/graphql/graphql.github.io/tree/source/src/pages/blog). Blog posts may contain announcements, news, best practices and more.
156+
157+
Contributions are very welcome!
158+
152159
## Making changes to the code
153160

154161
Before diving into any code updates, please [open an issue](https://github.com/graphql/graphql.github.io/issues/new) describing the change(s) you'd like to make.

next.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ export default withLess(
2727
withNextra({
2828
// reactStrictMode: true, provoke duplicated codemirror editors
2929
webpack(config) {
30+
// #region MDX
31+
const mdxRule = config.module.rules.find(rule =>
32+
rule.test?.test?.(".mdx"),
33+
)
34+
if (mdxRule) {
35+
mdxRule.resourceQuery = {
36+
not: /raw/,
37+
}
38+
}
39+
// Instead of transforming MDX, with ?source we can get
40+
// the raw content to process in a Server Component.
41+
config.module.rules.push({
42+
test: /\.mdx$/i,
43+
resourceQuery: /raw/,
44+
type: "asset/source",
45+
})
46+
// #endregion MDX
47+
48+
// #region SVGs
3049
const fileLoaderRule = config.module.rules.find(rule =>
3150
rule.test?.test?.(".svg"),
3251
)
@@ -62,6 +81,7 @@ export default withLess(
6281
},
6382
},
6483
)
84+
// #endregion SVGs
6585

6686
return config
6787
},

package.json

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,74 +21,79 @@
2121
},
2222
"dependencies": {
2323
"@graphql-tools/schema": "10.0.15",
24-
"@headlessui/react": "^1.7.17",
25-
"@radix-ui/react-radio-group": "^1.1.3",
24+
"@headlessui/react": "^2.2.4",
25+
"@radix-ui/react-radio-group": "^1.2.2",
2626
"@tailwindcss/container-queries": "^0.1.1",
2727
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
28-
"@tailwindcss/typography": "^0.5.10",
29-
"autoprefixer": "^10.4.17",
30-
"clsx": "^2.1.0",
28+
"@tailwindcss/typography": "^0.5.15",
29+
"autoprefixer": "^10.4.20",
30+
"calendar-link": "^2.10.0",
31+
"clsx": "^2.1.1",
3132
"codemirror": "^5.65.19",
3233
"codemirror-graphql": "1.3.2",
3334
"date-fns": "^2.30.0",
34-
"fast-glob": "^3.3.2",
35+
"fast-glob": "^3.3.3",
36+
"github-slugger": "2.0.0",
3537
"graphql": "16.10.0",
3638
"gray-matter": "^4.0.3",
3739
"hast-util-to-string": "3.0.1",
38-
"iframe-resizer-react": "^1.1.0",
40+
"iframe-resizer-react": "^1.1.1",
3941
"leaflet": "^1.9.4",
4042
"lucide-react": "^0.469.0",
41-
"markdown-to-jsx": "^7.4.0",
43+
"markdown-to-jsx": "^7.7.2",
4244
"marked": "5.1.2",
4345
"motion": "^12.11.0",
44-
"next": "^14.2.5",
45-
"next-image-export-optimizer": "^1.12.3",
46-
"next-query-params": "^5.0.0",
46+
"next": "^14.2.22",
47+
"next-image-export-optimizer": "^1.18.0",
48+
"next-query-params": "^5.0.1",
4749
"next-sitemap": "^4.2.3",
4850
"next-with-less": "^3.0.1",
4951
"nextra": "3.0.0-alpha.28",
5052
"nextra-theme-docs": "3.0.0-alpha.28",
5153
"numbro": "2.5.0",
5254
"p-limit": "^4.0.0",
5355
"parser-front-matter": "1.6.4",
54-
"postcss": "^8.4.33",
56+
"postcss": "^8.4.49",
5557
"react": "^18.3.1",
5658
"react-dom": "^18.3.1",
5759
"react-medium-image-zoom": "5.2.13",
5860
"react-use-measure": "^2.1.7",
5961
"rss": "1.2.2",
6062
"server-only": "0.0.1",
6163
"string-similarity": "^4.0.4",
62-
"string-strip-html": "^13.4.5",
63-
"tailwindcss": "^3.4.1",
64+
"string-strip-html": "^13.4.8",
65+
"tailwindcss": "^3.4.17",
6466
"timeago.js": "4.0.2",
6567
"unified": "11.0.5",
6668
"unist-util-visit": "^5.0.0",
6769
"use-query-params": "^2.2.1"
6870
},
6971
"devDependencies": {
7072
"@graphql-eslint/eslint-plugin": "4.3.0",
71-
"@svgr/webpack": "^8.0.1",
72-
"@types/codemirror": "5.60.7",
73+
"@next/eslint-plugin-next": "^15.3.3",
74+
"@svgr/webpack": "^8.1.0",
75+
"@types/codemirror": "5.60.16",
7376
"@types/hast": "3.0.4",
74-
"@types/node": "^22.10.2",
75-
"@types/react": "^18.2.73",
77+
"@types/node": "^22.10.5",
78+
"@types/react": "^18.3.18",
7679
"@types/rss": "0.0.32",
7780
"@types/string-similarity": "^4.0.2",
7881
"@typescript-eslint/eslint-plugin": "7.18.0",
7982
"@typescript-eslint/parser": "7.18.0",
8083
"eslint": "8.57.1",
8184
"eslint-config-prettier": "^9.1.0",
8285
"eslint-plugin-mdx": "^3.1.5",
86+
"eslint-plugin-react": "^7.37.5",
87+
"eslint-plugin-react-hooks": "^5.2.0",
8388
"eslint-plugin-tailwindcss": "3.17.5",
84-
"prettier": "3.4.2",
85-
"prettier-plugin-pkg": "^0.18.1",
86-
"prettier-plugin-tailwindcss": "^0.6.9",
89+
"prettier": "3.5.3",
90+
"prettier-plugin-pkg": "^0.20.0",
91+
"prettier-plugin-tailwindcss": "^0.6.12",
8792
"remark-frontmatter": "5.0.0",
8893
"remark-lint-first-heading-level": "3.1.2",
8994
"remark-lint-heading-increment": "3.1.2",
90-
"tsx": "^4.7.0",
91-
"typescript": "^5.4.3"
95+
"tsx": "^4.19.4",
96+
"typescript": "^5.8.3"
9297
},
9398
"pnpm": {
9499
"patchedDependencies": {

patches/[email protected]

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,18 @@ index af0891e3c2084edd326f40e6e18107b193640e0b..885858fa17285fb75649cf0ebd2576d1
99
import { createElement } from "react";
1010
const DEFAULT_COMPONENTS = {
1111
img: (props) => createElement(
12+
diff --git a/package.json b/package.json
13+
index 0625691ebc1d79d7b7d22bb3b001f00a57519772..53d4b0c951a762ae056004789c9aca819e0ade62 100644
14+
--- a/package.json
15+
+++ b/package.json
16+
@@ -20,6 +20,10 @@
17+
"import": "./dist/server/remark-plugins/index.js",
18+
"types": "./dist/server/remark-plugins/index.d.ts"
19+
},
20+
+ "./rehype-plugins": {
21+
+ "import": "./dist/server/rehype-plugins/index.js",
22+
+ "types": "./dist/server/rehype-plugins/index.d.ts"
23+
+ },
24+
"./hooks": {
25+
"import": "./dist/client/hooks/index.js",
26+
"types": "./dist/client/hooks/index.d.ts"

0 commit comments

Comments
 (0)