Merge Firstname & Lastname of User

System Information
  • **3.4.6 (node v12.20.1) **:
  • Linux:
  • MongoDB:

I have a collection type where is a relation to one user. For the user I have a firstname and a lastname. Now I like to merge the firstname and the lastname, that I can request (GraphQL) the collection and the user with his fullname. Unfortunately I don’t really know where to start to achieve this. Hope you guess could help me or give me a hint.

Cheers,
Lars

1 Like

Hie @larse. In a situation like yours I would suggest merging the lastname and firstname on the Frontend/Client Side.So you just query the username and firstname and then merge ClientSide :grinning:

Hey @TafadzwaD this would be one way to go but I need this function for a searchbar. Because I like to achieve that the user can search the fullname and the searching process is done serverside.

1 Like