Does anyone use prisma-aurora with `type` object i...
# orm-help
g
Does anyone use prisma-aurora with
type
object in the schema file? It doesn’t include
type
in the generated schema. session.model.schema:
Copy code
datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

model Session {
  id               String                   @id @default(auto()) @map("_id") @db.ObjectId
  sessionId        String                   @unique
  shop             String
  state            String
  isOnline         Boolean
  scope            String
  expires          DateTime?
  accessToken      String
  onlineAccessInfo SessionOnlineAccessInfo?
}

type SessionOnlineAccessInfo {
  expires_in            Int
  associated_user_scope String
  associated_user       SessionAssociatedUser
}

type SessionAssociatedUser {
  id             Int
  first_name     String
  last_name      String
  email          String
  email_verified Boolean
  account_owner  Boolean
  locale         String
  collaborator   Boolean
}
Generated schema file (aurora):
Copy code
// ◮◮◮ GENERATED BY AURORA ◮◮◮
datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model Session {
  id               String                   @id @default(auto()) @map("_id") @db.ObjectId
  sessionId        String                   @unique
  shop             String
  state            String
  isOnline         Boolean
  scope            String
  expires          DateTime?
  accessToken      String
  onlineAccessInfo SessionOnlineAccessInfo?
}
r
Hi @Geebrox - from what I recall,
type
is currently only available for mongodb .. but let me double check that quick ..
g
Hello @Richard Ward, Thank you for your reply. I am using MongoDB provider with aurora
r
are you connecting to MongoDB?
hhmm.. just as it says in the schema file 😄
That's odd - it knows of
SessionOnlineAccessInfo
but doesn't create it ..
g
Yes, with connection everything is okay. It is more prisma-aurora issue. If anyone uses aurora with mongoDB or knows the solution on how to fix this issue, I need help. It maybe the wrong place to ask this question, but as far as I know developer of prisma-aurora is here. @Sabin Adams
s
@Geebrox The
type
keyword currently isn't supported in aurora. Working on some updates that should add it in but for now those won't work 😢
g
@Sabin Adams I see, thank you for update. I will wait for the new release. For now I will disable aurora, but I love it and will wait. BTW, last versions of aurora (^1.3.7 and higher) don’t generate binaries in .bin folder, could you please also take a look into this if you have chance? Thank you!
s
@Geebrox I believe that bin issue should be fixed in
v1.3.9
. Let me know if you're still seeing the problem.
g
@Sabin Adams checked
v1.3.9
and no more bin issues, thank you
🦜 1