Should I use "use server" directive for database queries
If I remove the directive, it would still be running on server and everything is safe, right?
"use server"
import { db } from "~/server/db";
export async function getArticle(id: string) {
const article = await db.article.findUnique({
where: { id, published: true },
select: {
title: true,
description: true,
content: true,
tag: true,
createdAt: true,
author: {}
},
});
}