forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set primary link in Links field (twentyhq#5429)
Closes twentyhq#5375 <img width="381" alt="image" src="https://github.com/twentyhq/twenty/assets/3098428/d87773df-c685-466b-ae35-a8349f79df48"> _____ ~~Note that I ugraded `@apollo/client` to v3.10.4 because current version is causing an error when trying to write the Links field in the cache in `updateRecordFromCache` (`TypeError: Cannot convert object to primitive value`). After upgrade, the error is gone but console still prints a warning (here the custom object name is `Listing` and the Links field name is `website`):~~ <img width="964" alt="image" src="https://github.com/twentyhq/twenty/assets/3098428/834b8909-e8dc-464a-8c5a-6b7e4c964a7f"> ~~It might be because the Links field seems to somehow have a `__typename` property in Apollo's cache, so Apollo considers it as a record and tries to match the object's cache with an id, but the Links field value has no id so it can't find it. We might want to find where this `__typename` is added and remove it from the Links object in the cache.~~ Edit: will fix this in another PR as upgrading `@apollo/client` + `apollo-upload-client` seems to break types and/or tests. Related issue: [twentyhq#5437](twentyhq#5437)
- Loading branch information
1 parent
2386191
commit 47a6146
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters