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

    Almir Mulalic

    05/12/2020, 12:53 AM
    Hello guys, this is my first time trying prisma and I have a lot of problems setting it up, first of all my datamodel.prisma is generating error Unexpected token. Expected one of: Start of block ("{") but if i change the extension of a file to graphql it changes back to normal, i literally just initialized the app nothing more Also when I try to deploy the app I get this error Could not connect to server at http://localhost:4466. Please check if your server is running If someone could help or assist I would be grateful
    r
    • 2
    • 1
  • r

    Roy

    05/12/2020, 9:58 AM
    Hi guys, is the prisma studio not working anymore? Get this error, running beta4
    Copy code
    Environment variables loaded from ./prisma/.env
    Generating Prisma Client ... Failed to generate Prisma Client: GeneratorError: Error: ENOENT: no such file or directory, copyfile '/Users/roy/Workspace/horeca/backend/node_modules/@prisma/cli/index.js' -> '/Users/roy/.cache/prisma/studio/Users-roy-Workspace-horeca-backend/index.js'
        at GeneratorProcess.handleResponse (/Users/roy/Workspace/horeca/backend/node_modules/@prisma/cli/build/index.js:2:2807165)
        at LineStream.<anonymous> (/Users/roy/Workspace/horeca/backend/node_modules/@prisma/cli/build/index.js:2:2806803)
        at LineStream.emit (events.js:210:5)
        at LineStream.EventEmitter.emit (domain.js:475:20)
        at addChunk (_stream_readable.js:309:12)
        at readableAddChunk (_stream_readable.js:290:11)
        at LineStream.Readable.push (_stream_readable.js:224:10)
        at LineStream.Transform.push (_stream_transform.js:150:32)
        at LineStream._pushBuffer (/Users/roy/Workspace/horeca/backend/node_modules/@prisma/cli/build/index.js:2:2979140)
        at LineStream._transform (/Users/roy/Workspace/horeca/backend/node_modules/@prisma/cli/build/index.js:2:2978959) {
      code: -32000,
      data: null
    }
  • l

    Luís Almeida

    05/12/2020, 10:01 AM
    https://github.com/prisma/studio/issues/412
  • l

    Luís Almeida

    05/12/2020, 10:01 AM
    need to install latest alpha
  • r

    Roy

    05/12/2020, 10:02 AM
    Thanks. Can you tell me how to install latest alpha?
  • l

    Luís Almeida

    05/12/2020, 10:04 AM
    yarn global add @prisma/cli@alpha
    if you’re using yarn and want prisma installed globally
    r
    • 2
    • 2
  • r

    Roy

    05/12/2020, 10:05 AM
    Ok thanks!
  • l

    Luís Almeida

    05/12/2020, 10:06 AM
    np 🙂
  • b

    Bruce Martin

    05/12/2020, 3:25 PM
    I've just installed prisma-cli 1.34 on a Windows machine for use with an existing MariaDB. Would it be ok if I asked a few Q's? • Firstly, when I run
    prisma init prisma
    it gives me:
    Copy code
    command Failed to get the definition file +0ms
      command Error: Couldn't find `prisma.yml` file. Are you in the right directory? +3ms
      environment FetchError: request to <http://localhost:4466/management> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
    Which seems like it expects something to already exist? It then proceeds to further steps, but is something wrong here?
    r
    • 2
    • 1
  • s

    saketh kumar

    05/12/2020, 5:58 PM
    Hello there, i would like to store images in my prisma USER table for naming profile picture with graphql subscription could someone help me on this And Also i was trying to create some conversation between two users i want to achieve something like mentioned below what are the possible ways?? please help me out and thanks type Conversations { id: ID! @id owner: [User1, User2] conversations: [Objects] }
    s
    • 2
    • 1
  • j

    Jeremy McCLelland

    05/12/2020, 8:22 PM
    Hey Everyone. Quick question. I'm new to Prisma and was wondering if its possible to connect prisma cloud to a localhost magento sql db
    r
    • 2
    • 4
  • o

    Omobolanle Aro

    05/12/2020, 9:42 PM
    https://stackoverflow.com/q/61761609/10384812
  • c

    cfree

    05/12/2020, 9:45 PM
    Has anyone had luck using Prisma in a Netlify Function? I'm stuck because graphql-import doesn't work after things are zipped up
    • 1
    • 1
  • c

    cfree

    05/12/2020, 10:46 PM
    Does anyone know why I get
    Error: Unknown type "DateTime".
    and many other similar errors when I use the Prisma javascript-client generator in the prisma.yml, but I don't have that issue when I use the graphql-schema?
    g
    • 2
    • 3
  • r

    Rob Matei

    05/13/2020, 12:58 AM
    hey all - are there tutorials you’d recommend after howtographql.com if I want to go more in depth? ideally full-stack and just something that implements an app with more complex UI and business logic (have web development experience from the rails world, just wanna learn more JS tools and best practices!)
    r
    • 2
    • 3
  • a

    Adriano Resende

    05/13/2020, 2:58 AM
    Hello there, I’m noob about setting up my own playground (GraphiQL) with Prisma 2. What is the best way to setting the GraphiQL? to show the complete Prisma 2 documentation as Prisma 1.
    r
    • 2
    • 2
  • s

    saketh kumar

    05/13/2020, 12:02 PM
    hey guys how can i make this below worked out as in USER type i'll have [ConversationList!]! type ConversationList { id: ID! @id owner: User! users: User! messages: String! }
    r
    • 2
    • 4
  • g

    Glenn Dwiyatcita

    05/13/2020, 12:28 PM
    Hi guys, first of all thank you for the beautiful work on howtographql.com - it's a so helpful tutorial. 🙂 Just one question though on the GraphQL Playground. When following the step-1 of the tutorial, I can't seem to have the left side-menu on my
    GraphQL Playground
    to choose the database... (neither in the Web nor Desktop version). Any clue why it aint showing up?
    n
    • 2
    • 6
  • s

    Slavi Slavchev

    05/13/2020, 1:17 PM
    Hello, I need technical advice. I am currently designing a complex application. I’m trying to decide what database to use and how to design the relational in the application. My choice is between MongoDB and PostgreSQL. The application will have functionality like: - Trello boards - CRM - Invoicing - ToDo list - Wunderlist
  • s

    saketh kumar

    05/13/2020, 3:23 PM
    my datamodel was looking good but i still cant be able to connect records while creating conversation record below is my datamodel type User {   id: ID! @id   createdAt: DateTime! @createdAt   updatedAt: DateTime! @updatedAt   active: Boolean! @default(value: true)   email: String! @unique   friends: [User!]! @relation(name: "FRIENDS")   conversations: [ConversationList!]! @relation(name: "CONVERSATION")   sent: [User!]! @relation(name: "SENT")   received: [User!]!  @relation(name: "RECEIVED")   name: String!   password: String! } type ConversationList {   id: ID! @id   users: [User!]! @relation(name: "CONVERSATION")   messages: String! } Error: Reason: 'participants.set' Field 'set' is not defined in the input type 'UserCreateManyWithoutConversationsInput'. NOTE: Its working all good while users: User! not list let me know how to fix this issue
  • f

    Felinto

    05/13/2020, 8:30 PM
    n
    • 2
    • 1
  • f

    Felinto

    05/13/2020, 8:31 PM
    What is the difference between Post[] and post Post @relation(fields: [postId], references: [id]) postId Int
  • m

    Matt

    05/13/2020, 9:10 PM
    I have a field that's set as required in the prisma.schema file and has a default value set as well. I'm getting an error that the argument is missing if I don't pass it in as an argument. Shouldn't the default cause it to use that value if the argument isn't specified for it? If not, what is the point of the default value?
    r
    • 2
    • 2
  • a

    Adriano Resende

    05/14/2020, 2:58 AM
    Has anyone had a similar error? I installed in vue.js (nuxt) and get this error.
    _import_ { PrismaClient } _from_ ‘@prisma/client’
    r
    • 2
    • 9
  • r

    RoMay

    05/14/2020, 4:23 PM
    We started to scale our architecture and now need your advice, how to use the same Prisma instance by multiple services. Current solution: - service1 owns Prisma datamodels (800+ entities), generates Prisma client for internal purpose - service2 relies on the same data, so it contains the same Prisma datamodels and requires to generate type defs for own Prisma client This approach looks quite painful and not scalable, e.g. to keep Prisma clients in sync, or once we introduce one more service.
  • r

    RoMay

    05/14/2020, 4:23 PM
    What would be your suggestion/better alternatives? Especially considering further migration to Prisma2. I would be much appreciated 🙏
    a
    r
    • 3
    • 6
  • j

    John Cantrell

    05/14/2020, 9:35 PM
    with an explicit many-to-many (join model) relationship. How do I delete and also delete the relevant join models in one go? It throws an error if I try to just delete one of the joined records
    r
    • 2
    • 4
  • j

    John Cantrell

    05/14/2020, 9:35 PM
    i could do them in separate queries (delete join model entities first) and then the actual model but without transactions it feels a bit scary
  • c

    cory kelly

    05/14/2020, 9:50 PM
    👋 I’m here! What’d I miss?
  • s

    saketh kumar

    05/15/2020, 5:27 AM
    hey guys what are best practices while composing two mutations as i want to execute both with a single common argument in react? i heard something called compose but i don't have idea how to use it
1...372373374...637Latest