diff --git a/graphql/schemas/Ecosystem/Admin/app.graphql b/graphql/schemas/Ecosystem/Admin/app.graphql index b23f1ec20..425211d21 100644 --- a/graphql/schemas/Ecosystem/Admin/app.graphql +++ b/graphql/schemas/Ecosystem/Admin/app.graphql @@ -141,7 +141,10 @@ extend type Query @guard { } extend type Query { - getAppSettings(key: String! @eq): AppSettings + getAppSettings( + key: String! @eq, + orderBy: _@orderBy(columns: ["created_at", "updated_at", "id", "name"]) + ): AppSettings @field( resolver: "App\\GraphQL\\Ecosystem\\Queries\\Apps\\AppsListQuery@getAppSettings" ) diff --git a/graphql/schemas/Ecosystem/company.graphql b/graphql/schemas/Ecosystem/company.graphql index 6a99b5c74..56f52f38d 100644 --- a/graphql/schemas/Ecosystem/company.graphql +++ b/graphql/schemas/Ecosystem/company.graphql @@ -183,6 +183,7 @@ extend type Query @guard { "updated_at" ] ) + orderBy: _@orderBy(columns: ["created_at", "updated_at", "id", "name"]) ): [User!]! @paginate( builder: "App\\GraphQL\\Ecosystem\\Queries\\Companies\\UserManagementQuery@getAllCompanyUsers" diff --git a/tests/GraphQL/Ecosystem/Companies/CompanyUserTest.php b/tests/GraphQL/Ecosystem/Companies/CompanyUserTest.php index e1d0fa542..9cf437646 100644 --- a/tests/GraphQL/Ecosystem/Companies/CompanyUserTest.php +++ b/tests/GraphQL/Ecosystem/Companies/CompanyUserTest.php @@ -63,7 +63,9 @@ public function testGetCompanyUsers() $response = $this->graphQL( /** @lang GraphQL */ ' { - companyUsers() { + companyUsers( + orderBy: [{ field: "id", order: DESC }] + ) { data { id,