some merge function from trpc library could be cool for this, or a client for nextjs 13 that allows both simple queries for server components and react-query for client components
you will get error Cannot access cart.getCartItems on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.