-
Notifications
You must be signed in to change notification settings - Fork 52
Conversation
❌ Deploy Preview for apollo-monodocs failed.
|
title: Configuring Apollo VS Code | ||
description: How to configure Apollo VS Code with 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. | ||
If you're using the [Apollo VS Code extension](./editor-plugins/), you'll need to have an `apollo.config.js` (alternative file extensions: `cjs`, `mjs` and `ts`) project to get the features those tools bring. | ||
|
||
If you're using one of our workflow tools like the [Apollo CLI](./cli/) or the [Apollo VS Code extension](./editor-plugins/), you'll need to have an `apollo.config.js` project to get the features those tools bring. | ||
|
||
There are two types of projects, `client` and `service`. When a `client` key is found in the config, a project is treated as a client project, and only `client:*` commands may be run against it. The same is true for `service` projects. The `apollo.config.js` file is meant to describe configuration for a single project only. If used in a monorepo with multiple projects, there should be a separate config file for each project. | ||
The `apollo.config.js` file is meant to describe configuration for a single project only. If used in a monorepo with multiple projects, there should be a separate config file for each project. |
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.
It seems like a good idea to stop mentioning other tools here - everything except the VSCode extension afaik has been discontinued at this point.
TYSM for this (much needed) update @phryneas 🙏. Is there a particular time we need/want to push this out by? I'd like to review the changes, but probably won't be able to get to it until later this week. |
@Meschreiber later this week is fine - I am just working on the VSCode extension right now and notices that all these options do not really make sense there, so removing them from the docs should help clarify things a bit :) |
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.
Thanks for updating this @phryneas !
I'd like to push one copyedit directly to the branch before merging. Let me know what you think on my comment on the server options, as that'll affect the edit I make. Thanks again!
@Meschreiber This is ready for another round of review :) |
Nice! Will take a look before the end of the week |
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.
TIL these pages exist :) Glad to see this being updated!
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.
Thanks again for the much needed update here @phryneas ! Just a couple of suggestions
If problems persist or the error messages are unhelpful, an [issue](https://github.com/apollographql/vscode-graphql/issues) can be opened on the `apollo-tooling` repository. | ||
If problems persist or the error messages are unhelpful, an [issue](https://github.com/apollographql/vscode-graphql/issues) can be opened on the `vscode-graphql` repository. | ||
|
||
## Other configuration options |
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.
This applies only to the Apollo Config file, right? If so, let's either 1) explicitly state that or move it under the ### Setting up an Apollo config option.
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.
Yes, but the same goes for "Local schemas", "Local schema files" and "Client-only schemas", which are weirdly not under "Setting up an Apollo config", but under "Getting Started", so I'm honestly a bit unsure on the whole document structure
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.
Hah, got it. Noted that this entire thing could use a restructure.
Plan on giving these tools more prominence in the new IA! |
This removes the notion of the Apollo CLI, which has been deprecated for a while, removes options that were only useful with the CLI and removes the notion of server projects, which currently in the VSCode extension don't have a lot of functionality.
This is this page, which is not accessible through the sidebar: https://www.apollographql.com/docs/devtools/apollo-config/