Skip to content

Commit 4c32a02

Browse files
authored
Revert website on next to 16.x.x version (#4577)
All changes not currently in 16.x.x were extracted into #4551 This PR aligns next and v17-alpha (which is next rebased on 16.x.x), so after we switch to v17-alpha (the next version of next), proper attribution and history of all changes will be preserved. This commit just allows us to prove more decisively that next and v17-alpha are content equivalent.
1 parent 0103072 commit 4c32a02

18 files changed

+817
-93
lines changed

website/.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/pages/_document.tsx
2+
/pages/_app.tsx

website/docs/tutorials/defer-stream.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

website/next.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/* eslint-disable camelcase */
2-
import path from 'node:path';
31
import fs from 'node:fs';
2+
import path from 'node:path';
3+
4+
import nextra from 'nextra';
45

56
const fileContents = fs.readFileSync('./vercel.json', 'utf-8');
67
const vercel = JSON.parse(fileContents);
78

8-
import nextra from 'nextra';
9-
109
const withNextra = nextra({
1110
theme: 'nextra-theme-docs',
1211
themeConfig: './theme.config.tsx',
@@ -33,7 +32,7 @@ export default withNextra({
3332
});
3433
return config;
3534
},
36-
redirects: async () => vercel.redirects,
35+
redirects: () => vercel.redirects,
3736
output: 'export',
3837
images: {
3938
loader: 'custom',
@@ -42,6 +41,7 @@ export default withNextra({
4241
},
4342
transpilePackages: ['next-image-export-optimizer'],
4443
env: {
44+
/* eslint-disable camelcase */
4545
nextImageExportOptimizer_imageFolderPath: 'public/images',
4646
nextImageExportOptimizer_exportFolderPath: 'out',
4747
nextImageExportOptimizer_quality: '75',
@@ -54,6 +54,7 @@ export default withNextra({
5454
// If you want to cache the remote images, you can set the time to live of the cache in seconds.
5555
// The default value is 0 seconds.
5656
nextImageExportOptimizer_remoteImageCacheTTL: '0',
57+
/* eslint-enable camelcase */
5758
},
5859
trailingSlash: true,
5960
});

website/pages/_app.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
/* eslint-disable camelcase, new-cap, react/react-in-jsx-scope, react/no-unknown-property */
2+
13
import type { AppProps } from 'next/app';
24
import { Roboto_Flex, Roboto_Mono } from 'next/font/google';
35

6+
// eslint-disable-next-line import/no-unassigned-import
47
import '../css/globals.css';
58

69
const robotoFlex = Roboto_Flex({

website/pages/_document.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Html, Head, Main, NextScript } from 'next/document';
1+
/* eslint-disable react/react-in-jsx-scope */
2+
3+
import { Head, Html, Main, NextScript } from 'next/document';
24

35
export default function Document() {
46
return (

website/pages/api-v16/language.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const editedAST = visit(ast, {
219219

220220
Alternatively to providing enter() and leave() functions, a visitor can
221221
instead provide functions named the same as the kinds of AST nodes, or
222-
enter/leave visitors at a named key, leading to four permutations of
222+
enter/leave visitors at a named key, leading to three permutations of
223223
visitor API:
224224

225225
1. Named visitors triggered when entering a node a specific kind.
@@ -261,23 +261,6 @@ visit(ast, {
261261
});
262262
```
263263

264-
4. Parallel visitors for entering and leaving nodes of a specific kind.
265-
266-
```js
267-
visit(ast, {
268-
enter: {
269-
Kind(node) {
270-
// enter the "Kind" node
271-
},
272-
},
273-
leave: {
274-
Kind(node) {
275-
// leave the "Kind" node
276-
},
277-
},
278-
});
279-
```
280-
281264
### `BREAK`
282265

283266
The sentinel `BREAK` value described in the documentation of `visitor`.

website/pages/docs/_meta.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ const meta = {
3838
'using-directives': '',
3939
'authorization-strategies': '',
4040
'-- 4': {
41+
type: 'separator',
42+
title: 'Testing',
43+
},
44+
'testing-graphql-servers': '',
45+
'testing-approaches': '',
46+
'testing-operations': '',
47+
'testing-resolvers': '',
48+
'testing-best-practices': '',
49+
'-- 5': {
4150
type: 'separator',
4251
title: 'Production & Scaling',
4352
},

website/pages/docs/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ graphql({
7878
schema,
7979
source: '{ hello }',
8080
}).then((response) => {
81-
console.log(JSON.stringify(response, null, 2));
81+
console.log(response);
8282
});
8383
```
8484
</Tabs.Tab>

website/pages/docs/mutations-and-input-types.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -230,26 +230,6 @@ type Query {
230230
getMessages: [Message]
231231
}
232232
233-
const root = {
234-
getMessage: ({ id }) => {
235-
return fakeDatabase[id]
236-
},
237-
getMessages: () => {
238-
return Object.values(fakeDatabase)
239-
},
240-
createMessage: ({ input }) => {
241-
const id = String(Object.keys(fakeDatabase).length + 1)
242-
const message = new Message(id, input)
243-
fakeDatabase[id] = message
244-
return message
245-
},
246-
updateMessage: ({ id, input }) => {
247-
const message = fakeDatabase[id]
248-
Object.assign(message, input)
249-
return message
250-
}
251-
}
252-
253233
type Mutation {
254234
createMessage(input: MessageInput): Message
255235
updateMessage(id: ID!, input: MessageInput): Message
@@ -265,6 +245,26 @@ class Message {
265245
}
266246
}
267247

248+
const root = {
249+
getMessage: ({ id }) => {
250+
return fakeDatabase[id]
251+
},
252+
getMessages: () => {
253+
return Object.values(fakeDatabase)
254+
},
255+
createMessage: ({ input }) => {
256+
const id = String(Object.keys(fakeDatabase).length + 1)
257+
const message = new Message(id, input)
258+
fakeDatabase[id] = message
259+
return message
260+
},
261+
updateMessage: ({ id, input }) => {
262+
const message = fakeDatabase[id]
263+
Object.assign(message, input)
264+
return message
265+
}
266+
}
267+
268268
const app = express();
269269
app.all(
270270
'/graphql',

website/pages/docs/running-an-express-graphql-server.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The simplest way to run a GraphQL API server is to use [Express](https://express
1313
npm install express graphql-http graphql --save
1414
```
1515

16-
Let's modify our hello world example so that it's an API server rather than a script that runs a single query. We can use the 'express' module to run a web server, and instead of executing a query directly with the `graphql` function, we can use the `graphql-http` library to mount a GraphQL API server on the /graphql HTTP endpoint:
16+
Let's modify our "hello world" example so that it's an API server rather than a script that runs a single query. We can use the 'express' module to run a webserver, and instead of executing a query directly with the `graphql` function, we can use the `graphql-http` library to mount a GraphQL API server on the "/graphql" HTTP endpoint:
1717

1818
<Tabs items={['SDL', 'Code']}>
1919
<Tabs.Tab>

0 commit comments

Comments
 (0)