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

    Biel Simon

    11/11/2018, 11:54 PM
    Hi Everyone! Do you consider prisma production-ready?
    n
    s
    • 3
    • 5
  • c

    Christian de Botton

    11/12/2018, 3:16 AM
    I'm running into an interesting issue where when I add a new type with an
    id
    field to my
    datamodel.graphql
    , I will get an error
    ▸    Cannot read property 'type' of undefined
    . when running
    prisma generate
    with any target. I have other types defined with IDs, I can remove any of them and add them back and run the command as expected, but if I define any new types, no matter the name, generate will fail if an ID is present, has anyone seen this before? Also, sorry if this is not the place to ask
  • c

    Christian de Botton

    11/12/2018, 3:16 AM
    Also, I'm running the latest version of the prisma cli (1.20.1)
  • c

    Christian de Botton

    11/12/2018, 3:28 AM
    It just started working, nevermind. I stepped away from my computer for 15 minutes, ran the previous terminal command to generate again, and it just worked
  • c

    Christian de Botton

    11/12/2018, 3:43 AM
    Made a typo and tried to build and now I'm going through the same problem after fixing my typo
  • p

    pedro

    11/12/2018, 6:52 AM
    How can I install https://www.prisma.io/admin/?
    h
    a
    +2
    • 5
    • 10
  • p

    pedro

    11/12/2018, 6:56 AM
    The new Prisma.io design is looking so cool fast parrot
    fast parrot 7
  • g

    Gorodov Maksim

    11/12/2018, 10:52 AM
    Any ideas why I get such error? My datamodel:
    Copy code
    type User {
      id: ID! @unique
      name: String!
      username: String! @unique
      description: String!
      avatarUrl: String
      interests: [String!]!
      isApproved: Boolean @default(value: "false")
      createdAt: DateTime!
      updatedAt: DateTime!
    }
    Schema:
    Copy code
    type Mutation {
      createUser(username: String! interests: [String!]!): User!
    }
    Here is UserCreateinterestsInput:
    Copy code
    input UserCreateinterestsInput {
      set: [String!]
    }
    Example call of this mutation (like on the screenshot):
    Copy code
    mutation {
      createUser(
        username: "silencerweb"
        interests: ["frontend", "backend"]
      ) {
        id
      }
    }
    n
    • 2
    • 3
  • t

    taikn

    11/12/2018, 11:28 AM
    Hey, I am considering to launch my side project using prisma engine under the hood, and now I am at the point of picking a database, since prisma supports multiple of them and manages all the operations and access to db, why would one pick MySQL over Postgres and vice versa (when starting fresh), is there any difference in performance or / and usage?
    g
    a
    n
    • 4
    • 7
  • g

    Greyson

    11/12/2018, 4:04 PM
    Does anyone know how IDs are generated with Prisma? Trying to mimic that generation from my ORM for consistency
    j
    • 2
    • 4
  • j

    JustinR

    11/12/2018, 4:29 PM
    Hello everyone 😄
    👋 4
  • b

    Birac

    11/12/2018, 4:34 PM
    Hi, what is the best way to install Prisma on existing AWS RDS Postgres database?
  • r

    Ramin B

    11/12/2018, 4:47 PM
    Hi, trying to wrap my head around how to represent a SQL join relationship within GQL context (if that even makes sense). Say I have the following 2 entities:
    Form
    and
    FormItem
    . Form can have many FormItem’s. But I want to create the relationship between the 2 using a “join”, which it self has some metadata on it. Meaning, I can create and reuse FormItem’s across different forms, but I may want to specify some meta data (ie, required, label, etc). How to best represent this in Prisma context?
    • 1
    • 1
  • t

    theHopeful

    11/12/2018, 5:01 PM
    Hi good people, I have been trying to deploy a
    prisma app
    to
    zeit
    with
    now and docker
    with some successful but unwanted results: 1. I deployed to
    zeit
    with
    docker
    and the container was started successfully 2. unfortunately the
    queries
    and
    mutation
    were generated from the
    schema
    and not from my
    mutation
    and
    queries
    Would anyone know how i can prevent this?? Thanks
    h
    • 2
    • 6
  • c

    Chris Chambers

    11/12/2018, 7:37 PM
    Hey folks!
    👋 2
  • j

    Joseph Carrington

    11/12/2018, 9:11 PM
    Given this datamodel:
    Copy code
    type PortalCart {
      id: ID! @unique
      owner: PortalUser! @relation(name: "UserCart")
      items: [CartItem!]! @relation(name: "ItemsInCart", onDelete: CASCADE)
      createdAt: DateTime!
      updatedAt: DateTime!
    }
    
    type CartItem {
      id: ID! @unique
      cart: PortalCart! @relation(name: "ItemsInCart")
      quantity: Int! @default(value: 1)
      productId: ID!
      createdAt: DateTime!
      updatedAt: DateTime!
    }
    
    type PortalUser {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      cart: PortalCart @relation(name: "UserCart", onDelete: CASCADE)
      OTTAuthorizations: [OTTAuthorization!]!
      isGuest: Boolean! @default(value: "true")
    }
    
    type OTTAuthorization {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      videoId: String!
      authorizationCode: String!
      expires: DateTime!
    }
    I always get this error on prisma generate:
    Copy code
    Generating schema... 25ms
    Syntax Error: Expected Name, found }
    
    GraphQL request (512:1)
    511:
    512: }
         ^
    There is of course not a line 512 of anything I have been able to view, so I am assuming something about the datamodel is generating an AST that prisma doesnt like.
    n
    • 2
    • 4
  • n

    Nick Parsons

    11/13/2018, 3:31 AM
    Can anyone point me in the right direction (or perhaps channel) for
    'ECONNRESET': request to <http://localhost:4466/management> failed, reason: socket hang up
    h
    • 2
    • 1
  • n

    Nick Parsons

    11/13/2018, 3:31 AM
    it's driving me up a wall. using mongodb.
  • n

    Nick Parsons

    11/13/2018, 3:31 AM
    *trying
  • j

    Jubal Mabaquiao

    11/13/2018, 3:51 AM
    https://www.prisma.io/admin/ can i join the closed preview?
  • l

    Luke

    11/13/2018, 4:30 AM
    How do you all import your types from
    datamodel.prisma
    into
    schema.graphql
    so I don’t need to re write them ?
    g
    d
    • 3
    • 2
  • w

    wontwon

    11/13/2018, 4:55 AM
    Hi everyone, I’m not sure if this is possible, but with the auto generated mutations on the prisma server, can we pull those directly into our index.js when creating the GraphQlServer?
  • w

    wontwon

    11/13/2018, 6:12 AM
    can anyone help explain what is going on here for me?
  • w

    wontwon

    11/13/2018, 6:13 AM
    -.pl
    d
    • 2
    • 5
  • c

    CCBCodeMonkey

    11/13/2018, 7:21 AM
    does anyone use apollo-errors with graphql-yoga?
  • c

    CCBCodeMonkey

    11/13/2018, 7:21 AM
    whenever I throw an apollo error, I only get the message, I never get the corresponding object, like
    invalidArgs: xyz
  • c

    CCBCodeMonkey

    11/13/2018, 7:27 AM
    it seems like graphql yoga strips errors down?
  • c

    CCBCodeMonkey

    11/13/2018, 7:29 AM
    like when I throw :
    Copy code
    throw new ValidationError('blah blah blah', {invalidArgs: 'blah'});
  • c

    CCBCodeMonkey

    11/13/2018, 7:29 AM
    all I get on the other side is:
  • c

    CCBCodeMonkey

    11/13/2018, 7:30 AM
    Copy code
    {
      "data": {
        "blah": null
      },
      "errors": [
        {
          "message": "ValidationError: \"blah\" with value 'whatever' blah blah blah error",
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "path": [
            "blah"
          ]
        }
      ]
    }
1...154155156...637Latest