This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 424
[GM-835] Update documentation for environment variables #878
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,24 +31,14 @@ The entry should basically look like this: | |
APOLLO_KEY=user:xz.5r134305-88p1-4840-12c1-88rc0xcxe179:E4VSTiXeFWaSSBgFWXOiSA | ||
``` | ||
|
||
Our key is now stored under the environment variable `APOLLO_KEY`. We now have to create a file called `apollo.config.js`. Apollo projects are configured using an `apollo.config.js` file at the root of your project. Many Apollo tools leverage your Apollo config, reducing the net amount of configuration you need to do in your project in the end. | ||
|
||
Create `apollo.config.js` with the following configuration: | ||
|
||
```js{3} | ||
module.exports = { | ||
service: { | ||
name: 'my-graph-name' // the name of your graph in Apollo Graph Manager | ||
} | ||
}; | ||
``` | ||
Our key is now stored under the environment variable `APOLLO_KEY`. | ||
|
||
### Check and publish with the Apollo CLI | ||
|
||
It's time to publish our schema to Graph Manager! First, start your server in one terminal window by running `npm start`. In another terminal window, run: | ||
zionts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```bash | ||
npx apollo service:push --endpoint=http://localhost:4000 | ||
npx apollo service:push --endpoint=http://localhost:4000 --graph=my-graph | ||
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. Change "my-graph" to "name-of-graph"
zionts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
> npx is a tool bundled with npm for easily running packages that are not installed globally. | ||
|
@@ -58,7 +48,7 @@ This command publishes your schema to the Apollo registry. Once your schema is u | |
For subsequent publishes, we may first want to check for any breaking changes in our new schema against the old version. In a terminal window, run: | ||
|
||
```bash | ||
npx apollo service:check --endpoint=http://localhost:4000 | ||
npx apollo service:check --endpoint=http://localhost:4000 --graph=my-graph | ||
``` | ||
|
||
### What are the benefits of Graph Manager? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
"In another terminal window, run the following command, substituting the name of your graph where indicated:"