Skip to content

Commit

Permalink
WOrk around prettier bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Oct 6, 2022
1 parent 953c7ea commit 2d5e759
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ module.exports = {
printWidth: 120,
},
},
{
// Due to the following Prettier issue, it's unsafe to proseWrap MDX currently
// https://github.com/prettier/prettier/issues/13586
files: ["**/website/**/*.mdx", "**/website/**/*.md"],
options: {
proseWrap: "preserve",
},
},
{
files: "grafast/grafast/vendor/graphql-js/**",
options: {
Expand Down
13 changes: 6 additions & 7 deletions grafast/website/grafast/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ const planResolvers = {

As you can see, the shape of the logic is quite similar, but the <grafast />
plan resolvers are synchronous since their job isn't to get the data to use, but
instead to outline the steps required to get the data. As the `friends`
<grafast /> plan resolver cannot explicitly loop through the data (it hasn't
instead to outline the steps required to get the data. As the
`friends` <grafast /> plan resolver cannot explicitly loop through the data (it hasn't
been fetched yet!), it uses an `each` helper to detail which steps to take for
each item made available later.

Expand Down Expand Up @@ -165,9 +165,8 @@ If you want to explore this example more, please see the

_This is just an overview, for full documentation see [lifecycle][lifecycle]._

All plan lifecycle methods are optional, and due to the always-batched nature of

<grafast /> plans you can get good performance without using any of them.
All plan lifecycle methods are optional, and due to the always-batched nature
of <grafast /> plans you can get good performance without using any of them.
However, if you leverage them, your performance can go from "good" to :sparkles:
amazing :rocket:.

Expand All @@ -184,8 +183,8 @@ As a very approximate overview:

### Deduplicate

**Deduplicate** lets a step indicate which of its siblings (defined by
<grafast />) are equivalent to it. One of these siblings can then, if possible,
**Deduplicate** lets a step indicate which of its siblings (defined
by <grafast />) are equivalent to it. One of these siblings can then, if possible,
replace the new step, thereby reducing the number of steps in the plan.

### Optimize
Expand Down
4 changes: 2 additions & 2 deletions postgraphile/website/postgraphile/usage-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ const postgraphileOptions = {
### API: `postgraphile(pgConfig, schemaName, options)`

The `postgraphile` middleware factory function takes three arguments, all of
which are optional. The below options are valid for
<tt>[email protected]</tt>.
which are optional. The below options are valid
for <tt>[email protected]</tt>.

- **`pgConfig`**: Specifies the PostgreSQL database you wish to connect to. You
may pass a PostgreSQL connection string, a configuration object to pass to the
Expand Down
4 changes: 2 additions & 2 deletions postgraphile/website/postgraphile/usage-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ a GraphQLSchema object.

The returned GraphQLSchema will **not** be updated when your database changes -
if you require "watch" functionality, please use `watchPostGraphileSchema`
instead (see below). The below options are valid for
<tt>[email protected]</tt>.
instead (see below). The below options are valid
for <tt>[email protected]</tt>.

- **`pgConfig`**: An object or string that will be passed to the [`pg`][]
library and used to connect to a PostgreSQL backend. If you already have a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ const postgraphileOptions = {
### API: `postgraphile(pgConfig, schemaName, options)`

The `postgraphile` middleware factory function takes three arguments, all of
which are optional. The below options are valid for
<tt>[email protected]</tt>.
which are optional. The below options are valid
for <tt>[email protected]</tt>.

- **`pgConfig`**: Specifies the PostgreSQL database you wish to connect to. You
may pass a PostgreSQL connection string, a configuration object to pass to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ a GraphQLSchema object.

The returned GraphQLSchema will **not** be updated when your database changes -
if you require "watch" functionality, please use `watchPostGraphileSchema`
instead (see below). The below options are valid for
<tt>[email protected]</tt>.
instead (see below). The below options are valid
for <tt>[email protected]</tt>.

- **`pgConfig`**: An object or string that will be passed to the [`pg`][]
library and used to connect to a PostgreSQL backend. If you already have a
Expand Down

0 comments on commit 2d5e759

Please sign in to comment.