Skip to content

Commit c726f98

Browse files
authored
chore(gatsby-plugin-graphql-config): README typos (#27009)
1 parent fe46735 commit c726f98

File tree

1 file changed

+20
-17
lines changed
  • packages/gatsby-plugin-graphql-config

1 file changed

+20
-17
lines changed

packages/gatsby-plugin-graphql-config/README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,57 @@
11
# gatsby-plugin-graphql-config
22

3-
Persists gatsby graphql schema and fragments to the .cache directory, as well as a [graphql config](https://graphql-config.com) file to enable full-featured tooling for:
3+
Persists Gatsby GraphQL schema and fragments to the `.cache` directory, as well as a [GraphQL Config](https://graphql-config.com) file to enable full-featured tooling for:
44

55
- [`vscode-graphql`](https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql), and other IDE extensions that use the official GraphQL LSP
66
- [`eslint-plugin-graphql`](https://github.com/apollographql/eslint-plugin-graphql)
7-
- [`graphql code generator`](https://graphql-code-generator.com/) for gatsby projects using typescript
7+
- [`graphql code generator`](https://graphql-code-generator.com/) for Gatsby projects using TypeScript
88
- eventually [`graphiql`](https://github.com/graphql/graphiql) will use it, even!
99

1010
## Install
1111

12-
`npm install --save gatsby-plugin-graphql-config`
12+
```shell
13+
npm install gatsby-plugin-graphql-config
14+
```
1315

1416
## How to use
1517

1618
First, add it to your plugin configuration:
1719

1820
```javascript
1921
// In your gatsby-config.js
22+
2023
plugins: [`gatsby-plugin-graphql-config`]
2124
```
2225

23-
**simplest setup**:
24-
if you are able to configure your tools to seek a different `basePath` for loading graphql config, point them to `.cache` directory.
26+
### Simplest setup
2527

26-
**manual setup for repos with no other graphql projects**:
28+
If you are able to configure your tools to seek a different `basePath` for loading GraphQL Config, point them to `.cache` directory.
2729

28-
If your project is _only_ a gatsby project, you can place a `graphql.config.js` file at the root of your gatsby project like this:
30+
### Manual setup for repositories with no other GraphQL projects
2931

30-
`<my project>/graphql.config.js`:
32+
If your project is _only_ a Gatsby project, you can place a `graphql.config.js` file at the root of your Gatsby project like this:
3133

32-
```js
34+
```javascript
3335
// <my project>/graphql.config.js
36+
3437
module.exports = require("./.cache/graphql.config.json")
3538
```
3639

37-
if it's in a subdirectory such as a `site/` folder, you would use this:
40+
If it's in a subdirectory such as a `site/` folder, you would use this:
3841

39-
`<my project>/graphql.config.js`:
42+
```javascript
43+
// <my project>/graphql.config.js
4044

41-
```js
4245
module.exports = require("./site/.cache/graphql.config.json")
4346
```
4447

45-
**for repositories with multiple graphql projects**
48+
### Manual setup for repositories with multiple GraphQL projects
4649

47-
if your repository has multiple graphql projects including gatsby, you will want a config similar to this at the root:
50+
If your repository has multiple GraphQL projects including Gatsby, you will want a config similar to this at the root:
4851

49-
`<my project>/graphql.config.js`:
52+
```javascript
53+
// <my project>/graphql.config.js
5054

51-
```js
5255
module.exports = {
5356
projects: {
5457
site: require("packages/site/.cache/graphql.config.json"),
@@ -62,7 +65,7 @@ module.exports = {
6265

6366
### How it works
6467

65-
It writes out these files to the gatsby `.cache` directory:
68+
It writes out these files to the Gatsby `.cache` directory:
6669

6770
- `schema.graphql` - a complete representation of the schema, including plugins
6871
- `fragments.graphql` - all user, plugin and gatsby-core provided fragments in one file

0 commit comments

Comments
 (0)