Since it’s a modular server based on different pac...
# prisma-whats-new
m
Since it’s a modular server based on different packages
h
let's use a thread
m
Cool! I wanted to know if there was a way to update
generated/prisma.graphql
using JS instead of the CLI
I’m using Trails.js and I’m working on a
trailpack-apollo
which is nothing but a package to support Apollo into Trails.js Today I read about Prisma and I thought it’s a good fit for my target. Since Trails has Models, Resolvers and so on I thought to adapt it to use Prisma for the DB connection, but right now I’m trying to understand few aspect of it: 1.
prisma deploy
needs a static schema, instead I have models (classes extending Trails Model) with a static function called schema 2.
prisma.yaml
is another static file which I would like to have differenciated based on the NODE_ENV e.g.
prisma.development.yaml
,
prisma.production.yaml
To solve 1. I was thinking to generate
prisma.graphql
aside from
prisma deploy
so that I can feed it into the server and feed it to
prisma deploy
To solve 2. I was thinking to pass the file
prisma.yaml
and the
prisma.graphql
to
prisma deploy
e.g.
Copy code
$ prisma deploy -c prisma.development.yarm -s prisma.graphql
where
-c
is the configuration and
-s
the schema
h
Ad 2. you can share something maybe here https://github.com/graphcool/prisma/issues/1983
👍 1