https://sonarly.com/issue/7575?type=bug When `currentWorkspaceMember` is null/undefined during page initialization, the frontend sends `{ accountOwnerId: {} }` as a filter (because `JSON.stringify` drops the `undefined` `eq` value), which crashes the server-side query parser that assumes filter objects always contain at least one operator entry. Fix: ## Changes ### Backend: Defensive guard at crash site (1 file) **`graphql-query-filter-field.parser.ts`** — Added a guard before the destructuring on line 72 that checks `filterEntries.length !== 1` and throws a proper `GraphqlQueryRunnerException` instead of letting an unhandled `TypeError` crash the process. This is consistent with the validation pattern already established in the newer `validateAndTransformOperatorAndValue` utility. ```typescript // Before: crashes with TypeError when filterValue is {} const [[operator, value]] = Object.entries(filterValue); // After: explicit validation with descriptive error const filterEntries = Object.entries(filterValue); if (filterEntries.length !== 1) { throw new GraphqlQueryRunnerException( `Filter for field "${key}" must have exactly one operator, received ${filterEntries.length}`, GraphqlQueryRunnerExceptionCode.INVALID_QUERY_INPUT, { userFriendlyMessage: msg`Invalid filter value for field "${key}"` }, ); } const [[operator, value]] = filterEntries; ``` ### Frontend: Prevent query with invalid filter (3 files) **`SettingsAccounts.tsx`**, **`SettingsAccountsMessageChannelsContainer.tsx`**, **`SettingsAccountsCalendarChannelsContainer.tsx`** — Added `skip: !currentWorkspaceMember?.id` to each `useFindManyRecords` call. This prevents the GraphQL query from firing when `currentWorkspaceMember` is null/undefined (e.g., during initial page load), which would otherwise serialize `{ eq: undefined }` as `{}` after JSON stringification and send an empty filter object to the server.
The #1 Open-Source CRM
🌐 Website · 📚 Documentation · Roadmap ·
Discord ·
Figma
Installation
See: 🚀 Self-hosting 🖥️ Local Setup
Why Twenty
We built Twenty for three reasons:
CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.
A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.
We believe in Open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.
What You Can Do With Twenty
Please feel free to flag any specific needs you have by creating an issue.
Below are a few features we have implemented to date:
- Personalize layouts with filters, sort, group by, kanban and table views
- Customize your objects and fields
- Create and manage permissions with custom roles
- Automate workflow with triggers and actions
- Emails, calendar events, files, and more
Personalize layouts with filters, sort, group by, kanban and table views
Customize your objects and fields
Create and manage permissions with custom roles
Automate workflow with triggers and actions
Emails, calendar events, files, and more
Stack
- TypeScript
- Nx
- NestJS, with BullMQ, PostgreSQL, Redis
- React, with Jotai, Linaria and Lingui
Thanks
Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).
Join the Community
- Star the repo
- Subscribe to releases (watch -> custom -> releases)
- Follow us on Twitter or LinkedIn
- Join our Discord
- Improve translations on Crowdin
- Contributions are, of course, most welcome!




