Should I be trying to import the /generated/index....
# orm-help
d
Should I be trying to import the /generated/index.js file? Or the .schema file?
v
hi, the generated/index.js contains the prisma client that it's everything you need for 'calling' your db, internally it uses the schema.js, as typeDefs that is a parameter to instantiate the Prisma client
Copy code
// index.js

exports.Prisma = prisma_lib_1.makePrismaClientClass({
  typeDefs,
  models,
  endpoint: `${process.env["PRISMA_ENDPOINT"]}`,
  secret: `${process.env["PRISMA_MANAGEMENT_API_SECRET"]}`
});

exports.prisma = new exports.Prisma();
Copy code
// your file.js

const { prisma } = require('./generated/prisma-client')
here an example: https://github.com/prisma/prisma-examples/blob/master/node/graphql/src/index.js if u want to generate a shema.graphql u can use the graphql-schema generator
Copy code
# prisma.yml

  - generator: graphql-schema
    output: ../src/data-access-layer/prisma-client/
d
Oh neat, thank you!