Skip to content

Commit

Permalink
docs(README): update example with using ESM (#998)
Browse files Browse the repository at this point in the history
Follow #909
  • Loading branch information
kachick authored Dec 26, 2024
1 parent 662de75 commit 4dbe90f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### Validation

```js
const { validate } = require("@octokit/graphql-schema");
import { validate } from "@octokit/graphql-schema";
const errors = validate(`
{
viewer {
Expand All @@ -24,7 +24,7 @@ const errors = validate(`
You can also load the current Schema directly as JSON or [IDL](https://en.wikipedia.org/wiki/Interface_description_language).

```js
const { schema } = require("@octokit/graphql-schema");
import { schema } from "@octokit/graphql-schema";
schema.json; // JSON version
schema.idl; // IDL version
```
Expand Down

0 comments on commit 4dbe90f

Please sign in to comment.