Skip to content

Commit

Permalink
Add cspell checker
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin committed Nov 24, 2021
1 parent d6a6262 commit 6e03d33
Show file tree
Hide file tree
Showing 9 changed files with 1,304 additions and 774 deletions.
2 changes: 1 addition & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: '12' } }]],
plugins: [
'./resources/load-staticly-from-npm.js',
'./resources/load-statically-from-npm.js',
'@babel/plugin-transform-flow-strip-types',
],
overrides: [
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ the parameters:
provided raw JSON will always be returned instead of GraphiQL even when
loaded from a browser.

GraphQL will first look for each parameter in the URL's query-string:
GraphQL will first look for each parameter in the query string of a URL:

```
/graphql?query=query+getUser($id:ID){user(id:$id){name}}&variables={"id":"4"}
Expand Down Expand Up @@ -205,7 +205,7 @@ const session = require('koa-session');
const graphqlHTTP = require('koa-graphql');

const app = new Koa();
app.keys = ['some secret hurr'];
app.keys = ['some secret'];
app.use(session(app));
app.use(function* (next) {
this.session.id = 'me';
Expand Down Expand Up @@ -259,7 +259,7 @@ const graphqlHTTP = require('koa-graphql');

const app = new Koa();

app.keys = ['some secret hurr'];
app.keys = ['some secret'];
app.use(session(app));

const extensions = ({
Expand Down Expand Up @@ -365,7 +365,7 @@ router.all(
);
```

[List of available CodeMirror themas](https://codemirror.net/demo/theme.html)
[List of available CodeMirror themes](https://codemirror.net/demo/theme.html)

or an object with `url` and `name` properties where `url` should lead to
your custom theme and `name` would be passed to the `GraphiQL`
Expand All @@ -392,7 +392,7 @@ For details see the [GraphiQL spec](https://github.com/graphql/graphiql/tree/mas

GraphQL's [validation phase](https://graphql.github.io/graphql-spec/#sec-Validation) checks the query to ensure that it can be successfully executed against the schema. The `validationRules` option allows for additional rules to be run during this phase. Rules are applied to each node in an AST representing the query using the Visitor pattern.

A validation rule is a function which returns a visitor for one or more node Types. Below is an example of a validation preventing the specific fieldname `metadata` from being queried. For more examples see the [`specifiedRules`](https://github.com/graphql/graphql-js/tree/main/src/validation/rules) in the [graphql-js](https://github.com/graphql/graphql-js) package.
A validation rule is a function which returns a visitor for one or more node Types. Below is an example of a validation preventing the specific field name `metadata` from being queried. For more examples see the [`specifiedRules`](https://github.com/graphql/graphql-js/tree/main/src/validation/rules) in the [graphql-js](https://github.com/graphql/graphql-js) package.

```js
import { GraphQLError } from 'graphql';
Expand Down
34 changes: 34 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"language": "en",
"ignorePaths": [
// Copied from '.gitignore', please keep it in sync.
".eslintcache",
"node_modules",
"coverage",
"dist",
"flow-typed",
"__tests__",

// Excluded from spelling check
"cspell.json",
"package.json",
"package-lock.json",
"tsconfig.json"
],
"words": [
"graphiql",
"unfetch",
"noindex",
"codecov",
"recognise",
"serializable",
"subcommand",
"charsets",
"downlevel",

// TODO: remove bellow words
"Graphi", // GraphiQL
"QL's", // GraphQL's
"graphql's" // express-graphql's
]
}
Loading

0 comments on commit 6e03d33

Please sign in to comment.