We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DbinstanceTC.mongooseResolvers .pagination({ suffix: "Extended" }) .addArgs({ filterNodeInfo: DNSCNameTC.mongooseResolvers .pagination() .getArg("filter"), }) .addArgs({ filterEnvironmentLink: EnvironmentTC.mongooseResolvers .pagination() .getArg("filter"), }) .addFilterArg({ name: "isDatabaseEmpty", type: "Boolean", description: "Filter by empty or non-empty databases array", query: (rawQuery, value) => { if (value !== undefined) { rawQuery.databases = value ? { $size: 0 } : { $not: { $size: 0 } }; } }, }) .withMiddlewares([authorizeGraphQL([Roles.Admin, Roles.Inventory])]) .wrapResolve(processChildFilters) .wrapResolve(addEnvFilters),
This works fine, when running a query like this:
{ dbinstancePagination( page: 1 perPage: 50 filter: {isDatabaseEmpty: true} ) { items { _id name tenantCount databases { _id name type } } pageInfo { currentPage perPage pageCount itemCount hasNextPage hasPreviousPage } } }
but when running this it returns non-empty databases:
{ dbinstancePagination( page: 1 perPage: 50 filter: {AND: [{isDatabaseEmpty: true}, {name: "mysql" }]} ) { items { _id name tenantCount databases { _id name type } } pageInfo { currentPage perPage pageCount itemCount hasNextPage hasPreviousPage } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This works fine, when running a query like this:
but when running this it returns non-empty databases:
The text was updated successfully, but these errors were encountered: