diff --git a/packages/apollo-cli/src/load-config.ts b/packages/apollo-cli/src/load-config.ts index 85b95e8bbb..4412464c53 100644 --- a/packages/apollo-cli/src/load-config.ts +++ b/packages/apollo-cli/src/load-config.ts @@ -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", @@ -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) {