Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator Idea: Query engine server/proxy #370

Open
schickling opened this issue Aug 17, 2019 · 2 comments

Comments

@schickling
Copy link
Member

commented Aug 17, 2019

Prisma 1 was based on having a data API proxy server running in front of your database. This was useful for a number of scenarios (e.g. connection pooling for FaaS environments - see #276). An easy way to bring back support for this scenario would be to create another generator that generates (1) a server component which hosts the Prisma query engine (e.g. as Docker image) and (2) a forked version of Photon that doesn't include the query engine but forwards requests to the query proxy.

Things to think through:

  • Auth handling (e.g. via JWT)
  • How does deployment work? ("immutable infrastructure" vs stateful prisma deploy flow)
@createvo

This comment has been minimized.

Copy link

commented Aug 18, 2019

Great idea! I wrote on slack just now something similar. Could be done through the prisma2 CLI for an initial stage. An API endpoint is surely the best option. Like prisma Management.

@mcmar

This comment has been minimized.

Copy link

commented Sep 20, 2019

Really glad to see that this is being reconsidered after it was dropped from Prisma2.

I think this appeals mostly to enterprise or large company use-cases, so immutable infrastructure is vastly preferable for that set of users compared to stateful prisma deploy flow.

And I know the answer is probably no, but it would be great if the API proxy server spoke GraphQL via the OpenCRUD spec and included support for realtime data via websocket subscriptions and also could call lambda functions in response to data changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.