mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 04:35:31 +08:00
More graphql fixes
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export default {
|
||||
mutations: {
|
||||
SetUserStatus: () => ({
|
||||
refetchQueries: ['CoralAdmin_Community'],
|
||||
refetchQueries: ['TalkAdmin_FlaggedAccounts'],
|
||||
}),
|
||||
RejectUsername: () => ({
|
||||
refetchQueries: ['CoralAdmin_Community'],
|
||||
refetchQueries: ['TalkAdmin_FlaggedAccounts'],
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ class FlaggedAccountsContainer extends Component {
|
||||
|
||||
const LOAD_MORE_QUERY = gql`
|
||||
query TalkAdmin_LoadMoreFlaggedAccounts($limit: Int, $cursor: Cursor) {
|
||||
users(query:{action_type: FLAG, limit: $limit, cursor: $cursor}){
|
||||
users(query:{action_type: FLAG, statuses: [PENDING], limit: $limit, cursor: $cursor}){
|
||||
hasNextPage
|
||||
endCursor
|
||||
nodes {
|
||||
|
||||
@@ -73,6 +73,9 @@ const getUsersByQuery = async ({user, loaders: {Actions}}, {ids, limit, cursor,
|
||||
query = query.limit(limit + 1);
|
||||
}
|
||||
|
||||
// Sort by created_at.
|
||||
query.sort({created_at: sortOrder === 'DESC' ? -1 : 1});
|
||||
|
||||
const nodes = await query.exec();
|
||||
|
||||
// The hasNextPage is always handled the same (ask for one more than we need,
|
||||
|
||||
Reference in New Issue
Block a user