Skip to content

Commit 8b64f55

Browse files
committed
wip
1 parent 7754035 commit 8b64f55

File tree

7 files changed

+33
-20
lines changed

7 files changed

+33
-20
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ package-lock.json
6262
/dist/
6363
/downloaded-schema.json
6464
/generated-schema.ts
65+
/t.*
66+
/t/

.graphcoolrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
targets:
22
prod: shared-ap-northeast-1/cjdbw710k0zpr0129sv35o79e
33
default: dev
4-
dev: local/cje8q7go30004017072lm7r5f
4+
staging: shared-ap-northeast-1/cjepthzeu185i010041h1k8n3
5+
dev: local/cjepysdvm000n0104aso94tok

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"typescript.tsdk": "./node_modules/typescript/lib"
33
, "typescript.check.tscVersion": false
44
, "files.exclude": {
5-
"node_modules/": true
5+
"dist/": true
6+
, "node_modules/": true
67
}
78
, "alignment": {
89
"operatorPadding": "right"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ npm test
2020

2121
# RESOURCES
2222

23+
1. [An introduction to Graphcool framework](https://hackernoon.com/graphcool-framework-analysis-and-its-use-case-319173a9aea4)
2324
1. [GraphQL Schema Language Cheat Sheet](https://github.com/sogko/graphql-schema-language-cheat-sheet)
2425
1. [watchQuery + Subscriptions](https://alligator.io/angular/graphql-subscriptions/)
2526

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dotenv": "^5.0.1",
4848
"eslint": "^4.17.0",
4949
"git-scripts": "^0.2.1",
50-
"graphcool": "^0.11.5",
50+
"graphcool": "^1.4.0",
5151
"graphql-tag": "^2.8.0",
5252
"node-fetch": "^1.7.3",
5353
"shx": "^0.2.2",

src/config.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { Brolog } from 'brolog'
2-
/**
3-
* Here are your GraphQL Endpoints:
4-
*/
2+
53
import { Endpoints } from 'graphcool-lib/dist/src/types'
64

75
// https://github.com/Microsoft/TypeScript/issues/14151#issuecomment-280812617
@@ -14,17 +12,21 @@ import { Endpoints } from 'graphcool-lib/dist/src/types'
1412
// subscriptions: string,
1513
// }
1614

15+
/**
16+
* Here are your GraphQL Endpoints:
17+
*/
1718
export const ENDPOINTS: Endpoints = {
18-
simple: 'https://api.graph.cool/simple/v1/cjdbw710k0zpr0129sv35o79e',
19+
simple: 'https://api.graph.cool/simple/v1/chatie',
1920
system: 'https://api.graph.cool/system',
20-
relay: 'https://api.graph.cool/relay/v1/cjdbw710k0zpr0129sv35o79e',
21-
subscriptions: 'wss://subscriptions.ap-northeast-1.graph.cool/v1/cjdbw710k0zpr0129sv35o79e',
21+
relay: 'https://api.graph.cool/relay/v1/chatie',
22+
subscriptions: 'wss://subscriptions.ap-northeast-1.graph.cool/v1/chatie',
23+
// simple: 'https://api.graph.cool/simple/v1/cjdbw710k0zpr0129sv35o79e',
24+
// relay: 'https://api.graph.cool/relay/v1/cjdbw710k0zpr0129sv35o79e',
25+
// subscriptions: 'wss://subscriptions.ap-northeast-1.graph.cool/v1/cjdbw710k0zpr0129sv35o79e',
2226
}
2327

2428
export const log = new Brolog()
25-
if (process.env['BROLOG_LEVEL']) {
26-
log.level(process.env['BROLOG_LEVEL'] as any)
27-
}
29+
log.level(process.env['BROLOG_LEVEL'] as any)
2830

2931
export {
3032
Endpoints,

src/local-server.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@ export class LocalServer {
2020
public async reset(): Promise<void> {
2121
log.verbose('LocalServer', 'reset()')
2222

23-
const child = spawn('graphcool', [
24-
'reset',
25-
'-t',
26-
'dev',
27-
])
28-
// child.stdout.pipe(process.stdout)
29-
child.stdin.write('y\n')
30-
// child.stdin.end()
23+
// const child = spawn('graphcool', [
24+
// 'reset',
25+
// '-t',
26+
// 'dev',
27+
// ])
28+
const child = spawn('scripts/local-reset.sh', [], {
29+
shell: true,
30+
// stdio: 'inherit',
31+
})
32+
child.stdout.pipe(process.stdout)
33+
child.stderr.pipe(process.stderr)
34+
3135
await new Promise(r => child.once('exit', r))
36+
await this.up()
3237
}
3338

3439
public async up(): Promise<void> {
@@ -39,6 +44,7 @@ export class LocalServer {
3944
'up',
4045
])
4146
// child.stdout.pipe(process.stdout)
47+
child.stderr.pipe(process.stderr)
4248
await new Promise(r => child.once('exit', r))
4349
}
4450

0 commit comments

Comments
 (0)