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

    José Gomes

    03/12/2019, 11:30 AM
    Defining many to many relations with extra fields, how is the correct way? "User" (many - to many ) "Site". In UserSite table i need a extra column. Example: PermissionLevel. Do i need to define a UserSite Type for this, or is a better way?
  • w

    Wendell Misiedjan

    03/12/2019, 12:33 PM
    Is there an easier way to update an entity only when there is an actual data change? Now I get spammed with subscription updates every time I execute an upsert event even when there are no actual changes, suggestions?
    • 1
    • 1
  • l

    LeafyDula

    03/12/2019, 12:52 PM
    Hello Everyone, How you doing?
  • l

    LeafyDula

    03/12/2019, 12:52 PM
    I'm trying to solve a problem using prisma.
  • l

    LeafyDula

    03/12/2019, 12:53 PM
    I want to create an entity called "Order" in my datamodel
  • l

    LeafyDula

    03/12/2019, 12:53 PM
    It has this automatically incremental field refID.
  • l

    LeafyDula

    03/12/2019, 12:54 PM
    This field should be automatically incremented for each Order
  • l

    LeafyDula

    03/12/2019, 12:54 PM
    Eg: The first order will have the value OD1 to the refID field the next one will have OD2 and so on...
  • l

    LeafyDula

    03/12/2019, 12:56 PM
    Have you tried to solve something like this in prisma? I also created a stack-overflow post on this. https://stackoverflow.com/questions/55000909/auto-generated-incrementing-field-for-prisma
    e
    a
    b
    • 4
    • 17
  • l

    Lars-Jørgen Kristiansen

    03/12/2019, 2:15 PM
    Is it possible to do subscriptions with nexus?
    j
    z
    w
    • 4
    • 9
  • w

    Wendell Misiedjan

    03/12/2019, 2:24 PM
    I'm getting update subscriptions even when there are no 'updatedFields', is this intentional:
    Copy code
    "mutation": "UPDATED",
          "updatedFields": [],
    • 1
    • 2
  • a

    Andres Clavijo

    03/12/2019, 2:24 PM
    Hi everyone, i am getting this error
    No Node for the model User with value 5c87b80efec496584da9fbf3 for id found.
    the thing is, if i search with the id in mongodb the node does exist.
  • a

    Andres Clavijo

    03/12/2019, 2:48 PM
    I am describe the error with code in the forum, so if anyone can help me, it would be great, thanks in advance 👍 https://www.prisma.io/forum/t/no-node-for-the-model-user-with-value-5c87b80efec496584da9fbf3-for-id-found/6345
  • j

    José Gomes

    03/12/2019, 3:31 PM
    Prisma already has dataloaders or i need to handle that by my self? Thanks!
  • j

    Jidé

    03/12/2019, 3:46 PM
    doooowwwnnnn aggggaaaaiiiin 🙂
    d
    • 2
    • 1
  • s

    sam

    03/12/2019, 3:55 PM
    does anyone else get the following error from the CLI?
    Copy code
    prisma playground
     ▸    Cannot read property 'getEndpoint' of undefined
  • c

    Clément

    03/12/2019, 5:02 PM
    Hello, I've started using Prisma and I have a rather dumb question. Following this example:
    Copy code
    type Human {
      id: ID! @unique
      brain: Brain
    }
    
    type Brain {
      id: ID! @unique
      human: Human!
    }
    This is an optional one-to-one relation, how should I check the existence of this relation from Human perspective ? I did:
    Copy code
    const brain = await prisma.human({ id }).brain()    
    if (!brain) { ... }
    But the typing is not correct,
    brain
    is of type
    Brain
    , and not
    Brain | undefined
    Am I doing something wrong ? Thanks 😃
    l
    s
    d
    • 4
    • 21
  • m

    Mahmoud El Kotoury

    03/12/2019, 8:01 PM
    guys please need your help If I have assets either text or image or video , each of them has a different attributes like for example text has font size font color etc.. , image has image url and other attributes , If the user going to use a template , i need to know if the asset is text or img or video in order to fill their required attributes so my question is , on database level , how would you approach this Really thank you
  • h

    Henry

    03/12/2019, 9:21 PM
    Another small nexus question. When creating input types in nexus, how does one use a prisma DateTime scalar?
    c
    • 2
    • 4
  • j

    jblevins

    03/13/2019, 12:22 AM
    Question about fields in input types. I keep getting the error message 'Error: Expected Employee to be a possible input type, saw GrpahQLObjectType' I used t.field('owner', { 'Employee' }); is this the wrong way to do this?
  • p

    Peter Zhou

    03/13/2019, 1:26 AM
    Anyone have experience with high volume writes? One of my mutations takes in batches of data and performs ~ 1000+ concurrent writes, and gives the error shown in this post https://www.prisma.io/forum/t/internal-server-error-on-a-lot-of-concurrent-writing/5420/8
  • p

    Peter Zhou

    03/13/2019, 1:27 AM
    What’s the accepted solution for something like this? Is there a way to easily increase the job queue?
  • j

    Julián Álvarez

    03/13/2019, 4:15 AM
    Hello, I need some help with enum type with Nexus
  • j

    Julián Álvarez

    03/13/2019, 4:15 AM
    I get this error
  • j

    Julián Álvarez

    03/13/2019, 4:15 AM
    Type 'string' is not assignable to type '"SOURCE"'.
  • j

    Julián Álvarez

    03/13/2019, 4:16 AM
    in my datamodel I have this enum
  • j

    Julián Álvarez

    03/13/2019, 4:16 AM
    enum.ts
  • j

    Julián Álvarez

    03/13/2019, 4:16 AM
    and my mutation looks like this
  • j

    Julián Álvarez

    03/13/2019, 4:17 AM
    Mutation_ts.ts
    b
    • 2
    • 4
  • j

    Julián Álvarez

    03/13/2019, 4:18 AM
    The app is working but the compiler of typescript is saying the error here:
1...233234235...637Latest