-
Notifications
You must be signed in to change notification settings - Fork 13
Add comment about debugging config + add comment specifying the language #28
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| # vscode-apollo-relay | ||
|
|
||
| [](https://www.npmjs.com/package/vscode-apollo-relay) | ||
|
|
@@ -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) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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', | ||
| } | ||
| ``` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| Or, if you don’t use [relay-config] and the default values don’t work for you: | ||
|
|
||
| ```js | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
JSON.stringifywas introducing all thosenulls in thevalidationRules` array. Perhaps something like this would be better? (Untested code.)