From 5d946407491208602ebbf1c5989a61b762a2829b Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 21 Jan 2025 15:40:59 +0700 Subject: [PATCH 1/7] fix sidebar --- .idea/.gitignore | 8 ++ .idea/graphql-js.iml | 12 +++ .idea/inspectionProfiles/Project_Default.xml | 6 ++ .idea/misc.xml | 86 +++++++++++++++++++ .idea/modules.xml | 8 ++ .idea/prettier.xml | 7 ++ .idea/vcs.xml | 6 ++ website/next.config.mjs | 2 + website/pages/_meta.ts | 27 +----- website/pages/docs/_meta.ts | 29 +++++++ .../authentication-and-express-middleware.mdx | 0 website/pages/{ => docs}/basic-types.mdx | 0 .../pages/{ => docs}/constructing-types.mdx | 0 website/pages/{ => docs}/defer-stream.mdx | 0 website/pages/{ => docs}/getting-started.mdx | 0 .../pages/{ => docs}/going-to-production.mdx | 0 website/pages/{ => docs}/graphql-clients.mdx | 0 website/pages/{ => docs}/index.mdx | 0 .../{ => docs}/mutations-and-input-types.mdx | 0 website/pages/{ => docs}/object-types.mdx | 0 .../pages/{ => docs}/oneof-input-objects.mdx | 4 +- .../pages/{ => docs}/passing-arguments.mdx | 0 .../running-an-express-graphql-server.mdx | 0 website/tailwind.config.js | 1 - website/vercel.json | 5 ++ 25 files changed, 174 insertions(+), 27 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/graphql-js.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/prettier.xml create mode 100644 .idea/vcs.xml create mode 100644 website/pages/docs/_meta.ts rename website/pages/{ => docs}/authentication-and-express-middleware.mdx (100%) rename website/pages/{ => docs}/basic-types.mdx (100%) rename website/pages/{ => docs}/constructing-types.mdx (100%) rename website/pages/{ => docs}/defer-stream.mdx (100%) rename website/pages/{ => docs}/getting-started.mdx (100%) rename website/pages/{ => docs}/going-to-production.mdx (100%) rename website/pages/{ => docs}/graphql-clients.mdx (100%) rename website/pages/{ => docs}/index.mdx (100%) rename website/pages/{ => docs}/mutations-and-input-types.mdx (100%) rename website/pages/{ => docs}/object-types.mdx (100%) rename website/pages/{ => docs}/oneof-input-objects.mdx (98%) rename website/pages/{ => docs}/passing-arguments.mdx (100%) rename website/pages/{ => docs}/running-an-express-graphql-server.mdx (100%) diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..13566b81b0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/graphql-js.iml b/.idea/graphql-js.iml new file mode 100644 index 0000000000..24643cc374 --- /dev/null +++ b/.idea/graphql-js.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..03d9549ea8 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..2e4278b0b1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..6e57dcb4dd --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000000..df24ab6180 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/website/next.config.mjs b/website/next.config.mjs index 0bb804d8e5..89c61e77c7 100644 --- a/website/next.config.mjs +++ b/website/next.config.mjs @@ -1,5 +1,6 @@ import nextra from 'nextra'; import path from 'node:path'; +import vercel from './vercel.json' with { type: 'json' } const withNextra = nextra({ theme: 'nextra-theme-docs', @@ -27,6 +28,7 @@ export default withNextra({ }); return config; }, + redirects: async () => vercel.redirects, output: 'export', images: { loader: 'custom', diff --git a/website/pages/_meta.ts b/website/pages/_meta.ts index b56f19ce54..fa9eb359e1 100644 --- a/website/pages/_meta.ts +++ b/website/pages/_meta.ts @@ -1,29 +1,8 @@ const meta = { - index: '', - '-- 1': { - type: 'separator', - title: 'GraphQL.JS Tutorial', + docs: { + type: 'page', + title: 'Documentation' }, - 'getting-started': '', - 'running-an-express-graphql-server': '', - 'graphql-clients': '', - 'basic-types': '', - 'passing-arguments': '', - 'object-types': '', - 'mutations-and-input-types': '', - 'authentication-and-express-middleware': '', - '-- 2': { - type: 'separator', - title: 'Advanced Guides', - }, - 'constructing-types': '', - 'oneof-input-objects': 'OneOf input objects', - 'defer-stream': '', - '-- 3': { - type: 'separator', - title: 'FAQ', - }, - 'going-to-production': '', 'api-v16': { type: 'menu', title: 'API', diff --git a/website/pages/docs/_meta.ts b/website/pages/docs/_meta.ts new file mode 100644 index 0000000000..39ac3a1486 --- /dev/null +++ b/website/pages/docs/_meta.ts @@ -0,0 +1,29 @@ +const meta = { + index: '', + '-- 1': { + type: 'separator', + title: 'GraphQL.JS Tutorial', + }, + 'getting-started': '', + 'running-an-express-graphql-server': '', + 'graphql-clients': '', + 'basic-types': '', + 'passing-arguments': '', + 'object-types': '', + 'mutations-and-input-types': '', + 'authentication-and-express-middleware': '', + '-- 2': { + type: 'separator', + title: 'Advanced Guides', + }, + 'constructing-types': '', + 'oneof-input-objects': '', + 'defer-stream': '', + '-- 3': { + type: 'separator', + title: 'FAQ', + }, + 'going-to-production': '', +}; + +export default meta; diff --git a/website/pages/authentication-and-express-middleware.mdx b/website/pages/docs/authentication-and-express-middleware.mdx similarity index 100% rename from website/pages/authentication-and-express-middleware.mdx rename to website/pages/docs/authentication-and-express-middleware.mdx diff --git a/website/pages/basic-types.mdx b/website/pages/docs/basic-types.mdx similarity index 100% rename from website/pages/basic-types.mdx rename to website/pages/docs/basic-types.mdx diff --git a/website/pages/constructing-types.mdx b/website/pages/docs/constructing-types.mdx similarity index 100% rename from website/pages/constructing-types.mdx rename to website/pages/docs/constructing-types.mdx diff --git a/website/pages/defer-stream.mdx b/website/pages/docs/defer-stream.mdx similarity index 100% rename from website/pages/defer-stream.mdx rename to website/pages/docs/defer-stream.mdx diff --git a/website/pages/getting-started.mdx b/website/pages/docs/getting-started.mdx similarity index 100% rename from website/pages/getting-started.mdx rename to website/pages/docs/getting-started.mdx diff --git a/website/pages/going-to-production.mdx b/website/pages/docs/going-to-production.mdx similarity index 100% rename from website/pages/going-to-production.mdx rename to website/pages/docs/going-to-production.mdx diff --git a/website/pages/graphql-clients.mdx b/website/pages/docs/graphql-clients.mdx similarity index 100% rename from website/pages/graphql-clients.mdx rename to website/pages/docs/graphql-clients.mdx diff --git a/website/pages/index.mdx b/website/pages/docs/index.mdx similarity index 100% rename from website/pages/index.mdx rename to website/pages/docs/index.mdx diff --git a/website/pages/mutations-and-input-types.mdx b/website/pages/docs/mutations-and-input-types.mdx similarity index 100% rename from website/pages/mutations-and-input-types.mdx rename to website/pages/docs/mutations-and-input-types.mdx diff --git a/website/pages/object-types.mdx b/website/pages/docs/object-types.mdx similarity index 100% rename from website/pages/object-types.mdx rename to website/pages/docs/object-types.mdx diff --git a/website/pages/oneof-input-objects.mdx b/website/pages/docs/oneof-input-objects.mdx similarity index 98% rename from website/pages/oneof-input-objects.mdx rename to website/pages/docs/oneof-input-objects.mdx index 95be65d2c2..0a968eace7 100644 --- a/website/pages/oneof-input-objects.mdx +++ b/website/pages/docs/oneof-input-objects.mdx @@ -24,7 +24,7 @@ const schema = buildSchema(` shelfNumber: Int! positionOnShelf: Int! } - + input ProductSpecifier @oneOf { id: ID name: String @@ -88,4 +88,4 @@ const schema = new GraphQLSchema({ It doesn't matter whether you have 2 or more inputs here, all that matters is that your user will have to specify one, and only one, for this input to be valid. -The values are not limited to scalars, lists and other input object types are also allowed. \ No newline at end of file +The values are not limited to scalars, lists and other input object types are also allowed. diff --git a/website/pages/passing-arguments.mdx b/website/pages/docs/passing-arguments.mdx similarity index 100% rename from website/pages/passing-arguments.mdx rename to website/pages/docs/passing-arguments.mdx diff --git a/website/pages/running-an-express-graphql-server.mdx b/website/pages/docs/running-an-express-graphql-server.mdx similarity index 100% rename from website/pages/running-an-express-graphql-server.mdx rename to website/pages/docs/running-an-express-graphql-server.mdx diff --git a/website/tailwind.config.js b/website/tailwind.config.js index 4cc2c447a2..5f6a85cd2a 100644 --- a/website/tailwind.config.js +++ b/website/tailwind.config.js @@ -4,7 +4,6 @@ module.exports = { content: [ './pages/**/*.{ts,tsx,mdx}', './icons/**/*.{ts,tsx,mdx}', - './css/**/*.css', './theme.config.tsx', ], theme: { diff --git a/website/vercel.json b/website/vercel.json index cb56ca8a8d..9f11ce21b7 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -4,6 +4,11 @@ "source": "/api", "destination": "/api-v16/graphql", "permanent": true + }, + { + "source": "/", + "destination": "/docs", + "permanent": true } ] } From 013119fcc1d2cc993483d6936976561f74138321 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 21 Jan 2025 15:44:09 +0700 Subject: [PATCH 2/7] rm .idea --- .idea/.gitignore | 8 -- .idea/graphql-js.iml | 12 --- .idea/inspectionProfiles/Project_Default.xml | 6 -- .idea/misc.xml | 86 -------------------- .idea/modules.xml | 8 -- .idea/prettier.xml | 7 -- .idea/vcs.xml | 6 -- 7 files changed, 133 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/graphql-js.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/prettier.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b0..0000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/graphql-js.iml b/.idea/graphql-js.iml deleted file mode 100644 index 24643cc374..0000000000 --- a/.idea/graphql-js.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549ea8..0000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 2e4278b0b1..0000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 6e57dcb4dd..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml deleted file mode 100644 index df24ab6180..0000000000 --- a/.idea/prettier.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbb..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From a46ae202465e7ed2429bea0015e5e5b861291276 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 21 Jan 2025 15:49:33 +0700 Subject: [PATCH 3/7] fix links --- website/pages/docs/basic-types.mdx | 2 +- website/pages/docs/getting-started.mdx | 2 +- website/pages/docs/graphql-clients.mdx | 8 ++++---- website/pages/docs/mutations-and-input-types.mdx | 2 +- website/pages/docs/object-types.mdx | 4 ++-- website/pages/docs/passing-arguments.mdx | 4 ++-- website/pages/docs/running-an-express-graphql-server.mdx | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/docs/basic-types.mdx b/website/pages/docs/basic-types.mdx index b6480a979d..ea68466aa5 100644 --- a/website/pages/docs/basic-types.mdx +++ b/website/pages/docs/basic-types.mdx @@ -112,4 +112,4 @@ console.log('Running a GraphQL API server at localhost:4000/graphql'); If you run this code with `node server.js` and browse to http://localhost:4000/graphql you can try out these APIs. -These examples show you how to call APIs that return different types. To send different types of data into an API, you will also need to learn about [passing arguments to a GraphQL API](/passing-arguments/). +These examples show you how to call APIs that return different types. To send different types of data into an API, you will also need to learn about [passing arguments to a GraphQL API](./passing-arguments). diff --git a/website/pages/docs/getting-started.mdx b/website/pages/docs/getting-started.mdx index 049f35ef13..a8d05ea339 100644 --- a/website/pages/docs/getting-started.mdx +++ b/website/pages/docs/getting-started.mdx @@ -109,4 +109,4 @@ You should see the GraphQL response printed out: Congratulations - you just executed a GraphQL query! -For practical applications, you'll probably want to run GraphQL queries from an API server, rather than executing GraphQL with a command line tool. To use GraphQL for an API server over HTTP, check out [Running an Express GraphQL Server](/running-an-express-graphql-server/). +For practical applications, you'll probably want to run GraphQL queries from an API server, rather than executing GraphQL with a command line tool. To use GraphQL for an API server over HTTP, check out [Running an Express GraphQL Server](./running-an-express-graphql-server). diff --git a/website/pages/docs/graphql-clients.mdx b/website/pages/docs/graphql-clients.mdx index 342193450f..552865c56a 100644 --- a/website/pages/docs/graphql-clients.mdx +++ b/website/pages/docs/graphql-clients.mdx @@ -4,7 +4,7 @@ title: GraphQL Clients Since a GraphQL API has more underlying structure than a REST API, there are more powerful clients like [Relay](https://facebook.github.io/relay/) which can automatically handle batching, caching, and other features. But you don't need a complex client to call a GraphQL server. With `graphql-http`, you can just send an HTTP POST request to the endpoint you mounted your GraphQL server on, passing the GraphQL query as the `query` field in a JSON payload. -For example, let's say we mounted a GraphQL server on http://localhost:4000/graphql as in the example code for [running an Express GraphQL server](/running-an-express-graphql-server/), and we want to send the GraphQL query `{ hello }`. We can do this from the command line with `curl`. If you paste this into a terminal: +For example, let's say we mounted a GraphQL server on http://localhost:4000/graphql as in the example code for [running an Express GraphQL server](./running-an-express-graphql-server), and we want to send the GraphQL query `{ hello }`. We can do this from the command line with `curl`. If you paste this into a terminal: ```bash curl -X POST \ @@ -42,9 +42,9 @@ You should see the data returned, logged in the console: data returned: Object { hello: "Hello world!" } ``` -In this example, the query was just a hardcoded string. As your application becomes more complex, and you add GraphQL endpoints that take arguments as described in [Passing Arguments](/passing-arguments/), you will want to construct GraphQL queries using variables in client code. You can do this by including a keyword prefixed with a dollar sign in the query, and passing an extra `variables` field on the payload. +In this example, the query was just a hardcoded string. As your application becomes more complex, and you add GraphQL endpoints that take arguments as described in [Passing Arguments](./passing-arguments), you will want to construct GraphQL queries using variables in client code. You can do this by including a keyword prefixed with a dollar sign in the query, and passing an extra `variables` field on the payload. -For example, let's say you're running the example server from [Passing Arguments](/passing-arguments/) that has a schema of +For example, let's say you're running the example server from [Passing Arguments](./passing-arguments) that has a schema of ```graphql type Query { @@ -82,4 +82,4 @@ Using this syntax for variables is a good idea because it automatically prevents In general, it will take a bit more time to set up a GraphQL client like Relay, but it's worth it to get more features as your application grows. You might want to start out just using HTTP requests as the underlying transport layer, and switching to a more complex client as your application gets more complex. -At this point you can write a client and server in GraphQL for an API that receives a single string. To do more, you will want to [learn how to use the other basic data types](/basic-types/). +At this point you can write a client and server in GraphQL for an API that receives a single string. To do more, you will want to [learn how to use the other basic data types](./basic-types). diff --git a/website/pages/docs/mutations-and-input-types.mdx b/website/pages/docs/mutations-and-input-types.mdx index 7b4bfa4859..0971d1ae11 100644 --- a/website/pages/docs/mutations-and-input-types.mdx +++ b/website/pages/docs/mutations-and-input-types.mdx @@ -402,4 +402,4 @@ fetch('/graphql', { .then((data) => console.log('data returned:', data)); ``` -One particular type of mutation is operations that change users, like signing up a new user. While you can implement this using GraphQL mutations, you can reuse many existing libraries if you learn about [GraphQL with authentication and Express middleware](/authentication-and-express-middleware/). +One particular type of mutation is operations that change users, like signing up a new user. While you can implement this using GraphQL mutations, you can reuse many existing libraries if you learn about [GraphQL with authentication and Express middleware](./authentication-and-express-middleware). diff --git a/website/pages/docs/object-types.mdx b/website/pages/docs/object-types.mdx index 366620c970..9ef784e71d 100644 --- a/website/pages/docs/object-types.mdx +++ b/website/pages/docs/object-types.mdx @@ -6,7 +6,7 @@ import { Tabs } from 'nextra/components'; In many cases, you don't want to return a number or a string from an API. You want to return an object that has its own complex behavior. GraphQL is a perfect fit for this. -In GraphQL schema language, the way you define a new object type is the same way we have been defining the `Query` type in our examples. Each object can have fields that return a particular type, and methods that take arguments. For example, in the [Passing Arguments](/passing-arguments/) documentation, we had a method to roll some random dice: +In GraphQL schema language, the way you define a new object type is the same way we have been defining the `Query` type in our examples. Each object can have fields that return a particular type, and methods that take arguments. For example, in the [Passing Arguments](./passing-arguments) documentation, we had a method to roll some random dice: @@ -369,4 +369,4 @@ If you run this code with `node server.js` and browse to http://localhost:4000/g This way of defining object types often provides advantages over a traditional REST API. Instead of doing one API request to get basic information about an object, and then multiple subsequent API requests to find out more information about that object, you can get all of that information in one API request. That saves bandwidth, makes your app run faster, and simplifies your client-side logic. -So far, every API we've looked at is designed for returning data. In order to modify stored data or handle complex input, it helps to [learn about mutations and input types](/mutations-and-input-types/). +So far, every API we've looked at is designed for returning data. In order to modify stored data or handle complex input, it helps to [learn about mutations and input types](./mutations-and-input-types). diff --git a/website/pages/docs/passing-arguments.mdx b/website/pages/docs/passing-arguments.mdx index 0017a69638..eb62b49301 100644 --- a/website/pages/docs/passing-arguments.mdx +++ b/website/pages/docs/passing-arguments.mdx @@ -4,7 +4,7 @@ title: Passing Arguments import { Tabs } from 'nextra/components'; -Just like a REST API, it's common to pass arguments to an endpoint in a GraphQL API. By defining the arguments in the schema language, typechecking happens automatically. Each argument must be named and have a type. For example, in the [Basic Types documentation](/basic-types/) we had an endpoint called `rollThreeDice`: +Just like a REST API, it's common to pass arguments to an endpoint in a GraphQL API. By defining the arguments in the schema language, typechecking happens automatically. Each argument must be named and have a type. For example, in the [Basic Types documentation](./basic-types) we had an endpoint called `rollThreeDice`: ```graphql type Query { @@ -221,4 +221,4 @@ fetch('/graphql', { Using `$dice` and `$sides` as variables in GraphQL means we don't have to worry about escaping on the client side. -With basic types and argument passing, you can implement anything you can implement in a REST API. But GraphQL supports even more powerful queries. You can replace multiple API calls with a single API call if you learn how to [define your own object types](/object-types/). +With basic types and argument passing, you can implement anything you can implement in a REST API. But GraphQL supports even more powerful queries. You can replace multiple API calls with a single API call if you learn how to [define your own object types](./object-types). diff --git a/website/pages/docs/running-an-express-graphql-server.mdx b/website/pages/docs/running-an-express-graphql-server.mdx index dbaff0a087..c8ef9305e8 100644 --- a/website/pages/docs/running-an-express-graphql-server.mdx +++ b/website/pages/docs/running-an-express-graphql-server.mdx @@ -114,4 +114,4 @@ app.get('/', (_req, res) => { If you navigate to [http://localhost:4000](http://localhost:4000), you should see an interface that lets you enter queries; now you can use the GraphiQL IDE tool to issue GraphQL queries directly in the browser. -At this point you have learned how to run a GraphQL server. The next step is to learn how to [issue GraphQL queries from client code](/graphql-clients/). +At this point you have learned how to run a GraphQL server. The next step is to learn how to [issue GraphQL queries from client code](./graphql-clients). From 72b0a416acce9646e97da18118d9ac2f9d730fda Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 21 Jan 2025 17:06:17 +0700 Subject: [PATCH 4/7] fix links on index page --- website/pages/docs/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/docs/index.mdx b/website/pages/docs/index.mdx index 4c8fb78b56..7f1e61f04d 100644 --- a/website/pages/docs/index.mdx +++ b/website/pages/docs/index.mdx @@ -7,7 +7,7 @@ GraphQL.JS is the reference implementation to the [GraphQL Specification](https: while closely following the Specification. You can build GraphQL servers, clients, and tools with this library, it's designed so you can choose which parts you use, for example, you can build your own parser -and use the execution/validation from the library. There also a lot of useful utilities for schema-diffing, working with arguments and [many more](./utilities.mdx). +and use the execution/validation from the library. There also a lot of useful utilities for schema-diffing, working with arguments and many more. In the following chapters you'll find out more about the three critical pieces of this library @@ -15,4 +15,4 @@ In the following chapters you'll find out more about the three critical pieces o - Document validation - GraphQL Execution -You can also code along on [a tutorial](./getting-started.mdx). +You can also code along on [a tutorial](/docs/getting-started). From 6c3d4148e9a5036400d3d9689324631d96410899 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 29 Jan 2025 12:03:43 +0100 Subject: [PATCH 5/7] Remove type cast --- website/next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/next.config.mjs b/website/next.config.mjs index 89c61e77c7..194a2a563f 100644 --- a/website/next.config.mjs +++ b/website/next.config.mjs @@ -1,6 +1,6 @@ import nextra from 'nextra'; import path from 'node:path'; -import vercel from './vercel.json' with { type: 'json' } +import vercel from './vercel.json'; const withNextra = nextra({ theme: 'nextra-theme-docs', From 104fde7f1ee06fc23715c718c92908fea993c8ad Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 29 Jan 2025 12:10:10 +0100 Subject: [PATCH 6/7] Standards --- website/next.config.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/next.config.mjs b/website/next.config.mjs index 194a2a563f..737a985d5d 100644 --- a/website/next.config.mjs +++ b/website/next.config.mjs @@ -1,6 +1,9 @@ import nextra from 'nextra'; import path from 'node:path'; -import vercel from './vercel.json'; +import fs from 'node:fs'; + +const fileContents = fs.readFileSync('./vercel.json', 'utf-8'); +const vercel = JSON.parse(fileContents); const withNextra = nextra({ theme: 'nextra-theme-docs', From 5a048cea4318a5a03ab3cd3650c6a1037ea28d5c Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 29 Jan 2025 12:15:13 +0100 Subject: [PATCH 7/7] Update website/pages/_meta.ts --- website/pages/_meta.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/_meta.ts b/website/pages/_meta.ts index fa9eb359e1..9024a4a64e 100644 --- a/website/pages/_meta.ts +++ b/website/pages/_meta.ts @@ -1,7 +1,7 @@ const meta = { docs: { type: 'page', - title: 'Documentation' + title: 'Documentation', }, 'api-v16': { type: 'menu',