pass in order direction

This commit is contained in:
Barry Gitarts 2019-10-28 13:23:28 -04:00 committed by Barry G
parent cc968d79e8
commit b11f2a4f19
2 changed files with 4 additions and 3 deletions

View File

@ -133,7 +133,8 @@ function ListProjects() {
{
variables: {
offset,
limit: 5
limit: 5,
orderDirection: 'desc'
}
}
)

View File

@ -104,8 +104,8 @@ query Profile($id: ID!) {
export const getProjects = gql`
${pledgesInfosFields}
query Projects($type: String! = "PROJECT", $limit: Int, $offset: Int){
profiles(where: {type: $type, projectInfo_not: null}, first: $limit, skip: $offset, orderBy: profileId, orderDirection: desc) {
query Projects($type: String! = "PROJECT", $limit: Int, $offset: Int, $orderDirection: String){
profiles(where: {type: $type, projectInfo_not: null}, first: $limit, skip: $offset, orderBy: profileId, orderDirection: $orderDirection) {
id
addr
canceled