Skip to content

Commit

Permalink
Merge pull request #553 from apollographql/evans/query-extraction
Browse files Browse the repository at this point in the history
Initial query extraction using AST
  • Loading branch information
evans authored Aug 31, 2018
2 parents b0288b7 + 53b2724 commit ebae069
Show file tree
Hide file tree
Showing 9 changed files with 575 additions and 24 deletions.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,28 @@ jobs:
- run: npm install --ignore-scripts
- run: npm run lint

Query Check:
docker: [{ image: "circleci/node:8" }]
steps:
- *run_install_desired_npm
- checkout
- restore_cache:
keys:
# When lock file changes, use increasingly general patterns to restore cache
- npm-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
- npm-v1-{{ .Branch }}-
- npm-v1-
- run: npm --version
- run: npm install
- run: ./packages/apollo/bin/run queries:check --queries="packages/apollo/src/operations/*" --key=$STAGING_API_KEY --engine=https://engine-staging-graphql.apollographql.com/api/graphql
- save_cache:
key: npm-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
# This should cache the npm cache instead of node_modules, which is needed because
# npm ci actually removes node_modules before installing to guarantee a clean slate.
- ~/.npm
- run: npm run circle

ignore_doc_branches: &ignore_doc_branches
filters:
branches:
Expand All @@ -75,3 +97,5 @@ workflows:
<<: *ignore_doc_branches
- Linting:
<<: *ignore_doc_branches
- Query Check:
<<: *ignore_doc_branches
177 changes: 170 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/apollo-codegen-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
},
"dependencies": {
"@babel/generator": "7.0.0-beta.38",
"@babel/parser": "^7.0.0",
"@babel/types": "7.0.0-beta.38",
"ast-types": "^0.11.5",
"common-tags": "^1.5.1",
"core-js": "^2.5.3"
"core-js": "^2.5.3",
"recast": "^0.15.3"
},
"jest": {
"testEnvironment": "node",
Expand Down
Loading

0 comments on commit ebae069

Please sign in to comment.