Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment about debugging config + add comment specifying the language #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RichardLindhout
Copy link

No description provided.

Copy link
Member

@alloy alloy left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for taking a first stab at this! 🙏

@@ -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))
// You have to restart Visual Code after installing and check the output of Apollo GraphQL (next to the Terimal window)
Copy link
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?

@@ -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
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))

..............
language: 'typescript',
}
```
Copy link
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”?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants