diff --git a/examples/with-apollo-auth/components/RegisterBox.js b/examples/with-apollo-auth/components/RegisterBox.js
index 3f8cadbd..e0afb9f4 100644
--- a/examples/with-apollo-auth/components/RegisterBox.js
+++ b/examples/with-apollo-auth/components/RegisterBox.js
@@ -14,7 +14,7 @@ const CREATE_USER = gql`
}
`
-const RegisterBox = (props) => {
+const RegisterBox = ({ client }) => {
let name, email, password
return (
@@ -25,7 +25,7 @@ const RegisterBox = (props) => {
})
// Force a reload of all the current queries now that the user is
// logged in
- props.client.resetStore().then(() => {
+ client.cache.reset().then(() => {
redirect({}, '/')
})
}} onError={(error) => {
@@ -33,26 +33,26 @@ const RegisterBox = (props) => {
console.log(error)
}}>
{(create, { data, error }) => (
-
+ name.value = email.value = password.value = ''
+ }}>
+ {error && Issue occured while registering :(
}
+ { name = node }} />
+ { email = node }} />
+ { password = node }} type='password' />
+
+
)}
diff --git a/examples/with-apollo-auth/components/SigninBox.js b/examples/with-apollo-auth/components/SigninBox.js
index fd48f1c0..3d4c7cd5 100644
--- a/examples/with-apollo-auth/components/SigninBox.js
+++ b/examples/with-apollo-auth/components/SigninBox.js
@@ -12,7 +12,7 @@ const SIGN_IN = gql`
`
// TODO: Find a better name for component.
-const SigninBox = (props) => {
+const SigninBox = ({ client }) => {
let email, password
return (
@@ -23,7 +23,7 @@ const SigninBox = (props) => {
})
// Force a reload of all the current queries now that the user is
// logged in
- props.client.resetStore().then(() => {
+ client.cache.reset().then(() => {
redirect({}, '/')
})
}} onError={(error) => {
@@ -31,24 +31,24 @@ const SigninBox = (props) => {
console.log(error)
}}>
{(signinUser, { data, error }) => (
-
+ email.value = password.value = ''
+ }}>
+ {error && No user found with that information.
}
+ { email = node }} />
+ { password = node }} type='password' />
+
+
)}
)
diff --git a/examples/with-apollo-auth/package.json b/examples/with-apollo-auth/package.json
index d783be45..18706084 100644
--- a/examples/with-apollo-auth/package.json
+++ b/examples/with-apollo-auth/package.json
@@ -9,15 +9,15 @@
"start": "next start"
},
"dependencies": {
- "apollo-boost": "^0.1.4",
- "apollo-link-context": "^1.0.7",
+ "apollo-boost": "^0.1.6",
+ "apollo-link-context": "^1.0.8",
"cookie": "^0.3.1",
"graphql": "^0.13.2",
"isomorphic-unfetch": "^2.0.0",
"next": "latest",
"prop-types": "^15.6.1",
- "react": "^16.2.0",
- "react-apollo": "^2.1.1",
- "react-dom": "^16.2.0"
+ "react": "^16.3.2",
+ "react-apollo": "^2.1.4",
+ "react-dom": "^16.3.2"
}
}
diff --git a/examples/with-apollo-auth/pages/create-account.js b/examples/with-apollo-auth/pages/create-account.js
index 8894c70b..a37f6b18 100644
--- a/examples/with-apollo-auth/pages/create-account.js
+++ b/examples/with-apollo-auth/pages/create-account.js
@@ -21,12 +21,12 @@ export default class CreateAccount extends React.Component {
render () {
return (
-
+
{/* RegisterBox handles all register logic. */}
-
+
Already have an account? Sign in
-
+
)
}
};
diff --git a/examples/with-apollo-auth/pages/signin.js b/examples/with-apollo-auth/pages/signin.js
index 65cb5aa3..01c78ccc 100644
--- a/examples/with-apollo-auth/pages/signin.js
+++ b/examples/with-apollo-auth/pages/signin.js
@@ -21,12 +21,12 @@ export default class Signin extends React.Component {
render () {
return (
-
+
{/* SigninBox handles all login logic. */}
-
+
New? Create account
-
+
)
}
};