Skip to content

Commit b9a4911

Browse files
committed
chore: add github graphql api types
1 parent 26a4bbf commit b9a4911

17 files changed

+32329
-107
lines changed

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
/package-lock.json
77
/tmp
88
node_modules
9-
.env
9+
.env
10+
11+
.DS_Store
12+
artsy-cli-*.tgz
13+
oclif.manifest.json
14+
tsconfig.tsbuildinfo

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/__generated__
2+
hokusai/*.yml

codegen.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
overwrite: true
2+
schema: "src/__generated__/github-schema-loader.ts"
3+
documents:
4+
- src/queries/*.graphql
5+
generates:
6+
src/__generated__/graphql.ts:
7+
plugins:
8+
- "typescript"
9+
- "typescript-resolvers"
10+
- "typescript-document-nodes"
11+
- "typescript-operations"

package.json

+19-7
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212
"@oclif/config": "^1",
1313
"@oclif/plugin-help": "^2",
1414
"@octokit/graphql": "^4.6.0",
15+
"@octokit/graphql-schema": "^10.21.0",
1516
"@slack/client": "^5.0.2",
1617
"@types/node-fetch": "^2.5.0",
18+
"apollo-cache-inmemory": "^1.6.6",
19+
"apollo-client": "^2.6.10",
20+
"apollo-link-http": "^1.5.17",
1721
"cli-ux": "^5.3.1",
22+
"cross-fetch": "^3.0.6",
1823
"dotenv": "^8.0.0",
24+
"graphql": "^15.5.0",
25+
"graphql-tag": "^2.11.0",
1926
"lodash.chunk": "^4.2.0",
2027
"lodash.shuffle": "^4.2.0",
2128
"node-fetch": "^2.6.0",
@@ -24,6 +31,11 @@
2431
},
2532
"devDependencies": {
2633
"@artsy/auto-config": "^1.0.1",
34+
"@graphql-codegen/cli": "1.20.1",
35+
"@graphql-codegen/typescript": "1.21.0",
36+
"@graphql-codegen/typescript-document-nodes": "1.17.9",
37+
"@graphql-codegen/typescript-operations": "^1.17.14",
38+
"@graphql-codegen/typescript-resolvers": "1.18.2",
2739
"@oclif/dev-cli": "^1",
2840
"@oclif/test": "^1",
2941
"@oclif/tslint": "^3",
@@ -46,10 +58,9 @@
4658
"node": ">=8.0.0"
4759
},
4860
"files": [
49-
"/bin",
50-
"/lib",
51-
"/npm-shrinkwrap.json",
52-
"/oclif.manifest.json"
61+
"bin",
62+
"lib",
63+
"oclif.manifest.json"
5364
],
5465
"homepage": "https://github.com/artsy/artsy-cli",
5566
"keywords": [
@@ -77,13 +88,14 @@
7788
"lint": "yarn lint-src && yarn lint-test && yarn prettier-check",
7889
"lint-src": "tslint --project tsconfig.json",
7990
"lint-test": "tslint --project test/tsconfig.json",
80-
"postpack": "rm -f oclif.manifest.json",
81-
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
91+
"postpack": "rm -rf lib oclif.manifest.json tsconfig.tsbuildinfo",
92+
"prepack": "rm -rf lib oclif.manifest.json tsconfig.tsbuildinfo && tsc -b && oclif-dev manifest && oclif-dev readme",
8293
"prettier": "prettier --write {src,test}/**/*.{js,ts}",
8394
"prettier-check": "prettier --check {src,test}/**/*.{js,ts}",
8495
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
8596
"type-check": "tsc --emitDeclarationOnly --pretty",
86-
"version": "oclif-dev readme && git add README.md"
97+
"version": "oclif-dev readme && git add README.md",
98+
"codegen": "graphql-codegen --config codegen.yml"
8799
},
88100
"types": "lib/index.d.ts",
89101
"prettier": {

src/__generated__/github-schema-loader.ts

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)