Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# vscode-apollo-relay

[![npm](https://img.shields.io/npm/v/vscode-apollo-relay.svg)](https://www.npmjs.com/package/vscode-apollo-relay)
Expand Down Expand Up @@ -29,9 +30,21 @@ In your `apollo.config.js` file:

```js
const { config } = require("vscode-apollo-relay").generateConfig()
// If you want to debug the config, uncomment the following line
// console.log(JSON.stringify(config))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think JSON.stringify was introducing all those nulls in the validationRules` array. Perhaps something like this would be better? (Untested code.)

console.log(util.inspect(config, false, null, true))

// You have to restart Visual Code after installing and check the output of Apollo GraphQL (next to the Terimal window)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line would probably work better as its own paragraph outside of the code block and perhaps include a screenshot that shows the output pane, rather than trying to describe it with “next to the Terminal window”. What do you think?

module.exports = config
```

If you use [relay-config], don't forget to specify the language
```javascript
// relay.config.js
module.exports = {
..............
language: 'typescript',
}
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section may not be necessary, as I would normally expect this to be implied and applies to all of the config entries. Perhaps the docs should be amended to instead state something like “be sure to specify all configuration required to run relay-compiler in your relay.config.js file”?


Or, if you don’t use [relay-config] and the default values don’t work for you:

```js
Expand Down