Skip to content

Commit 0b7fa31

Browse files
committed
Allow ESM note
1 parent 9c1a829 commit 0b7fa31

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

website/pages/docs/getting-started.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { Tabs } from 'nextra/components';
1111

1212
## Prerequisites
1313

14-
Before getting started, you should have Node v6 installed, although the examples should mostly work in previous versions of Node as well.
14+
Before getting started, you should have atleast Node 20 installed, the examples can be tweaked to work with Node versions
15+
before that by switching to require syntax.
1516
For this guide, we won't use any language features that require transpilation, but we will use some ES6 features like
1617
[Promises](http://web.dev/articles/promises/), classes,
1718
and arrow functions, so if you aren't familiar with them you might want to read up on them first.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ import {
103103
GraphQLInputObjectType,
104104
GraphQLNonNull,
105105
} from 'graphql';
106+
import { randomBytes } from 'node:crypto';
106107

107108
// Maps username to content
108109
const fakeDatabase = {};
@@ -156,7 +157,6 @@ const schema = new GraphQLSchema({
156157
},
157158
resolve: (_, { input }) => {
158159
// Create a random id for our "database".
159-
import { randomBytes } from 'crypto';
160160
const id = randomBytes(10).toString('hex');
161161
fakeDatabase[id] = input;
162162
return {

0 commit comments

Comments
 (0)