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

    Philipp Rajah Moura Srivastava

    05/24/2020, 12:55 AM
    Same here
  • p

    Philipp Rajah Moura Srivastava

    05/24/2020, 12:55 AM
    I think it’s just for mongodDB though
  • j

    James Lee

    05/24/2020, 5:47 AM
    First time trying out prisma and trying out the @map syntax from the setup guide. However, 1. vscode shows error
    this line is invalid
    2. npx prisma generate also errors
    Copy code
    model brand {
    11 |   created_at       DateTime           @default(now()) @map('createdAt')
       | 
    error: Error validating: This line is invalid. It does not start with any known Prisma schema keyword.
    
    anyone know if I need to do something special for @map to be accepted?
    r
    • 2
    • 2
  • j

    James Lee

    05/24/2020, 6:53 AM
    Another question: What is the conventional thought here in regards to future changes to the schema? Is it to run introspect again? Or use Migration moving forward? I am seeing that introspect will override any changes I've made to the schema.
    r
    • 2
    • 1
  • j

    James Lee

    05/24/2020, 8:07 AM
    also any place to find documentation or examples of many to many relational queries?
    r
    r
    • 3
    • 2
  • j

    James Lee

    05/24/2020, 8:07 AM
    trying to run something like
    Copy code
    onst users = await prisma.user.findMany({
          where: {
            missions: {
              equals: missionId
            }
          }
        })
        console.log('users', users)
        return users
    r
    • 2
    • 4
  • j

    James Lee

    05/24/2020, 8:08 AM
    where missions is a many to many schema definition
  • j

    James Lee

    05/24/2020, 8:09 AM
    however, i'm receiving a type error of
    Copy code
    The expected type comes from property 'missions' which is declared here on type 'userWhereInput'
    Seems this where clause is only suitable for one to many relations
  • d

    Dmitry Belozerov

    05/24/2020, 12:34 PM
    is there any way right now to implement prisma to graphql api ??
  • d

    Dmitry Belozerov

    05/24/2020, 12:36 PM
    Pretty new to prisma, just confused with my app having prisma and requires prisma.yml file to deploy, however prisma.io says that yml file now merged into *.prisma file
  • d

    Dmitry Belozerov

    05/24/2020, 12:36 PM
    witch part am i wrong about ?
    n
    • 2
    • 7
  • j

    James Fox

    05/24/2020, 6:07 PM
    Is there any guidance to running
    npx ts-node --transpile-only src/schema
    within a Docker container? The command doesn’t error for me, but the types are not generated
    docker 1
    🤔 1
    r
    • 2
    • 35
  • k

    Kate Efimova

    05/24/2020, 6:24 PM
    Hi all! Anyone else had trouble getting GraphQL Playground to show up on
    localhost:4000
    when trying to run the simplest hello-world example? 😅 Server announces the fact that its running on the following web address but than there's nothing actually there
    a
    r
    • 3
    • 4
  • j

    jt

    05/24/2020, 9:08 PM
    Is there a built in method of preventing empty strings for required fields. For instance, if I require a user provide a name, "" (empty string) should not be a valid submission. How can I make NULL and "" return the same error? I've got a lot of forms that have this use case, so writing a bunch of custom error handlers would be a real pain. Seems like there should be a way to do this automatically.
    r
    • 2
    • 1
  • p

    Philipp Rajah Moura Srivastava

    05/24/2020, 9:17 PM
    you could do it in the resolvers or attach a custom directive
  • b

    bob

    05/24/2020, 10:07 PM
    ... why is a 36 byte string "too long" for an ID field? ...
    r
    • 2
    • 1
  • b

    bob

    05/24/2020, 10:07 PM
    Copy code
    d18267f6-c551-4b73-8ebe-ebd15283e5c4
    Error: Value for field uid is too long.
        at BatchedGraphQLClient.<anonymous> (...\node_modules\http-link-dataloader\dist\src\BatchedGraphQLClient.js:77:35)
  • a

    Akshat Jaitly

    05/24/2020, 10:20 PM
    I am getting error while connecting my prisma to localmongo db data base ? Any solution??
  • a

    Akshat Jaitly

    05/24/2020, 10:21 PM
    Copy code
    version: '3'
    services:
      prisma:
        image: prismagraphql/prisma:1.34
        restart: always
        ports:
        - "4466:4466"
        environment:
          PRISMA_CONFIG: |
            port: 4466
            # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
            managementApiSecret: my-secret
            databases:
              default:
                connector: mongo
                schema: akshat
                uri: '<mongodb://host.docker.internal:27017>'
    r
    • 2
    • 13
  • a

    Akshat Jaitly

    05/24/2020, 10:21 PM
    Using windows
  • b

    bob

    05/25/2020, 1:42 AM
    how do people write their delete mutation resolvers? (like in a graceful way, i feel there should be more than just telling the datastore to yeet the record and not tell the client about more info)
    r
    • 2
    • 3
  • j

    Jovaanc

    05/25/2020, 12:24 PM
    Hi, is it possible to secure a Prisma connection with API keys ?
    r
    • 2
    • 1
  • g

    gopidon

    05/25/2020, 12:34 PM
    I have Prisma 1 server running on a Digital Ocean droplet to connect to their managed Postgres DB. My question is: Does Prisma1 , by default do any of the connection pooling magic or do I need to create a connection pool on my own and connect prisma1 to it?
    r
    • 2
    • 2
  • m

    Matheus Assis

    05/25/2020, 1:33 PM
    Hi guys!! I want to upgrade from prisma 1 to 2 in a currently relatively small app. Where can I find the most recent documentation on how to do that? Is this issue on github the most up to date version? Where can I find the most up to date guide on how to do that, is there one in the docs? Is it the "Set up prisma -> Add to an existing project"? Thank you!
    r
    • 2
    • 2
  • a

    Akshat Jaitly

    05/25/2020, 3:11 PM
    In prisma 1 why do we explicitly need to state relation @relation(link: INLINE) while using relations while using mongodb while no such thing is required using postgres and mysql database
  • t

    Taylor

    05/25/2020, 9:11 PM
    Hey guys, would there be a reason for Prisma Deploy command to just hang - could it be due to Docker, or wrong cli version... Because I'm a bit stumped... No errors is proving difficult to fix.
  • t

    Taylor

    05/25/2020, 9:21 PM
    Can I have some help please? The Prisma command does absolutely nothing..
  • t

    Taylor

    05/25/2020, 9:22 PM
    Would appreciate even the slightest bit of guidance.....
    r
    • 2
    • 1
  • b

    bob

    05/25/2020, 10:56 PM
    how do i use custom scalars in a .graphql file?
    r
    • 2
    • 1
  • m

    Manthan Mallikarjun

    05/25/2020, 11:16 PM
    I’m sort of a typescript/jest noob, I was wondering if someone could help me set up this: https://github.com/prisma/prisma/discussions/2083
1...375376377...637Latest