Skip to content

Commit 19c942a

Browse files
authored
Merge pull request #15 from dstroot/master
fixed authentication issues
2 parents d025bcc + 3d94d94 commit 19c942a

File tree

6 files changed

+51
-4
lines changed

6 files changed

+51
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# dependencies
44
node_modules
5-
.graphcoolrd
5+
.graphcoolrc
66

77
# testing
88
/coverage

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"apollo-client": "^2.0.3",
67
"apollo-client-preset": "^1.0.1",
8+
"apollo-link": "^1.0.3",
79
"apollo-link-ws": "^1.0.0",
810
"graphql": "^0.11.7",
911
"graphql-tag": "^2.5.0",

server/src/email-password/authenticate.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
type AuthenticateUserPayload {
2+
id: ID!
23
token: String!
34
}
45

src/components/Login.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ const SIGNUP_USER_MUTATION = gql`
104104

105105
const AUTHENTICATE_USER_MUTATION = gql`
106106
mutation AuthenticateUserMutation($email: String!, $password: String!) {
107-
authenticateUser(email: {
107+
authenticateUser(
108108
email: $email,
109109
password: $password
110-
}) {
110+
) {
111111
id
112112
token
113113
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { InMemoryCache } from 'apollo-cache-inmemory'
1313
import { WebSocketLink } from 'apollo-link-ws'
1414
import { getMainDefinition } from 'apollo-utilities'
1515

16-
const serviceId = '__SERVICE_ID__'
16+
const serviceId = process.env.SERVICE_ID || '__SERVICE_ID__';
1717

1818
const httpLink = new HttpLink({ uri: `https://api.graph.cool/simple/v1/${serviceId}` })
1919

yarn.lock

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
version "2.0.44"
77
resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.44.tgz#e846150fd1f5a3243cec7c1f5bb49f58241092ee"
88

9+
10+
version "2.0.45"
11+
resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.45.tgz#0cfe971d7ed5542695740338e0455c91078a0e83"
12+
13+
"@types/[email protected]", "@types/zen-observable@^0.5.3":
14+
version "0.5.3"
15+
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.5.3.tgz#91b728599544efbb7386d8b6633693a3c2e7ade5"
16+
917
abab@^1.0.3:
1018
version "1.0.4"
1119
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
@@ -148,6 +156,12 @@ apollo-cache@^1.0.0:
148156
dependencies:
149157
apollo-utilities "^1.0.0"
150158

159+
apollo-cache@^1.0.1:
160+
version "1.0.1"
161+
resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.0.1.tgz#66c16141173bc752d3ad3dce990310c10dfc4076"
162+
dependencies:
163+
apollo-utilities "^1.0.2"
164+
151165
apollo-client-preset@^1.0.1:
152166
version "1.0.1"
153167
resolved "https://registry.yarnpkg.com/apollo-client-preset/-/apollo-client-preset-1.0.1.tgz#c772d179d73e535787978b56096b198d87ca543a"
@@ -170,10 +184,28 @@ apollo-client@^2.0.1:
170184
optionalDependencies:
171185
"@types/async" "2.0.44"
172186

187+
apollo-client@^2.0.3:
188+
version "2.0.3"
189+
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.0.3.tgz#f99f32e2c851bbd52da1e1b113ce8f6a0cf94945"
190+
dependencies:
191+
"@types/zen-observable" "^0.5.3"
192+
apollo-cache "^1.0.1"
193+
apollo-link "^1.0.0"
194+
apollo-link-dedup "^1.0.0"
195+
apollo-utilities "^1.0.2"
196+
symbol-observable "^1.0.2"
197+
zen-observable "^0.6.0"
198+
optionalDependencies:
199+
"@types/async" "2.0.45"
200+
173201
174202
version "1.0.0"
175203
resolved "https://registry.yarnpkg.com/apollo-link-dedup/-/apollo-link-dedup-1.0.0.tgz#f0134ac495cc42e7e43dfafe7126645baa1e03bc"
176204

205+
apollo-link-dedup@^1.0.0:
206+
version "1.0.2"
207+
resolved "https://registry.yarnpkg.com/apollo-link-dedup/-/apollo-link-dedup-1.0.2.tgz#bab659dde41f8dd627839142d4dad90e55251110"
208+
177209
178210
version "1.0.0"
179211
resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.0.0.tgz#0450be89ae7e080722383c302f07135d364bc749"
@@ -191,6 +223,14 @@ [email protected], apollo-link@^1.0.0:
191223
apollo-utilities "^0.2.0-beta.0"
192224
zen-observable "^0.6.0"
193225

226+
apollo-link@^1.0.3:
227+
version "1.0.3"
228+
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.0.3.tgz#759c36abeeb99e227eca45f919ee07fb8fee911e"
229+
dependencies:
230+
"@types/zen-observable" "0.5.3"
231+
apollo-utilities "^1.0.0"
232+
zen-observable "^0.6.0"
233+
194234
apollo-utilities@^0.2.0-beta.0:
195235
version "0.2.0-rc.3"
196236
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-0.2.0-rc.3.tgz#7bd93be0f587f20c5b46e21880272e305759fdc2"
@@ -199,6 +239,10 @@ apollo-utilities@^1.0.0:
199239
version "1.0.1"
200240
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.1.tgz#34b4df0bd6ed71d0afaa7c62489173dca5d07e92"
201241

242+
apollo-utilities@^1.0.2:
243+
version "1.0.2"
244+
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.2.tgz#bcf348a7e613e82e2624ddb5be2b9f6bf1259c6d"
245+
202246
append-transform@^0.4.0:
203247
version "0.4.0"
204248
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"

0 commit comments

Comments
 (0)