|
@@ -0,0 +1,30 @@
|
|
|
+import { mutation } from 'react-apollo'
|
|
|
+import gql from 'graphql-tag'
|
|
|
+
|
|
|
+const USER_LOGIN = gql`
|
|
|
+ mutation USER_LOGIN($email: String!, $password: String!) {
|
|
|
+ login(email: $email, password: $password) {
|
|
|
+ id
|
|
|
+ email
|
|
|
+ name
|
|
|
+ }
|
|
|
+ }
|
|
|
+`
|
|
|
+
|
|
|
+const USER_LOGOUT = gql`
|
|
|
+ mutation USER_LOGOUT {
|
|
|
+ logout {
|
|
|
+ id
|
|
|
+ }
|
|
|
+ }
|
|
|
+`
|
|
|
+
|
|
|
+const USER_SIGNUP = gql`
|
|
|
+ mutation USER_SIGNUP($email: String!, $password: String!, $name: String!) {
|
|
|
+ signup(email: $email, password: $password, name: $name) {
|
|
|
+ id
|
|
|
+ }
|
|
|
+ }
|
|
|
+`
|
|
|
+
|
|
|
+export { USER_LOGIN, USER_LOGOUT, USER_SIGNUP }
|