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

apollo.config.js is overriden by default flags #510

Closed
klujanrosas opened this issue Jul 24, 2018 · 0 comments
Closed

apollo.config.js is overriden by default flags #510

klujanrosas opened this issue Jul 24, 2018 · 0 comments
Labels

Comments

@klujanrosas
Copy link
Contributor

klujanrosas commented Jul 24, 2018

While trying out the new apollo.config.js file, I couldn't manage to get past the following error:
image

I dived into the source and discovered that the oclif.manifest.json defines a default queries value

{
  "queries":{
    "name": "queries",
    "type": "option",
    "description": "Path to your GraphQL queries, can include search tokens like **",
    "default":"**/*.graphql"
  }
}

That wouldn't be a problem until I spotted a suspicious check being performed here:
https://github.com/apollographql/apollo-cli/blob/8d8221da4b6aa775a4046b0661647eee4d388d60/packages/apollo-cli/src/load-config.ts#L62-L70

Which basically is overriding the values specified in apollo.config.js, since flags.queries always holds a value.

I'll get my hands on this and submit a PR if you agree!
I couldn't help myself and went ahead and submitted a PR

Thank you for making this awesome tool!

@klujanrosas klujanrosas changed the title codegen:generate apollo.config.js is overriden by default flags Jul 24, 2018
@ghost ghost added the 🐞 bug label Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants