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

    callan

    10/27/2018, 11:26 AM
    is it because
    ArgsCreateItem
    needs to be given the same index signature, otherwise it cannot be assigned?
  • c

    callan

    10/27/2018, 12:52 PM
    for what its worth I fixed this by assigning to unknown then to IResolvers
  • c

    callan

    10/27/2018, 12:52 PM
  • a

    affanshahid

    10/27/2018, 4:35 PM
    Graphqlgen is outputting the wrong type structure for subscriptions
  • s

    Sufyan

    10/27/2018, 11:16 PM
    Hi All, I am using trying prisma deploy apparently there is not error in log files. But there is not table/relation created in schema. Can anyone guide me about this. what reference files would you need to understand the issue completely. Stuck on this since hours
  • z

    zonofthor

    10/27/2018, 11:26 PM
    I'm setting a one to many relations by connecting array of ids - but existing connections are kept intact - is there no way to clear them all before adding new?
    Copy code
    mutation {
      updateStation(
        where: { id: "S8Cdjsc3DsPvuQJp1ZlSMGfej" }
        data: {
          editors: {
            connect: [
              { id: "aZGL8IkcULGPNFdUZG37Qc1kX" }
              { id: "1coBflfBj8prHe4USggSbG49J" }
              { id: "4Kr8VGxMHys3hH5B0pJDighRc" }
              { id: "54lPfOvRAMXljSk7wlJp6r29N" }
            ]
          }
        }
      ) {
        id
        title
        editors {
          id
          name
        }
      }
    }
    l
    • 2
    • 33
  • h

    hinsxd

    10/28/2018, 7:22 AM
    hi there, I am new to database design and I wanna ask…
  • h

    hinsxd

    10/28/2018, 7:23 AM
    If I want to serve some fixed data like
    PostType { id name }
    with prisma, what is the best practice?
  • h

    hinsxd

    10/28/2018, 7:25 AM
    Prisma does not allow incremental
    id
    not custom
    id
    setting, so I need to set
    postTypeId: Int @unique
    as a workaround, but this just doesnt sounds natural. I want to do something like ordinary CMS.
  • h

    hinsxd

    10/28/2018, 7:27 AM
    I’ve thought of serving from JSON files but dealing with relational data will be a waste of Prisma API.
  • i

    Industrial

    10/28/2018, 9:47 AM
    Hi. Can anyone help me with my ticket? 🙂 It's about the
    WhereUniqueInput
    and why it only takes an
    id
    property; https://github.com/prisma/prisma/issues/3384
  • i

    Industrial

    10/28/2018, 9:54 AM
    Hmmmm
  • i

    Industrial

    10/28/2018, 9:54 AM
    upsertMarket(where)
    and
    market(where)
    are both
    WhereUniqueInput
    so I also can not look up a
    market
    by anything other then it's ID ...
    t
    • 2
    • 1
  • i

    Industrial

    10/28/2018, 9:55 AM
    So then I should just fetch all markets and do an in memory comparison
  • i

    IWantPizza

    10/28/2018, 12:56 PM
    I'm looking into deploying my own prisma server, but would like to be able to use prisma cloud with it. I will have set a management secret that I can use with prisma cloud, but I don't understand what I need to do to make the management API accessibl by prisma cloud, but protected the database from public access? If I expose port 4466 to the public, then anybody could read my data?
    h
    • 2
    • 2
  • l

    lucas

    10/28/2018, 3:55 PM
    Hi everyone someone already used Sms api to create user with graphql-yoga & prisma ?
    h
    • 2
    • 3
  • s

    samba

    10/28/2018, 4:20 PM
    quick question… how to connect to my database from a sql client app like sequel pro for exploring. after prisma deploy on dev
    h
    • 2
    • 23
  • m

    MojoJojo

    10/28/2018, 7:04 PM
    If I query an id and get an array of objects. How would I go about filtering it so I only get the objects where a certain value is true
  • m

    MojoJojo

    10/28/2018, 7:05 PM
    Copy code
    type StockItem {
      features(standard: Boolean): [Feature]
    }
  • m

    MojoJojo

    10/28/2018, 7:05 PM
    This is my typedef
  • z

    Zefex Developer

    10/28/2018, 8:25 PM
    Hi guys, I'm in a dilema. I wanted to implement a project manually with all the features such as relay connections specification for pagination and so on, I learned and did everything manually, I learned what I wanted, even tho there's a few things to learn yet I found myself with problems such as N + 1 and repeating myself a lot, even abstracting and refactoring it was giving me a hard time to code all the code. I knew about Prisma but the real reason I did that was for sake of learning, I don't like to jump into using tools that does something for me automatically without knowing what is happening behind the scenes. The question I have right now is: I'm still learning a few things, but most of the things I have in mind of how works, is it a waste of time keep trying to implement my GraphQL server manually? Or it's better if I just start using Prisma in my project and speed things up? What are your thoughts about that? Thank you in advance.
  • l

    lucas

    10/29/2018, 12:57 AM
    hi everyone i have a little issue in my resolvers, i want to res cookie but i need to asynchronify the ctx.nexmo to get result in a variable i dont know how i can manage that here it is not working ====>
    h
    • 2
    • 2
  • l

    lucas

    10/29/2018, 12:57 AM
    Copy code
    async getPhoneNumber(parent, args, ctx, info) {
            const phoneNumber = args.phoneNumber
            const result = await ctx.nexmo.verify.request({number: phoneNumber, brand: 'Awesome'},  (err, result) => {
                if(err) {
                    throw new Error(err)
                } else {
                  console.log(result);
                    
                  if(result && result.status == '0') {
                      return result
                  } else {
                    return null
                  }
                }
              })
              const token =  jwt.sign({ phoneNumber: args.phoneNumber, requestId: result.request_id }, 'mysecret' );
              ctx.req.response.cookie('token', token, {
                  httpOnly: true,
                  maxAge: 1000*60*60*24*365
              })
            return phoneNumber
        },
    `
  • f

    Fran Dios

    10/29/2018, 3:58 AM
    @nilan Has anything changed in Prisma related to
    updateManyEntities
    in
    1.20-beta.1
    ? my generated
    prisma.graphql
    changed every
    updateManyX
    parameters from
    data: XUpdateInput
    to
    data: XUpdateManyInput
    and now my app fails (
    got invalid value {...}; Field "..." is not defined by type XUpdateManyInput.
    ). I can’t see related breaking changes in the release notes before
    1.20-beta.1
    so I assume the breaking change is in this version which is not yet published (but development servers are using it)
    d
    • 2
    • 13
  • h

    hinsxd

    10/29/2018, 9:18 AM
    Hi all. I hope I can get some “official” suggestions here. In the docs I can’t find any tutorials using
    client
    to perform pagination with relay’s
    xxxsConnection
    model, only simple
    first
    ,
    skip
    ,
    before
    , etc… are used instead. I have tried to import
    Query.postsConnection
    from the generated schema and used
    prisma.postsConnection(args)
    in resolver, but I got the classic
    must have a sub selection
    error. Is it true that Prisma encourage us not to use relay connection to do pagination?
  • d

    Dylan DPC

    10/29/2018, 9:19 AM
    Huh just send random invites to people even though I haven't used Prisma or intend on using it. Lol that's a low jab. Cia
    👍 2
  • n

    nilan

    10/29/2018, 9:52 AM
    @Dylan DPC and others <!here>, we have invited you to our Slack community because you signed up to Prisma Cloud. Feel free to discuss your questions in here, or use the Forum https://www.prisma.io/forum/. 🙂
    👍 5
    d
    • 2
    • 2
  • c

    Collins Ifunanya

    10/29/2018, 9:57 AM
    Hey guys, I started using prisma and I would want to build a startup using GraphQL and Prisma. Can someone point me to an article that points to cost effective prisma deploy servers.
    r
    n
    • 3
    • 8
  • y

    Yonben

    10/29/2018, 10:14 AM
    Hello 🙂
    👋 1
  • k

    Kudakwashe Mupeni

    10/29/2018, 10:29 AM
    Hello from Zimbabwe 🇿🇼 🙋🏾‍♂️
    👋 2
1...143144145...637Latest