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

    rawriclark

    01/27/2019, 10:12 PM
    from prisma to mongo?
  • j

    John Smeeth

    01/28/2019, 2:23 AM
    hi all
  • j

    John Smeeth

    01/28/2019, 2:23 AM
    I faced error
    Copy code
    syntax error: unexpected http after top level declaration
    when generate go
  • j

    John Smeeth

    01/28/2019, 2:26 AM
    It seem caused by this line
    var DefaultEndpoint = ""<http://localhost:4466>""
    (line 66) of generated file in
    generated/prisma-client/prisma.go
  • j

    John Smeeth

    01/28/2019, 3:37 AM
    I'm follow this tut https://www.prisma.io/docs/get-started/03-build-graphql-servers-with-prisma-GO-g201/ when create graphql server I see i recreate model as when i create from
    datamodel.prisma
    how to avoid it?
  • w

    Will

    01/28/2019, 8:22 AM
    Hey Guys, Does anyone know how to auto generate revolver scaffolding with relationships? This is what I am currently getting
    Copy code
    // This resolver file was scaffolded by <http://github.com/prisma/graphqlgen|github.com/prisma/graphqlgen>, DO NOT EDIT.
    // Please do not import this file directly but copy & paste to your application code.
    
    import { RegionResolvers } from '../graphqlgen';
    
    export const Region: RegionResolvers.Type = {
      ...RegionResolvers.defaultResolvers,
    
      country: (parent, args, ctx) => {
        throw new Error('Resolver not implemented');
      },
      properties: (parent, args, ctx) => {
        throw new Error('Resolver not implemented');
      }
    };
    p
    • 2
    • 2
  • n

    Nicolò Paganin

    01/28/2019, 1:03 PM
    Hi guys, do you know when will be possible to use the
    Polymorphic Relations
    https://github.com/prisma/prisma/issues/3407 of the new Datamodel v2? In particular the
    inheritance directive
    thanks
    w
    • 2
    • 1
  • r

    rawriclark

    01/28/2019, 2:39 PM
    does anyone know how to do subscription but with condition on a related field
  • r

    rawriclark

    01/28/2019, 2:40 PM
    subscribe if room has users with id = 1
  • r

    rawriclark

    01/28/2019, 2:40 PM
    something like this
  • r

    rawriclark

    01/28/2019, 4:16 PM
    can anyone help me please? I really need some work around / alternative https://github.com/prisma/prisma/issues/3943
    h
    • 2
    • 3
  • r

    rawriclark

    01/28/2019, 6:24 PM
    I guess i'm switching to MySQL for now
  • r

    rawriclark

    01/28/2019, 6:24 PM
    MongoDb simply not ready for production yet
    e
    • 2
    • 2
  • r

    rawriclark

    01/28/2019, 6:25 PM
    I wonder if I can migrate my data later on though
    🤔 1
  • s

    Steveeeie

    01/28/2019, 6:27 PM
    Is there anyway to re-arrange the order of a relational field that is an array? When a new item is added to the array it is added in the order it was added [id1, id2, id3] etc. I want to be able to update the order afterwards? how is this achievable
  • s

    Steveeeie

    01/28/2019, 6:27 PM
    been pulling my hair out
  • r

    rawriclark

    01/28/2019, 6:28 PM
    i think you should re consider your logic
  • r

    rawriclark

    01/28/2019, 6:28 PM
    why do you need to re-order them anyway
  • r

    rawriclark

    01/28/2019, 6:28 PM
    you need a field "order"
  • r

    rawriclark

    01/28/2019, 6:28 PM
    and just query that with sorting , etc
  • r

    rawriclark

    01/28/2019, 6:28 PM
    that way no matter how they are inserted you know the order
  • s

    Steveeeie

    01/28/2019, 6:30 PM
    I have that right now, and it works but if I update the order too quickly then the order list becomes out of sync .. maybe I'm looking in the wrong place for the cause of this issue
  • r

    rawriclark

    01/28/2019, 6:31 PM
    yes I would check the logic on how you update your order then
  • r

    rawriclark

    01/28/2019, 6:31 PM
    not the actuall order inside the database
  • r

    rawriclark

    01/28/2019, 6:31 PM
    haha
  • s

    Steveeeie

    01/28/2019, 6:32 PM
    Oh wait I have a list on the parent, are you saying having an order number on the individual items?
  • s

    Steveeeie

    01/28/2019, 6:32 PM
    I did think about that but wouldn't I need to update all of the items if one item moves?
  • r

    rawriclark

    01/28/2019, 6:33 PM
    thats correct
  • r

    rawriclark

    01/28/2019, 6:33 PM
    depending on your ordering logic
  • r

    rawriclark

    01/28/2019, 6:33 PM
    you just need to update 2 items
    n
    s
    • 3
    • 4
1...197198199...637Latest