https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# random
  • j

    janpio

    06/01/2021, 2:35 PM
    (Cleaned up some crypto spam here - the few people see this, the better.)
    💯 2
    👍 9
  • y

    Yusuf Erdogan

    06/02/2021, 3:46 PM
    Dear all, I am looking for some people to talk about how they use Notion during their development process. This is the product I am working on and would love to chat with people who could be interested: https://www.notionflow.co/
    j
    • 2
    • 5
  • a

    Angad Gupta

    06/05/2021, 2:09 PM
    New Article for getting started with Prisma. https://dev.to/angad777/create-a-fully-typesafe-graphql-api-with-nodejs-typescript-and-prisma-3c59
    prisma rainbow 1
    🚀 1
    d
    • 2
    • 3
  • l

    Lesly Zerna

    06/10/2021, 2:22 PM
    join us https://twitter.com/code_inspector/status/1402979725040099334
  • t

    Tri Nguyen

    06/12/2021, 7:23 AM
    hey guys, not a prisma-related questions but hopefully doesn't break any rules here 😄. I want to do some unit/visual testing with html/js and no framework (react, vue, angular,...). I'm hoping for something that is supported out of the box. I read through some articles stating that you can use jsdom alongside with jest to read a dummy html with your js inside and run some fun on it. Not sure whether that's good enough 😄. Any suggestions?
    d
    • 2
    • 1
  • m

    mkspcd

    06/13/2021, 12:00 PM
    Hello, Anyone can recommend a Slack or Discord community for Jest users ? cc @Kent C. Dodds maybe ? 🤔
    c
    • 2
    • 3
  • k

    Kenneth Gitere

    06/14/2021, 4:41 AM
    I don't know if this has been asked before but I noticed that Prisma makes quite a lot of examples using Next.js as well as with other things in the React ecosystem. Which is perfectly fine. However, this could give the naïve impression that Prisma is a React tool, it did for me the first time I heard of it. Is it that there isn't much demand for "non-React" tutorials or is it up to the community to make those examples/tutorials. I'm basing this on the prisma-examples repo.
    e
    g
    j
    • 4
    • 19
  • l

    Lesly Zerna

    06/14/2021, 4:45 PM
    super happy to announced our first meetup at my job! sign up http://bit.ly/codeinspector i'll be thankful you can share it with you network /friends that might be interested 😄
    👍 1
    💥 1
  • p

    Pigotz

    06/16/2021, 12:02 PM
    I was preparing my workstation for the Prisma Day workshop 🇮🇹 and this happened prisma rainbow You're free to take this wallpaper and do whatever you want with it 😄 You can find attached here both the SVG and 4K PNG version 🙆‍♂️ You're welcome 🎉
    Wallpaper.svg
    prisma rainbow 19
    m
    • 2
    • 6
  • d

    Daniel Olavio Ferreira

    06/17/2021, 10:24 AM
    🧌 13
    😆 10
  • k

    Kenneth Gitere

    06/18/2021, 5:12 PM
    hey, what resources would you recommend for someone to learn how to build GraphQL APIs in Node. Especially with TypeScript
    p
    • 2
    • 1
  • k

    Kenneth Gitere

    06/20/2021, 6:43 AM
    hi guys. I have a minor issue normalizing the schema for a polling app I'm make. I'd like a user to be able to create different kinds of polls e.g multiple choice, open ended questions and picking a value from a range of values (basically a Likert scale). So I was wondering if there's a way to generically describe all these polls or would I have to make a table for each kind of poll.
    j
    • 2
    • 6
  • d

    Dennis

    06/21/2021, 8:51 AM
    I sucessfully installed prisma and I'm able to create und query data. When opening pgadmin I noticed, that I have a lot of databases and I have trouble finding the oen with my data in case I have to troubleshoot something
    ✔️ 1
    j
    • 2
    • 2
  • j

    jm

    06/21/2021, 5:06 PM
    Hi everyone! I connected prisma to an existing db which I have readonly permissions. The generated `schema.prisma`contains 20+ models. To implement a graphql endpoint (with apollo-server), do I have to create all the types and queries and mutations manually? Is there any tool to generate graphql files from
    schema.prisma
    so I can modify with?
    l
    c
    b
    • 4
    • 8
  • j

    jm

    06/22/2021, 8:13 AM
    Hi! I'd like to deploy the prisma + apollo server as a serverless function to Firebase. Firebase manages environment variables with
    functions.config()
    (https://firebase.google.com/docs/functions/config-env) But to connect to a database, prisma uses dotenv:
    Copy code
    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    Is it possible to access
    functions.config()
    in
    schema.prisma
    file? I definitely donot want to hard code user name and password.
    j
    • 2
    • 8
  • p

    pzaenger

    06/23/2021, 3:42 PM
    I am trying to use some event-base logging. However it does not work: TS2345: Argument of type '"query"' is not assignable to parameter of type '"beforeExit"'. Any ideas how to fix it? I just copied the example.
  • s

    Spencer Curry

    06/23/2021, 3:49 PM
    @janpio i am looking to deploy prisma + apollo server on Google Cloud Run, similar to @jm i am uncertain how to handle it, devops isnt my primary area. I have a MySQL server successfully running with data on Cloud SQL and my express+apollo server w/ prisma running successfully on Cloud Run. I can connect to the DB properly from my local machine so I know it's running on the cloud. When i use graphql playground to test access to my DB from the Cloud Run service, i get
    Copy code
    "\nInvalid `prisma.objects.findMany()` invocation:\n\n\n  Can't reach database server at `xx.xxx.xxx.xx`:`3306`\n\nPlease make sure your database server is running at `xx.xxx.xxx.xx`:`3306`."
    On my local machine I am using
    DATABASE_URL="<mysql://username:password@xx.xxx.xxx.xx:3306/db_name?schema=public>"
    but that connection string is clearly not working on Cloud Run. The Cloud Run docs provide a snippet to create a create a connection but I'm not sure how to convert that connection into a valid Prisma connection too... The Node.js snippet for Private IPs from the docs
    Copy code
    const createTcpPool = async config => {
      // Extract host and port from socket address
      const dbSocketAddr = process.env.DB_HOST.split(':');
    
      // Establish a connection to the database
      return await mysql.createPool({
        user: process.env.DB_USER, // e.g. 'my-db-user'
        password: process.env.DB_PASS, // e.g. 'my-db-password'
        database: process.env.DB_NAME, // e.g. 'my-database'
        host: dbSocketAddr[0], // e.g. '127.0.0.1'
        port: dbSocketAddr[1], // e.g. '3306'
        // ... Specify additional properties here.
        ...config,
      });
    };
    j
    s
    • 3
    • 11
  • n

    Nick Schmitt

    06/23/2021, 6:56 PM
    I’d like to learn about how Prisma’s query engine is built. Does anyone have suggested resources for learning about query engine internals in general or Prisma’s in particular? Thank you
    💯 1
    j
    • 2
    • 2
  • d

    Dennis

    06/25/2021, 7:28 PM
    I have a Student prisma model (with a relation to a studycourse (e.g. ecomonics bachelor) . Now I want to create a DTO for the Student. With TypeORM I used to use a Mapper class to convert from a databaseclass to a dto. With Prisma I'm struggling because from await prisma.student.findFirst() I get the type Student but without the relationship to studycourse. If I include it via await prisma.student.findFirst({include:{ course:true }}); I get the Type Student & { course: StudyCourse | null } Which makes it very tedious to implement a mapper for it. Is there another way to do this?
    f
    b
    • 3
    • 9
  • s

    Spencer Curry

    06/28/2021, 4:41 PM
    where can i read about using indexes in conjunction with Prisma? Is it possible to optimize deeply nested Prisma queries using indexes? I'm using MySQL
    d
    • 2
    • 1
  • j

    Jakub Hrášek

    07/01/2021, 10:00 AM
    Hello, is it possible not to call
    SELECT
    query on
    prisma.create()
    ?
    plus one +1 1
    h
    j
    • 3
    • 7
  • m

    Mayke Freitas

    07/04/2021, 2:35 PM
    https://www.sideit.app/
  • e

    Eden Lane

    07/06/2021, 5:12 PM
    I've updated from prisma 2.20.1 to 2.26.0 and
    .count()
    query has stopped working for some reason. I'm getting following error:
    Copy code
    Invalid `prisma.task.aggregate()` invocation:
    
    
      Failed to validate the query: `Field does not exist on enclosing type.` at `Query.aggregateTask.AggregateTask._count`
    My code is
    Copy code
    const totalCount = await prisma.task.count({
          where,
        });
    can someone help me with that? Documentation says I'm doing everything correctly
    ✅ 1
    • 1
    • 1
  • c

    Chris Tsongas

    07/06/2021, 6:33 PM
    Recommendations for writing integration tests for Apollo Server? The docs https://www.apollographql.com/docs/apollo-server/testing/testing/ say Apollo Server has a built-in 
    executeOperation
     method which feels more like unit testing to me, but maybe I'm wrong. Here's a post https://thenewstack.io/automatic-testing-for-graphql-apis/ about using Jest and supertest which is more like what I've done with REST APIs. Opinions or advice appreciated!
    p
    h
    u
    • 4
    • 11
  • m

    manuel

    07/06/2021, 8:34 PM
    hey
  • n

    Nick

    07/14/2021, 8:19 AM
    Is it possible to run a GraphQL server with subscriptions (push and pull; websockets) on Google Cloud Run?
    m
    • 2
    • 2
  • s

    Seren_Modz 21

    07/15/2021, 12:23 AM
    do you think prisma would get an official plugin for jetbrains products in the future? the official extension for vscode is amazing but i prefer jetbrains and the current community plugins aren't that great
    ➕ 1
    👀 1
    j
    • 2
    • 4
  • t

    Timothee

    07/20/2021, 2:18 PM
    Hello guys, I am looking to
    select
    a substring to not return the whole article in my blog database, how can I achieve this ? I tried this
    Copy code
    return prisma.article.findMany({
        orderBy: {
          createdAt: 'desc',
        },
        select: {
          createdAt: true,
          id: true,
          title: true,
          updatedAt: true,
          content: 'left(content, 15)' as any
        },
      });
    but is says it's expecting
    true
    or
    false
    as a value. Thanks for the help 🙂
    h
    n
    • 3
    • 3
  • a

    arun

    07/24/2021, 4:45 PM
    Build a Modern Data App Hackathon - by DataStax! ⭐️ We are excited to have you as part of the hackathon! To ensure that you have access to all the resources and information you need, we have included important information below: https://bit.ly/2WhL7Qz
    👀 1
  • n

    Nika Musić

    07/27/2021, 2:52 PM
    Check out our TikTok that features Prisma's five year anniversary!
    Image from iOS.MOV
    🙌 1
    💯 2
1...454647...53Latest