https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • a

    Aaron Dye Jr

    09/01/2020, 11:37 AM
    Alright ryan.
  • a

    Alex Reyne

    09/01/2020, 8:57 PM
    Is there a way to delete something based on two identifiers?
  • a

    Alex Reyne

    09/01/2020, 8:58 PM
    Ie:
    Copy code
    await prisma.rosters.delete({
    										where: {
    											id: raid.id,
    											raider_id: user.id
    										}
    									})
    r
    • 2
    • 2
  • s

    Sascha

    09/03/2020, 2:18 PM
    Hey there - Can I do an upsert with a where clause where the id is a compound key? How would that work?
  • s

    Sascha

    09/03/2020, 2:20 PM
    E.g. if I use something like
    @@id([a, b])
    , how can I do upserts on those models?
    d
    r
    • 3
    • 7
  • n

    Natalia

    09/03/2020, 2:51 PM
    🤗 “What’s new in Prisma (v2.6.0)” live stream starts in 10 minutes!* 

    Tune inâ–ľ

     *to learn about new releases, planned features, and other interesting bits from the Prisma world.
    prisma cool 4
    fast parrot 6
    đź’Ż 4
  • s

    Sascha

    09/03/2020, 2:56 PM
    When using Nexus, what's the equivalent to stringArg() for JSON? I can't find jsonArg() ...
    r
    m
    • 3
    • 5
  • p

    Patrick

    09/03/2020, 3:43 PM
    Hey all, updating from 2.5.0 to 2.6.0, it seems like Prisma started treating optional fields in my DB as required. Is this bug or some breaking change?
    j
    j
    • 3
    • 9
  • p

    Philipp Rajah Moura Srivastava

    09/04/2020, 1:59 AM
    Hi, so going through the documentation of prisma v1.34 I noticed that an OR operator is not supported for mongo DB so I thought about doing a raw query but that too seems to not be supported. Is the only solution to this really to query twice and combine the two queries before returning? That wouldn’t be the end of the world if it was temporary… are there any changes coming soon to prisma 1.34 or prisma 2 in regards to mongo DB? Thoughts and advice would be appreciated.
    r
    • 2
    • 6
  • m

    Manthan Mallikarjun

    09/04/2020, 8:13 AM
    I just wanted to post this again to ask more people, is this the correct way to test prisma? https://www.notion.so/nahtnam/Testing-with-Prisma-and-Jest-4263872c3a73439f8a16bdd27a604ce5 Is there a better way (preferably with Factories) or more advanced mocking?
  • c

    Christian Valencia

    09/04/2020, 1:20 PM
    hi, i have this issue trying to update . That field is type datetime . what means Object(weak) ?
    r
    d
    j
    • 4
    • 8
  • z

    zth

    09/05/2020, 8:00 PM
    What's the status on migrate? I understand it's still experimental, but are people using it? I guess I'm wondering how close it is to being stable
    đź‘€ 4
    a
    • 2
    • 1
  • l

    Leo

    09/06/2020, 4:09 PM
    Hey folks, I'm going live in about 10 minutes! We'll be building a simple fullstack ticket app using Next.js and Prisma. We will use Heroku to host our database, handle authentication with Auth0, and deploy our finished app to Vercel. Come say hi!

    https://www.youtube.com/watch?v=O9qzd_Dbov8â–ľ

    prisma green 4
    đź’Ż 3
  • o

    Omar Harras

    09/06/2020, 8:15 PM
    Hello guys, I’m using
    graphql-yoga
    with prisma 2, and I have some issues when creating items with
    Enums
    I got this error when I execute my mutation :
    Copy code
    Argument type: Provided value 
    {
      set: [
        'CLOTHES'
      ]
    }
    of type Json on prisma.createOneItem is not a enum.
    → Possible values: Type.CLOTHES, Type.SHOES, Type.ACCESSORIES, Type.DECORATION
    anyone have an idea on how enums works with mutations ? thanks you
    r
    • 2
    • 22
  • a

    Alex Reyne

    09/06/2020, 9:09 PM
    I have genuinely no idea what this means.
    Copy code
    Introspecting based on datasource defined in prisma/schema.prisma …
    Oops, an unexpected error occured!
    [/rustc/04488afe34512aa4c33566eb16d8c912a3ae04f9/src/libcore/str/mod.rs:1942:47] byte index                                                                1 is out of bounds of ``
    l
    r
    j
    • 4
    • 4
  • s

    Sascha

    09/07/2020, 7:31 AM
    Hey there! How can one define Prisma middlewares when using the nexus-plugin-prisma?
    r
    • 2
    • 26
  • b

    Billy Ohgren

    09/07/2020, 11:41 AM
    Is there any admin tool that is built with prisma2 in mind? Something like wp-admin for those of you who are familiar with Wordpress
    n
    r
    a
    • 4
    • 4
  • b

    Billy Ohgren

    09/07/2020, 11:42 AM
    Or a nice boilerplate project to achieve similar functionality
  • m

    MGH Developpers

    09/07/2020, 11:59 AM
    https://creche.mghdeveloppers.com/
  • m

    Michael Aubry

    09/08/2020, 2:44 AM
    Any Graph.cool folks can help me get one last DB copy of a customers site. So I can backup the latest data with that version on Prisma2
    r
    n
    • 3
    • 2
  • l

    Lars-Jørgen Kristiansen

    09/08/2020, 9:23 AM
    Hi! Trying to upgrade from prisma1 to prisma2 and got stuck on the step where it wants me to "Fix 1-1 relations by adding
    UNIQUE
    constraints" It seems like some of the contraints it wants me to add are "switched" This is the problamatic datamodel
    Copy code
    type Absent {
       treatment: AbsentTreatment!
        @relation(link: INLINE, name: "TreatmentOnAbsent", onDelete: CASCADE)
    }
    
    type AbsentTreatment {
      absent: Absent! @relation(name: "TreatmentOnAbsent", onDelete: SET_NULL)
    }
    It wants me to run:
    ALTER TABLE "default$default"."AbsentTreatment" ADD UNIQUE ("absent");
    But there is no absent field on AbsentTreatment with this model.. Should I instead run the following?
    ALTER TABLE "default$default"."Absent" ADD UNIQUE ("treatment");
    Or should i update the prisma1 datamodel?
    n
    • 2
    • 2
  • k

    KJReactor

    09/08/2020, 1:25 PM
    I am running Prisma 2.3.0 and it seems whenever I do migrations they do not update the database.
    r
    • 2
    • 13
  • z

    zth

    09/08/2020, 2:45 PM
    When using
    prisma migrate
    , what are people using to deal with indexes and other "non-Prisma" stuff for migrations? A separate migration setup?
    r
    j
    • 3
    • 6
  • j

    Jonathan Romano

    09/09/2020, 4:55 PM
    What's the preferred method to create multiple entities at once in Prisma2? Just call
    create
    multiple times in a
    Promise.all?
    r
    j
    • 3
    • 2
  • w

    Warren Day

    09/10/2020, 10:11 AM
    Any reason for deprecation of connect/disconnect?
    r
    n
    j
    • 4
    • 4
  • j

    Jonathan Romano

    09/11/2020, 12:43 AM
    Thinking of building an adapter to use Prisma to back FeathersJS at some point
    đź’Ż 5
    n
    • 2
    • 1
  • d

    Darda

    09/12/2020, 2:29 PM
    this place seems quiet
  • d

    Darda

    09/12/2020, 2:30 PM
    I don't know but it seems like my issue got deleted from github so I'm posting it here, maybe it was just too silly. but I need serious help.
    j
    • 2
    • 4
  • d

    Darda

    09/12/2020, 2:31 PM
    I'm getting this weird error message after running docker-compose up -d
    r
    • 2
    • 1
  • d

    Darda

    09/12/2020, 2:32 PM
    I'm running this on WSL Ubuntu 18.04
1...395396397...637Latest