Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

feat!: new data proxy activation logic for Prisma 3.15.x #18

Merged
merged 8 commits into from
Jun 9, 2022

Conversation

millsp
Copy link
Member

@millsp millsp commented Jun 6, 2022

Updates the way the Data Proxy gets activated in the Prisma Client. This will be effective in Prisma 3.15.0.

BREAKING CHANGE:

Prisma peer deps raised to 3.15 and up.

@millsp millsp changed the title update data proxy activation logic chore: update data proxy activation logic Jun 6, 2022
@millsp millsp requested a review from jasonkuhrt June 6, 2022 13:55
src/Client/controller.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jasonkuhrt jasonkuhrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the peer dep requirements https://github.com/prisma/reflector/blob/main/package.json#L77-L80 too.

@jasonkuhrt jasonkuhrt changed the title chore: update data proxy activation logic feat!: update data proxy activation logic Jun 6, 2022
@jasonkuhrt jasonkuhrt changed the title feat!: update data proxy activation logic feat!: new data proxy activation logic for Prisma 3.15.x Jun 6, 2022
@millsp
Copy link
Member Author

millsp commented Jun 8, 2022

It looks like const PrismaClientRuntime = params.useDataProxy ? PrismaClientRuntimeProxy : PrismaClientRuntimeLocal came back after the merge.

package.json Outdated Show resolved Hide resolved
Copy link

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay!

@millsp
Copy link
Member Author

millsp commented Jun 9, 2022

I updated the code @jasonkuhrt, can we merge?

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
src/Client/controller.ts Outdated Show resolved Hide resolved
@jasonkuhrt
Copy link
Contributor

I wish we had tests on this library :D not yet, but I'm happy the PR comes from basically the most knowledgeable person on 🌍 about Prisma Client :D :D

@jasonkuhrt
Copy link
Contributor

@janpio @millsp I suspect this is outdated now?

/**
* About programmatically passing the connection string.
*
* The only way to pass to Proxy Runtime is via inlineDatasources configuration (A).
*
* The only way to pass to Local Runtime is via the constructor (B).
*
* @see https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#programmatically-override-a-datasource-url
*/
Is there a simpler way/unified way we can constructure the client for either case now?

@millsp
Copy link
Member Author

millsp commented Jun 9, 2022

URL overrides aren't supported via the constructor yet, unfortunately.

@janpio
Copy link

janpio commented Jun 9, 2022

Issue for this: prisma/prisma#11595

@jasonkuhrt jasonkuhrt merged commit d446477 into main Jun 9, 2022
@jasonkuhrt jasonkuhrt deleted the chore/data-proxy-activation-ga branch June 9, 2022 15:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants