Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Create graphql.config.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterp committed Oct 12, 2020
1 parent 1f6a5c1 commit 1929376
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions graphql.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { getConfig } = require('@redwoodjs/internal')

const config = getConfig()

module.exports = {
schema: `http://${config.api.host}:${config.api.port}/graphql`,
}

3 comments on commit 1929376

@thedavidprice
Copy link
Contributor

Choose a reason for hiding this comment

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

@peterp These are hard to track without a PR or explanation. I'd like to include this in the Release Notes for v0.20.0. I Will reference this commit. Curious about the rationale for adding this?

@peterp
Copy link
Collaborator Author

@peterp peterp commented on 1929376 Oct 22, 2020

Choose a reason for hiding this comment

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

Ah, sorry @thedavidprice. I thought I would add it myself to the release notes. I demoed the VSCode GraphQL extension two weeks ago that allows you to validate, and auto-complete, your schema. This config is required for that extension to work properly.

@thedavidprice
Copy link
Contributor

Choose a reason for hiding this comment

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

AH, thank you, and totally remember now. So. many. things.

Should we then also add the extension to the recommendation list here:
https://github.com/redwoodjs/create-redwood-app/blob/main/.vscode/extensions.json

Please sign in to comment.