1
0
Fork 0
mirror of synced 2024-08-02 12:01:37 +12:00

Fix users queries phone -> number

This commit is contained in:
Jake Barnby 2022-09-22 13:57:31 +12:00
parent a2778e410f
commit 734561c6b6
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 7 additions and 7 deletions

View file

@ -553,8 +553,8 @@ trait GraphQLBase
} }
}'; }';
case self::$GET_USERS: case self::$GET_USERS:
return 'query listUsers($search: String, $limit: Int, $offset: Int, $cursor: String, $cursorDirection: String, $orderType: String) { return 'query listUsers($search: String, $queries: [String!]) {
usersList(search: $search, limit: $limit, offset: $offset, cursor: $cursor, cursorDirection: $cursorDirection, orderType: $orderType) { usersList(search: $search, queries: $queries) {
total total
users { users {
_id _id
@ -619,8 +619,8 @@ trait GraphQLBase
} }
}'; }';
case self::$UPDATE_USER_PHONE: case self::$UPDATE_USER_PHONE:
return 'mutation updateUserPhone($userId: String!, $phone: String!){ return 'mutation updateUserPhone($userId: String!, $number: String!){
usersUpdatePhone(userId: $userId, phone: $phone) { usersUpdatePhone(userId: $userId, number: $number) {
name name
phone phone
email email

View file

@ -128,7 +128,7 @@ class GraphQLUsersTest extends Scope
$this->assertIsArray($user['body']['data']); $this->assertIsArray($user['body']['data']);
$this->assertArrayNotHasKey('errors', $user['body']); $this->assertArrayNotHasKey('errors', $user['body']);
$this->assertIsArray($user['body']['data']['usersGetSessions']); $this->assertIsArray($user['body']['data']['usersListSessions']);
} }
public function testGetUserMemberships() public function testGetUserMemberships()
@ -317,7 +317,7 @@ class GraphQLUsersTest extends Scope
'query' => $query, 'query' => $query,
'variables' => [ 'variables' => [
'userId' => $this->getUser()['$id'], 'userId' => $this->getUser()['$id'],
'phone' => '+123456789' 'number' => '+123456789'
], ],
]; ];
@ -329,7 +329,7 @@ class GraphQLUsersTest extends Scope
$this->assertIsArray($user['body']['data']); $this->assertIsArray($user['body']['data']);
$this->assertArrayNotHasKey('errors', $user['body']); $this->assertArrayNotHasKey('errors', $user['body']);
$this->assertIsArray($user['body']['data']['usersUpdatePhone']); $this->assertIsArray($user['body']['data']['usersUpdatePhone']);
$this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['phone']); $this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['number']);
} }
public function testUpdateUserPrefs() public function testUpdateUserPrefs()