Prisma1: Client generation with a live endpoint

Created on 25 Sep 2018  路  3Comments  路  Source: prisma/prisma1

Is your feature request related to a problem? Please describe.
Currently, we use the prisma-generate-schema package to generate a Prisma schema based on the datamodel without a live endpoint. While this solution is awesome because we don't need a running service anymore but it is also another abstraction which makes tracking a bunch of issues difficult - because we now have two places to check.

Describe the solution you'd like
We can use a flag to signal to prisma generate command to not use the prisma-generate-schema and use a live endpoint or pre-generated schema instead. Example: prisma generate --use-endpoint.

Additional context
We need to test that how this feature lines up with known API differences https://github.com/prisma/prisma/issues/3185

Because things like executeRaw are artificially hidden in schema generator and might be exposed when we bypass it.

kinfeature areclient

Most helpful comment

I really like this idea. How about the following syntax/behavior:

  • Default (based on datamodel): prisma generate
  • Using endpoint in prisma.yml: prisma generate --endpoint
  • Using custom endpoint: prisma generate --endpoint http://some-server:4466

All 3 comments

I really like this idea. How about the following syntax/behavior:

  • Default (based on datamodel): prisma generate
  • Using endpoint in prisma.yml: prisma generate --endpoint
  • Using custom endpoint: prisma generate --endpoint http://some-server:4466

The syntax prisma generate --endpoint <url> is moved to this feature request:- https://github.com/prisma/prisma/issues/3206

This fix is available in the stable version - 1.18.1 - npm install -g prisma 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marktani picture marktani  路  3Comments

marktani picture marktani  路  3Comments

thomaswright picture thomaswright  路  3Comments

hoodsy picture hoodsy  路  3Comments

nikolasburk picture nikolasburk  路  3Comments