Skip to content

Commit

Permalink
Update query
Browse files Browse the repository at this point in the history
  • Loading branch information
zichongkao committed Apr 26, 2023
1 parent 3edaa29 commit c735d49
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/__tests__/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ describe('graphql server', () => {
}
`
const organizationsQuery = `
query organizations($filter: OrgFilter, $sort: OrgSort) {
organizations(filter: $filter, sort: $sort) {
query organizations($filter: OrgFilter, $sort: OrgSort, $limit: Int) {
organizations(filter: $filter, sort: $sort, limit: $limit) {
orgId
associatedAreaIds
displayName
Expand Down Expand Up @@ -312,12 +312,11 @@ describe('graphql server', () => {
expect(dataResult.map(o => o.orgId).sort()).toEqual([muuidToString(deltaOrg.orgId), muuidToString(gammaOrg.orgId)].sort())
})

it('limits results', async () => {
it('limits organizations returned', async () => {
const response = await queryAPI({
query: organizationsQuery,
operationName: 'organizations',
variables: {
filter: { displayName: { match: 'beta', exactMatch: false } },
limit: 1
},
userUuid
Expand Down

0 comments on commit c735d49

Please sign in to comment.