- Created addRecordInCache to inject a record in Apollo cache and inject single read query on this record
- Created createOneRecordInCache and createManyRecordsInCache that uses this addRecordInCache
- Created useOpenCreateActivityDrawerV2 hook to create an activity in cache and inject it into all other relevant requests in the app before opening activity drawer
- Refactored DEFAULT_SEARCH_REQUEST_LIMIT constant and hardcoded arbitrary request limits
- Added Apollo dev logs to see errors in the console when manipulating cache
* refactor: apply relation optimistic effects on record update
Related to #3509
* refactor: remove need to pass relation id field to create and update mutations
* fix: fix tests
* fix: fix SingleEntitySelect glitch
* fix: fix usePersistField tests
* fix: fix wrong import after rebase
* fix: fix several tests
* fix: fix test types
* Fetch messages with hard coded thread id
* Fix test
* Use first workspace member or person names
---------
Co-authored-by: Thomas Trompette <thomast@twenty.com>
* perf: apply record optimistic effects with cache.modify on mutation
Closes#3509
* refactor: return early when created records do not match filter
* fix: fix id generation on record creation
* fix: comment filtering behavior on record creation
* Fixed typing error
* refactor: review - use ??
* refactor: review - add variables in readFieldValueToSort
* docs: review - add comments for variables.first in triggerUpdateRecordOptimisticEffect
* refactor: review - add intermediary variable for 'not' filter in useMultiObjectSearchMatchesSearchFilterAndToSelectQuery
* refactor: review - add filter utils
* fix: fix tests
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* WIP
* Poc
* Use cached root query + remove proloaded views state
* Fix storybook test + fix codegen
* Return default schema if token is absent, unauthenticated if token is invalid
* Use enum instead of bool
---------
Co-authored-by: Thomas Trompette <thomast@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
* feat: display label identifier table cell as chip with link to RecordShowPage
Closes#3502
* Fix test
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* feat: set field as custom object label identifier in Object Detail
Closes#3302
* feat: prevent disabling Object label identitifer field in back-end
* refactor: review - extract isLabelIdentifier variable
* feat: display identifier field in Object Detail page for custom objects
Closes#3301
* fix: show Name as object label identifier by default
* Minor improvements
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* feat: add link to relation filtered table in Record Show Page
Closes#3125
* refactor: use generateFindManyRecordsQuery for optimization
* Fixes from review
* Minor fixes
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* WIP
* Finished cleaning favorites create, update, delete on record show page
* Fixed context menu favorite
* Fixed relation field bug
* Fix from review
* Review
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* fix: display label identifier field input in Show Page
Fixes#3003
* Cleaned a bit after comments
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* Add Enrich to frontend
* Naive backend implementation
* Add work email check
* Rename Enrich to Quick Action
* Refactor logic to a separate service
* Refacto to separate IntelligenceService
* Small fixes
* Missing Break statement
* Address PR comments
* Create company interface
* Improve edge case handling
* Use httpService instead of Axios
* Fix server tests