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

[cli]: apollo service:download always uses apollo.config.js if present #1107

Closed
Hotell opened this issue Mar 12, 2019 · 2 comments
Closed

[cli]: apollo service:download always uses apollo.config.js if present #1107

Hotell opened this issue Mar 12, 2019 · 2 comments

Comments

@Hotell
Copy link

Hotell commented Mar 12, 2019

Intended outcome:

  • CLI shouldn't merge/use by default config or there should be an opt out flag to not use config by default.

Only "dirty fix" that works for getting fresh schema and then use vscode plugin by defining localSchemaFile in config, is, to remove apollo.config before running service:download.

  • make use apollo service:download --endpoint="..." my-schema.json to not use apollo.config.js if present by default.

Actual outcome:

if apollo.config.js is present, it's gonna be used for cli commands and cannot be overriden.

This causes various issues:

  • if localSchemaFile is used within config file, it will throw error (file doesn't exists)
  • unable to fetch fresh schema ( used for validation/compilation of types on CI. UI and API are 2 separated projects )

How to reproduce the issue:

Versions
apollo@2.6.0

@Hotell Hotell changed the title [cli]: apollo service:download uses always uses apollo.config.js if present [cli]: apollo service:download always uses apollo.config.js if present Mar 12, 2019
@Hotell
Copy link
Author

Hotell commented Mar 12, 2019

related #792

@JakeDawkins
Copy link
Contributor

Hi @Hotell! Sorry this has taken so long to look at. I think this is a problem with our documentation around configuring projects. Right now, the apollo config isn't meant to be used with more than one project. If you're using a monorepo with multiple projects under a single root, you'd need to use separate apollo.config.js files for each of those projects at their respective roots.

If I'm misunderstanding, please provide a simple reproduction repo and steps to show what's going wrong for you, and I can reopen

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

No branches or pull requests

2 participants