Skip to content

Commit 0e6cafb

Browse files
committed
Added token support
1 parent 03c7148 commit 0e6cafb

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

mapping.json

100644100755
File mode changed.

resolver/common/account.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public function login($args)
4242
}
4343

4444

45-
return $this->get($customer->id);
45+
return array(
46+
'token' => null,
47+
'customer' => $this->get($customer->id)
48+
);
4649
}
4750

4851
public function logout()

schema.graphql

100644100755
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,14 @@ type HomeResult {
347347
meta: Meta
348348
}
349349

350+
type LoginResult {
351+
token: String
352+
customer: Customer
353+
}
354+
350355
type RootMutationType {
351356
uploadFile(file: Upload): FileResult
352-
accountLogin(email: String, password: String): Customer
357+
accountLogin(email: String, password: String): LoginResult
353358
accountLogout: LogoutResult
354359
accountRegister(customer: CustomerInput): Customer
355360
accountEdit(customer: CustomerInput): Customer
@@ -381,7 +386,7 @@ type RootQueryType {
381386
categoriesBlogList(page: Int = 1, size: Int = 10, filter: String, parent: Int = -1, sort: String = "sort_order", order: String = "ASC"): categoryBlogResult
382387
post(id: String): Post
383388
postsList(page: Int = 1, size: Int = 10, filter: String, search: String, category_id: String = "", sort: String = "sort_order", order: String = "ASC"): PostResult
384-
cart: Cart
389+
cart: Cart
385390
category(id: String): Category
386391
categoriesList(page: Int = 1, size: Int = 10, filter: String, parent: Int = -1, sort: String = "sort_order", order: String = "ASC"): CategoryResult
387392
compare: [Product]

0 commit comments

Comments
 (0)