Skip to content

Commit bab723d

Browse files
committed
bring example app up to date
1 parent 30e7957 commit bab723d

30 files changed

+10367
-3457
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ typings/
6363
/bin
6464

6565
.npmrc
66+
67+
# Build artifacts
68+
.yalc
69+
yalc.lock

example/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Relay TodoMVC
22

3+
## Prerequisites
4+
5+
```
6+
yarn global add yalc
7+
```
8+
9+
And in the project root folder
10+
11+
```
12+
yarn watch
13+
```
14+
315
## Installation
416

517
```

example/data/schema.graphql

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,33 @@ type Mutation {
4141
renameTodo(input: RenameTodoInput!): RenameTodoPayload
4242
}
4343

44-
# An object with an ID
44+
"""An object with an ID"""
4545
interface Node {
46-
# The id of the object.
46+
"""The id of the object."""
4747
id: ID!
4848
}
4949

50-
# Information about pagination in a connection.
50+
"""Information about pagination in a connection."""
5151
type PageInfo {
52-
# When paginating forwards, are there more items?
52+
"""When paginating forwards, are there more items?"""
5353
hasNextPage: Boolean!
5454

55-
# When paginating backwards, are there more items?
55+
"""When paginating backwards, are there more items?"""
5656
hasPreviousPage: Boolean!
5757

58-
# When paginating backwards, the cursor to continue.
58+
"""When paginating backwards, the cursor to continue."""
5959
startCursor: String
6060

61-
# When paginating forwards, the cursor to continue.
61+
"""When paginating forwards, the cursor to continue."""
6262
endCursor: String
6363
}
6464

6565
type Query {
6666
viewer: User
6767

68-
# Fetches an object given its ID
68+
"""Fetches an object given its ID"""
6969
node(
70-
# The ID of an object
70+
"""The ID of an object"""
7171
id: ID!
7272
): Node
7373
}
@@ -105,32 +105,32 @@ type RenameTodoPayload {
105105
}
106106

107107
type Todo implements Node {
108-
# The ID of an object
108+
"""The ID of an object"""
109109
id: ID!
110110
text: String
111111
complete: Boolean
112112
}
113113

114-
# A connection to a list of items.
114+
"""A connection to a list of items."""
115115
type TodoConnection {
116-
# Information to aid in pagination.
116+
"""Information to aid in pagination."""
117117
pageInfo: PageInfo!
118118

119-
# A list of edges.
119+
"""A list of edges."""
120120
edges: [TodoEdge]
121121
}
122122

123-
# An edge in a connection.
123+
"""An edge in a connection."""
124124
type TodoEdge {
125-
# The item at the end of the edge
125+
"""The item at the end of the edge"""
126126
node: Todo
127127

128-
# A cursor for use in pagination
128+
"""A cursor for use in pagination"""
129129
cursor: String!
130130
}
131131

132132
type User implements Node {
133-
# The ID of an object
133+
"""The ID of an object"""
134134
id: ID!
135135
todos(status: String = "any", after: String, first: Int, before: String, last: Int): TodoConnection
136136
totalCount: Int

example/package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"private": true,
33
"scripts": {
44
"start": "babel-node ./server.js",
5-
"build":
6-
"relay-compiler --src ./ts/ --schema ./data/schema.graphql --language typescript --artifactDirectory ./ts/__relay_artifacts__",
5+
"build": "relay-compiler --src ./ts/ --schema ./data/schema.graphql --language typescript --artifactDirectory ./ts/__relay_artifacts__",
76
"update-schema": "babel-node ./scripts/updateSchema.js",
87
"lint": "tslint --project tsconfig.json",
8+
"postinstall": "patch-package",
99
"type-check": "tsc --noEmit --pretty"
1010
},
11-
"resolutions": {
12-
"relay-compiler-language-typescript":
13-
"file:../relay-compiler-language-typescript-v1.1.1-alpha.2.tgz"
11+
"prettier": {
12+
"semi": false,
13+
"trailingComma": "all"
1414
},
1515
"dependencies": {
1616
"@babel/core": "^7.0.0-0",
@@ -25,15 +25,15 @@
2525
"classnames": "2.2.5",
2626
"express": "^4.15.2",
2727
"express-graphql": "^0.7.1",
28-
"graphql": "^14.0.2",
29-
"graphql-compiler": "^2.0.0-rc.1",
30-
"graphql-relay": "^0.5.5",
28+
"graphql": "^14.5.8",
29+
"graphql-compiler": "^1.7.0",
30+
"graphql-relay": "^0.6.0",
3131
"prop-types": "^15.6.2",
32-
"react": "^16.4.1",
33-
"react-dom": "^16.4.1",
34-
"react-relay": "^2.0.0-rc.1",
32+
"react": "^16.10.2",
33+
"react-dom": "^16.10.2",
34+
"react-relay": "^6.0.0",
3535
"relay-devtools": "^1.4.0",
36-
"relay-runtime": "^2.0.0-rc.1",
36+
"relay-runtime": "^6.0.0",
3737
"todomvc-app-css": "^2.1.0",
3838
"todomvc-common": "^1.0.3",
3939
"webpack": "^3.5.5",
@@ -44,18 +44,18 @@
4444
"@types/prop-types": "^15.5.5",
4545
"@types/react": "^16.4.12",
4646
"@types/react-dom": "^16.0.7",
47-
"@types/react-relay": "^1.3.9",
48-
"@types/relay-runtime": "^1.3.5",
47+
"@types/react-relay": "^6.0.1",
48+
"@types/relay-runtime": "^6.0.6",
4949
"babel-cli": "^6.26.0",
5050
"babel-eslint": "6.1.2",
5151
"csstype": "^2.5.6",
5252
"fork-ts-checker-webpack-plugin": "^0.3.0",
53-
"relay-compiler": "^2.0.0-rc.1",
54-
"relay-compiler-language-typescript":
55-
"file:../relay-compiler-language-typescript-v1.1.1-alpha.2.tgz",
56-
"ts-loader": "^3.2.0",
57-
"tslint": "^5.12.0",
53+
"patch-package": "^6.2.0",
54+
"relay-compiler": "^6.0.0",
55+
"relay-compiler-language-typescript": "file:.yalc/relay-compiler-language-typescript",
56+
"ts-loader": "^6.2.0",
57+
"tslint": "^5.20.0",
5858
"tslint-plugin-relay": "^0.0.3",
59-
"typescript": "2.9.1"
59+
"typescript": "^3.6.3"
6060
}
6161
}

0 commit comments

Comments
 (0)