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

    Ramsay Lanier

    02/15/2018, 2:48 AM
    -.txt
  • r

    Ramsay Lanier

    02/15/2018, 2:48 AM
    so, this doesn’t seem to work
  • r

    Ramsay Lanier

    02/15/2018, 2:49 AM
    basically, I’d like to keep the client-side query but then also filter out rule further for just the current, logged in user
  • r

    Ramsay Lanier

    02/15/2018, 2:49 AM
    is that possible?
  • r

    Ramsay Lanier

    02/15/2018, 2:50 AM
    it seems like the where filter in the resolver is being overridden by the where filter in the client query because I’m passing in all of info as the second argument to
    ctx.db.query.rules
    w
    • 2
    • 38
  • a

    atito

    02/15/2018, 6:25 AM
    I'm wondering how to do a self relation in a proper way using prisma. For example making followers/following system. It can be something like that
    Copy code
    type User {
      id: ID! @unique
      followers: [User!]!
      following: [User!]!
    }
    But I believe that is not efficient or how prisma will deal with something like that? thanks in advance
    a
    • 2
    • 9
  • r

    Raeesaa

    02/15/2018, 9:51 AM
    Can someone have a look at this issue please? https://github.com/graphcool/prisma/issues/1909
    👍 1
  • c

    Christian

    02/15/2018, 10:45 AM
    regarding the basic graphcool API example with Post and Comment: How do I create a batch of new Comment connected to a single Post?
    r
    • 2
    • 5
  • i

    igm

    02/15/2018, 11:15 AM
    Hi all, how can I pull my relay schema (IDL) via CLI?
  • i

    igm

    02/15/2018, 11:15 AM
    very annoying to have to go to the website to download it
  • p

    patrick

    02/15/2018, 11:16 AM
    Guys, what would be the most elegant way of modeling permissions for a back-office? Specifically, I’m wondering if I can avoid adding roles to the API of my user-facing app.
  • r

    rein

    02/15/2018, 12:56 PM
    Hey guys, could someone help me out?
    The value in the field 'prices' is not a valid Json: '\"{\\\"usd\\\":\\\"7.99\\\",\\\"cad\\\":\\\"9.87\\\",\\\"mxn\\\":\\\"150.99\\\}"'
  • r

    rein

    02/15/2018, 12:57 PM
    Im getting this error, but not sure what Im doing wrong. I dont use inline variables, so I tried setting the prices variable as
    prices = JSON.stringify({ usd: ...})
    and also as just
    prices =  { usd: ...}
  • r

    rein

    02/15/2018, 12:57 PM
    but both give different error messages
  • r

    rein

    02/15/2018, 1:08 PM
    full code:
    Copy code
    const prices = {
                                usd: fetchedGame.usd,
                                cad: fetchedGame.cad,
                                mxn: fetchedGame.mxn    
                            };
                            
                            return api.request(`
                                mutation($prices: Json!) {
                                    updateNAGame(
                                        id: "${dbGame.id}"
                                        title: "${fetchedGame.title}"
                                        imageUrl: "${fetchedGame.imageUrl}"
                                        releaseDate: "${fetchedGame.releaseDate}"
                                        usd: "${fetchedGame.usd}"
                                        cad: "${fetchedGame.cad}"
                                        mxn: "${fetchedGame.mxn}"
                                        eshopLink: "${fetchedGame.eshopLink}"
                                        prices: $prices
                                    ){
                                        id
                                    }
                                }
                            `, 
                            { prices: prices }
                            )
    w
    • 2
    • 41
  • n

    Nick Luger

    02/15/2018, 1:38 PM
    Does prisma-bindings cache stuff somewhere?
    n
    • 2
    • 10
  • f

    freder

    02/15/2018, 2:16 PM
    hi! – does anyone know what to do about
    A project with the name 'XXX' already exists in your account
    (when trying to deploy locally)? → https://goo.gl/v9FiUZ
    p
    • 2
    • 5
  • c

    Carl

    02/15/2018, 2:51 PM
    Hey! I'm having some weird issues with subscriptions where client only receives publish from inside Subscription resolver but never Mutation... anyone knows whats up? 🤔
    subscriptions.js
  • c

    Carl

    02/15/2018, 2:52 PM
    Oh and i've tried using string constants instead of
    invoice.id
    to make sure im listening/publishing to the same channel
  • m

    Maxime Scibetta

    02/15/2018, 3:14 PM
    Hey guis, quick question, how we can have prisma file's endpoint I saw that once. But i juste have
    HTTP & WS
  • m

    Moritz

    02/15/2018, 3:42 PM
    @nilan, any progress on https://github.com/graphcool/prisma/issues/1817 ? this issue is really bugging me, because I find myself constantly writing workaround code which I will have to refactor later? anyone any ideas?
  • j

    johhansantana

    02/15/2018, 4:05 PM
    suddenly I can't deploy to a shared cluster?
  • m

    Moritz

    02/15/2018, 4:15 PM
    Hi guys, I have an issue: I have a piece of code which used to work just fine and now throws an error:
    Copy code
    const res = await ctx.db.mutation.updateWall({
          where: { id: wall },
          data: {
            posts: {
              create: {
                text,
                author: {
                  connect: {
                    id: userId
                  },
                },
                image: {
                  connect: image
                }
              }
            }
          }
        },  `{
          id
          posts{
            id
          }
        }`)
    throws the error:
    Copy code
    Error: Variable "$_data" got invalid value {"posts":{"create":{"text":"Hello","author":{"connect":{"id":"cjdd86u0kfo8x0122460gymjb"}},"image":{}}}}; Field value.where of required type WallWhereUniqueInput! was not provided.
    r
    r
    • 3
    • 9
  • m

    mike.johnson

    02/15/2018, 4:33 PM
    what is the difference between deploying the prisma cluster and the graphql server with now?
    r
    • 2
    • 2
  • s

    Simon

    02/15/2018, 5:25 PM
    i just wanted to update to prisma 1.2 and now i get an error on building the typescript “node_modules/graphql-yoga/dist/src/types.d.ts(7,37): error TS2307: Cannot find module ‘graphql-subscriptions/dist/subscriptions-manager’.”
    a
    • 2
    • 66
  • s

    Simon

    02/15/2018, 5:25 PM
    did anybody get this aswell?
  • a

    Adam King

    02/15/2018, 6:33 PM
    My data model is full of so many unnecessary fields and types to combat https://github.com/graphcool/prisma/issues/1907, https://github.com/graphcool/prisma/issues/1817, and https://github.com/graphcool/prisma/issues/83. Almost 50% of my 1000+ line data model is useless code dedicated to fixing these issues. While I’ve finally converted my old data schemas to a working Prisma data model, I’m very frustrated that so much of my schema will need to be refactored once these issues have finally seen the light of day. Would be nice to see these fixed sooner rather than later.
    m
    p
    • 3
    • 3
  • s

    steveb

    02/15/2018, 7:03 PM
    Does anyone know, is there a way to combine a couple fields into a "virtual" field? This is a concept I got used to in mongoose. What I'm envisioning is something like the fullName field in this pseudo-type:
    Copy code
    type Artist @model {
    createdAt: DateTime!
    updatedAt: DateTime!
    id: ID! @isUnique
    firstName: String!
    lastName: String!
    fullName: `{$firstName} {$lastName}`
    }
    a
    s
    • 3
    • 2
  • s

    steveb

    02/15/2018, 7:03 PM
    really only thinking it would be used as a getter, not a setter
  • s

    steveb

    02/15/2018, 7:04 PM
    anything like that in GC/Prisma?
1...574575576...637Latest