Skip to content

Commit

Permalink
Merge branch 'main' into DA-2265
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch authored Jan 20, 2025
2 parents aa5a445 + f19ea68 commit 39004a4
Show file tree
Hide file tree
Showing 21 changed files with 784 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository c

| Demo | Stack | Description |
| :------------------------------------------------------------------------------------------------------------------ | :----------- | --------------------------------------------------------------------------------------------------- |
| [`nextjs-api-routes`](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a REST API |
| [`nextjs`](https://pris.ly/e/orm/nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app |
| [`nextjs-graphql`](https://pris.ly/e/ts/graphql-nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a GraphQL API |
| [`graphql-nexus`](https://pris.ly/e/ts/graphql-nexus) | Backend only | GraphQL server based on [`@apollo/server`](https://www.apollographql.com/docs/apollo-server) |
| [`express`](https://pris.ly/e/ts/rest-express) | Backend only | Simple REST API with Express.JS |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository c

| Demo | Stack | Description |
| :------------------------------------------------------------------------------------------------------------------ | :----------- | --------------------------------------------------------------------------------------------------- |
| [`nextjs-api-routes`](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a REST API |
| [`nextjs`](https://pris.ly/e/orm/nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app |
| [`nextjs-graphql`](https://pris.ly/e/ts/graphql-nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a GraphQL API |
| [`graphql-nexus`](https://pris.ly/e/ts/graphql-nexus) | Backend only | GraphQL server based on [`@apollo/server`](https://www.apollographql.com/docs/apollo-server) |
| [`express`](https://pris.ly/e/ts/rest-express) | Backend only | Simple REST API with Express.JS |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository c
| Demo | Stack | Description |
| :------------------------------------------------------------------------------------------------------------------ | :----------- | --------------------------------------------------------------------------------------------------- |
| [`nextjs-api-routes`](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a REST API |
| [`nextjs`](https://pris.ly/e/orm/nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app |
| [`nextjs-graphql`](https://pris.ly/e/ts/graphql-nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a GraphQL API |
| [`graphql-nexus`](https://pris.ly/e/ts/graphql-nexus) | Backend only | GraphQL server based on [`@apollo/server`](https://www.apollographql.com/docs/apollo-server) |
| [`express`](https://pris.ly/e/ts/rest-express) | Backend only | Simple REST API with Express.JS |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository c

| Demo | Stack | Description |
| :------------------------------------------------------------------------------------------------------------------ | :----------- | --------------------------------------------------------------------------------------------------- |
| [`nextjs-api-routes`](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a REST API |
| [`nextjs`](https://pris.ly/e/orm/nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app |
| [`nextjs-graphql`](https://pris.ly/e/ts/graphql-nextjs) | Fullstack | Simple [Next.js](https://nextjs.org/) app (React) with a GraphQL API |
| [`graphql-nexus`](https://pris.ly/e/ts/graphql-nexus) | Backend only | GraphQL server based on [`@apollo/server`](https://www.apollographql.com/docs/apollo-server) |
| [`express`](https://pris.ly/e/ts/rest-express) | Backend only | Simple REST API with Express.JS |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ You can find several ready-to-run examples that show how to implement a REST API
| [`fastify`](https://pris.ly/e/ts/rest-fastify) | Backend only | REST API using Fastify and Prisma Client. |
| [`hapi`](https://pris.ly/e/ts/rest-hapi) | Backend only | REST API using hapi and Prisma Client |
| [`nestjs`](https://pris.ly/e/ts/rest-nestjs) | Backend only | Nest.js app (Express) with a REST API |
| [`nextjs-api-routes`](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack | Next.js app (React) with a REST API |
| [`nextjs`](https://pris.ly/e/orm/nextjs) | Fullstack | Next.js app (React) with a REST API |
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ You can find several ready-to-run examples that show how to fullstack apps with

| **Example** | **Description** |
| :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------- |
| [Next.js (API Routes)](https://pris.ly/e/ts/rest-nextjs-api-routes) | Fullstack Next.js app using `getServerSideProps` & API Routes |
| [Next.js](https://pris.ly/e/orm/nextjs) | Fullstack Next.js 15 app |
| [Next.js (GraphQL)](https://pris.ly/e/ts/graphql-nextjs) | Fullstack Next.js app using GraphQL Yoga, Pothos, & Apollo Client |
| [Next.js (tRPC)](https://pris.ly/e/ts/trpc-nextjs) | Fullstack Next.js app using tRPC |
| [Remix](https://pris.ly/e/ts/remix) | Fullstack Remix app using actions and loaders |
| [SvelteKit](https://pris.ly/e/ts/sveltekit) | Fullstack Sveltekit app using actions and loaders |
| [Nuxt](https://pris.ly/e/ts/rest-nuxtjs) | Fullstack Nuxt app using API routes |
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ Then using a package like [`dotenv-cli`](https://www.npmjs.com/package/dotenv-cl

</TopBlock>

## Understanding Prisma's Default .env Behavior
Prisma automatically loads environment variables from a .env file located at the root of your project by default. When using tools like dotenv-cli to specify a different .env file (e.g., .env.test), Prisma behaves as follows:

- Primary Variables: It uses variables from the specified file (dotenv -e .env.test) only if they are not already set in the environment.
- Fallback Variables: For variables not included in the specified file, Prisma will load them from .env.

This means that .env acts as a fallback. As a result, if .env contains values not meant for the current environment, they may still be loaded unintentionally.

## Setup multiple `.env` files

For the purpose of this guide, it is assumed you have a dedicated development database that you use whilst developing your application.
Expand Down
11 changes: 10 additions & 1 deletion content/300-accelerate/250-connection-pooling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ When not using Prisma Accelerate, you can configure the connection pool of Prism

Autoscaling allows Accelerate to dynamically allocate resources based on your application's traffic. As consistent usage approaches the current connection limit, Accelerate will begin allocating new resources to handle the increased load. If traffic continues to rise, Accelerate will scale up further. Conversely, when traffic decreases, Accelerate will scale down accordingly.

*To provide more context, Accelerate horizontally scales your environment by distributing the total available connections across multiple Query Engine instances. For example:*

- If your environment connection limit is set to 1000, Accelerate will scale up to multiple Query Engine instances (e.g., 100 instances).
- Each Query Engine instance is then assigned a share of the total connectionsβ€” in this case, 10 connections per instance.
- This is why an individual Query Engine instance reports a connection limit of 10, even though the total connection limit for the environment is 1000.

*This scaling mechanism ensures that your application can handle higher traffic loads by increasing the number of Query Engine instances while keeping the connection pool management efficient and distributed.*


Autoscaling is enabled when the Accelerate connection limit is set above the default value. This feature is not available on the Starter plan.

The maximum value of your Accelerate connection limit is based on your [Prisma Data Platform plan](https://www.prisma.io/pricing).
Expand Down Expand Up @@ -120,4 +129,4 @@ See the [troubleshooting guide](/accelerate/troubleshoot#p6009-responsesizelimit

:::warning
While you can increase the query response size, it’s recommended to limit data retrieval to what you actually need. This improves database performance, reduces stress on your database, and makes your frontend applications more responsive. Queries exceeding 5 MB in size often indicate a need for optimization. Learn more in the [troubleshooting guide](/accelerate/troubleshoot#p6009-responsesizelimitexceeded).
:::
:::
18 changes: 18 additions & 0 deletions content/300-accelerate/600-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,21 @@ Using on-demand cache invalidation in these scenarios helps keep only the necess
## How does Accelerate count queries for billing?

Accelerate counts queries at the Prisma Client invocation level. A single Prisma query may translate into multiple SQL statements under the hood, but it will only count as one query for billing purposes. This ensures straightforward, predictable billing that reflects the Prisma Client usage rather than the complexity of the underlying SQL operations.

## How do I switch from GitHub login to email and password login?

If you previously signed up using GitHub and want to switch to email and password login, follow these steps:

### 1. Verify Your GitHub Email Address
- Check the primary email address associated with your GitHub account (e.g., from your GitHub profile or notification settings).

### 2. Create a New Email/Password Account
- Go to the email/password sign-up page.
- Use the **same email address** linked to your GitHub account to create the new account.
- Our system will automatically connect your new email/password account to your existing data.

### 3. Test Your Login
- Log out and try logging in with your email and the password you just created.

> **Note**: If you encounter any issues, please contact our support team for help linking your accounts.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: 'How to migrate data using the expand and contract pattern'
metaTitle: 'How to migrate data using the expand and contract pattern'
title: 'Migrate data using the expand and contract pattern'
metaTitle: 'How to migrate data with Prisma ORM using the expand and contract pattern'
description: 'Learn how to perform data migrations using the expand and contract pattern with Prisma ORM'
sidebar_label: 'Data migration with expand and contract'
sidebar_label: 'Migrate data with expand and contract'
image: '/img/guides/data-migration-cover.png'
tags:
- migration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'How to manage schema changes in a team'
metaTitle: 'How to manage schema changes in a team with Prisma Migrate'
description: 'Learn how to use Prisma Migrate effectively when collaborating on a project as a team'
sidebar_label: 'Team schema changes'
sidebar_label: 'Manage schema changes'
image: '/img/guides/schema-migration-cover.png'
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: 'Using Prisma with Turborepo'
metaTitle: 'Using Prisma with Turborepo'
title: 'How to use Prisma ORM with Turborepo'
metaTitle: 'How to use Prisma ORM with Turborepo'
description: 'Learn step-by-step how to integrate Prisma ORM with Turborepo to build modular, scalable monorepo architectures efficiently.'
sidebar_label: 'Prisma with Turborepo'
sidebar_label: 'Use Prisma ORM with Turborepo'
image: '/img/guides/prisma-turborepo-setup.png'
tags:
- Turborepo
- Monorepo
- Vercel
---

Prisma is a powerful ORM for managing databases, and [Turborepo](https://turbo.build/) simplifies monorepo workflows. By combining these tools, you can create a scalable, modular architecture for your projects.
Expand Down
Loading

0 comments on commit 39004a4

Please sign in to comment.