Skip to content

Commit

Permalink
allow custom config overrides only if flag queries is not the default…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
klujanrosas committed Jul 25, 2018
1 parent bcaa949 commit fba0a23
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/apollo-cli/src/load-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function loadConfigStep(
};
}

if (flags.queries && (!ctx.config.queries || ctx.config.queries.length == 0)) {
if (!ctx.config.queries || ctx.config.queries.length == 0) {
ctx.config.queries = [
{
schema: "default",
Expand All @@ -68,6 +68,13 @@ export function loadConfigStep(
}
];
}
else if (flags.queries != '**/*.graphql') {
ctx.config.queries = ctx.config.queries.map((query: any) => {
return Object.assign({}, query, {
includes: flags.queries.split("\n")
})
})
}

if (flags.key) {
if (Object.keys(ctx.config.schemas).length == 1) {
Expand Down

0 comments on commit fba0a23

Please sign in to comment.