pereira
pereira
TTwenty
Created by pereira on 5/24/2024 in #❓︱help
Create and fetch new database entities
Hi, I'm solving implementing this feature (https://github.com/twentyhq/twenty/issues/4199). I'm trying to follow the tips that Felix left in the issue thread. So far, I was able to add a new column, everyone to the messageThread table. After that, I've also created a new table (by table im referring to the object-metadata.ts files, and the repositories) name d MessageThreadMembers, with two columns for the MessageThreadId and WorkspaceMemberID. I used psql to query my local database and all the tables and FK constraints were working fine. Now, here is where im stuck: I'm trying to fetch the workspace members of a message thread, so the frontend can consume that information and use it for the message thread members chip/dropdown that I'll eventually code it aswell. I've tried a diverse combination of things here, using how the fetching of MessageThread works as a reference. My workflow here was something like: Add the necessary export types in the graphql.tsx file inside twenty-chrome-extension/src/generated folder -> create fetchAllThreadMembersOperationSignatureFactory.ts -> create a new hook that uses useFindManyRecords and add an entry in CoreObjectNameSingular. Sorry for the wall of text, I tried to explain my current situation the best I could. I'm not sure if Im moving in the right direction, I only worked with REST APIs before, so this Graphql world is very different from what I am used to. Can someone point me in the right direction on how I can fetch entities from the database/backend so I can use them in the frontend? Thanks in advance
23 replies
TTwenty
Created by pereira on 5/21/2024 in #❓︱help
How to run --verbose on database reset
Hello, I'm creating a new table in the database, and implementing new methods in it's repository. However, when I run the npx nx database:reset twenty-server, I get an error. However, it is not verbose at all. --verbose flag doesnt seem to work. Can I get some help on how to see where it is failing?
7 replies