Skip to content

Commit

Permalink
[deploy_website] Update generate-schema.md (#3074)
Browse files Browse the repository at this point in the history
corrected grammar
  • Loading branch information
Negotiamini authored and ardatan committed Jun 15, 2021
1 parent 8eb13ff commit e5241cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
key: ${{ runner.os }}-16-16-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-16-16-yarn-
- name: Align TypeScript version with typedoc
run: node scripts/install-typedocs-typescript-version.js
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines && git checkout yarn.lock
- name: Deploy 🚀
Expand Down
16 changes: 16 additions & 0 deletions scripts/install-typedocs-typescript-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { writeFileSync } = require('fs');
const { resolve } = require('path');
const { argv, cwd } = require('process');

const typeDocsVersion = require('typedoc/package.json');
const pkgPath = resolve(cwd(), './package.json');

const pkg = require(pkgPath);

const version = argv[2];

pkg.resolutions = pkg.resolutions || {};

pkg.resolutions.typescript = typeDocsVersion.peerDependencies.typescript;

writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), 'utf8');
2 changes: 1 addition & 1 deletion website/docs/generate-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const jsSchema = makeExecutableSchema({
});
```

- `typeDefs` is a required argument and should be an GraphQL schema language string or array of GraphQL schema language strings or a function that takes no arguments and returns an array of GraphQL schema language strings. The order of the strings in the array is not important, but it must include a schema definition.
- `typeDefs` is a required argument and should be a GraphQL schema language string or an array of GraphQL schema language strings or a function that takes no arguments and returns an array of GraphQL schema language strings. The order of the strings in the array is not important, but it must include a schema definition.

- `resolvers` is an optional argument _(empty object by default)_ and should be an object or an array of objects that follow the pattern explained in [article on resolvers](/docs/resolvers/)

Expand Down

0 comments on commit e5241cc

Please sign in to comment.