Does prisma batch queries when sending them to pos...
# orm-help
p
Does prisma batch queries when sending them to postgres? In my database, a specific organization has two projects. I’m running this query to fetch the organization’s projects:
Copy code
export const USER_WITH_PROJECTS_QUERY = gql`
  query UserWithProjectsQuery {
    me {
      id {
        organization {
          projects {
            id
            name
            lastUpdated
          }
        }
      }
    }
  }
`;
and expect it to make only one call to the database. However, inspecting the queries made to the postgres database I see that there are actually two calls (I’ve posted the postgres logs as a reply to this) Why is prisma not making one call for both projects? Is there no batching mechanism under the hood?
h
Hey, are you using Prisma Client in the backend? If yes, please refer to the following issue: https://github.com/prisma/prisma/issues/4712