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

    Val Neekman

    07/14/2021, 4:09 PM
    @Kent C. Dodds grab the audio and send it to your server, let the server to save it to postgresql in binary .. don't base64 it, if 100-200 recordings are concurrent streams as it is going to be very pricey, performance-wise. If recording 1 per browser, and saved on server, it should be fine. 3 minute is rather short, so keep it in browser, and once done, send it over to the server. (ref: https://developers.google.com/web/fundamentals/media/recording-audio , https://www.postgresql.org/docs/7.3/jdbc-binary-data.html#:~:text=PostgreSQL%20provides%20two%20distinct%20ways,type%20OID%20in%20your%20table)
    k
    • 2
    • 12
  • u

    user

    07/14/2021, 4:23 PM
    Building GraphQL APIs with Prisma - Eve Porcello | Prisma Day 2021

    https://www.youtube.com/watch?v=U8TKbNwgcSQ▾

    Working with GraphQL allows developers to fetch data effectively in their applications, and Prisma makes the process of wiring up data sources less complex. In this workshop, we’ll get hands-on experience building GraphQL APIs with Prisma while demonstrating the differences between schema-first and code-first approaches. Along the way, we’ll get a better understanding of how tools in the ecosystem fit together and how to leverage GraphQL’s type system to write better code. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • u

    user

    07/14/2021, 4:23 PM
    A Practical Introduction to Prisma - Nikolas Burk | Prisma Day 2021

    https://www.youtube.com/watch?v=_iFec6mZg24▾

    In this beginner-friendly and hands-on workshop, you'll learn the basics of using the Prisma ORM with TypeScript. Specifically, the workshop will cover: ✅ Setting up Prisma from scratch with SQLite ✅ Data modelling, migrations & querying ✅ API development with REST & GraphQL Prerequisites: • Node.js: 12.2.X / 14.X • NO prior knowledge of TypeScript or SQL required Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • u

    user

    07/14/2021, 4:23 PM
    Une introduction pratique à Prisma - Joël Galeran | Prisma Day 2021

    https://www.youtube.com/watch?v=OLPHnqvYNTg▾

    Une introduction pratique à Prisma Dans cet atelier pratique et accessible pour les débutants, vous apprendrez les bases de l’ORM Prisma avec TypeScript. Plus précisément, l’atelier couvrira : ✅ Configuration de Prisma à partir de zéro avec SQLite ✅ Modélisation, migrations et requêtes de données ✅ Développement d’API avec REST et GraphQL Prérequis : • Node.js : 12.2.X / 14.X • AUCUNE connaissance préalable de TypeScript ou de SQL n’est requise Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
    🇫🇷 1
  • u

    user

    07/14/2021, 4:23 PM
    Eine praktische Einführung in Prisma - Carmen Berndt | Prisma Day 2021

    https://www.youtube.com/watch?v=GZSrvoxuJ5g▾

    In diesem anfängerfreundlichen und praktischen Workshop wirst du die Grundlagen lernen um das Prisma ORM mit TypeScript zu verwenden. Der Workshop hat die folgenden Inhalte: ✅ Prisma mit einer SQLite Datenbank aufsetzen ✅ Datenmodellierung, Migrationen & Datenbankabfragen ✅ API Entwicklung mit REST & GraphQL Voraussetzungen: • Node.js: 12.2.X / 14.X • Du benötigst KEINE Vorkenntnisse in TypeScript und SQL um am Workshop teilzunehmen Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • b

    Ba Thien Tran

    07/14/2021, 4:36 PM
    Does anyone here have tips for handling DB connections using Next.js and the serverless functions? I’m running into issues where there are too many connections open.
    c
    d
    +3
    • 6
    • 26
  • u

    user

    07/14/2021, 4:37 PM
    Getting Started with Next.js and Prisma - Ryan Chenkie, Lee Robinson | Prisma Day 2021

    https://www.youtube.com/watch?v=4oDK-7-aSY0▾

    Next.js offers a unique approach to building client-side React apps by allowing portions of your React codebase to actually run on the server. Next.js features like getServerSideProps, getStaticProps, and API routes are the perfect place to use Prisma to interact with a database. In this workshop, we'll look at how to get started with Prisma in a Next.js project. We'll start by initializing Prisma in a new Next.js project and we'll get a database wired up with a Prisma data model. We'll then interact with the database through Prisma Client in the Next app where we'll build a fully-functional CRUD experience. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
  • a

    Arun Kumar

    07/14/2021, 4:51 PM
    I just switched the prisma DB url from
    qa
    to
    dev
    on my local machine. But it seems that app is still fetching the data from qa.
  • a

    Arun Kumar

    07/14/2021, 4:52 PM
    However the prisma studio is pointing to the dev db url
    r
    • 2
    • 4
  • n

    Naotho Machida

    07/14/2021, 5:34 PM
    Hello everyone
  • n

    Naotho Machida

    07/14/2021, 5:35 PM
    I'm facing on this error
    on prisma.createOneimgSmalls. Provided String, expected Bytes.
  • n

    Naotho Machida

    07/14/2021, 5:35 PM
    please some one can help me?
    r
    • 2
    • 2
  • u

    user

    07/14/2021, 6:09 PM
    Building a Node.js API with Prisma in minutes, using Amplication - Yuval Hazaz | Prisma Day 2021

    https://www.youtube.com/watch?v=pWLOVW8_5mk▾

    Building an API requires spending too much time on boilerplate and repetitive coding. Defining the data model, connecting the database to the server, creating the API endpoints, add security and permissions layer, logging, validation, identity management, sorting, filtering, pagination... the list is long. Prisma makes it faster. With Amplication it can take only minutes. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
  • u

    user

    07/14/2021, 6:09 PM
    Building a REST API with NestJS and Prisma - Marc Stammerjohann | Prisma Day 2021

    https://www.youtube.com/watch?v=mmbd5hcQUaY▾

    In this hands-on workshop, you'll learn how to build a REST API with NestJS and the Prisma ORM in TypeScript. Specifically, the workshop will cover: ✅ Integrating Prisma into NestJS architecture ✅ REST API development including CRUD, pagination and authentication ✅ Error handling of Prisma exceptions with NestJS filters Prerequisites: • Node.js: 12.2.X / 14.X • NestJS CLI (minimum v7.0.0) • Basic familiarity with NestJS is recommended for this workshop Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
  • u

    user

    07/14/2021, 6:09 PM
    Primeiros passos com Prisma e TypeScript - Luís Rudge | Prisma Day 2021

    https://www.youtube.com/watch?v=atr-AOErjKU▾

    Sabe aquele trabalho entediante de ficar escrevendo consultas SQL e criando classes para representar suas tabelas do banco de dados? Com o Prisma.io, isso é coisa do passado! Neste workshop, você vai aprender a utilizar o Prisma.io para facilitar o acesso aos dados da sua aplicação. Vamos começar do básico, entendendo seu funcionamento e como você pode começar a utilizar o Prisma.io de maneira simples. Depois de aprender um pouco sobre modelagem e consulta ao banco de dados, vamos criar uma API REST com Express e outra API GraphQL com Apollo GraphQL. Ao final do workshop, você poderá criar suas próprias APIs, REST ou GraphQL, utilizando o Prisma.io como facilitador de acesso aos dados. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
  • u

    user

    07/14/2021, 6:09 PM
    Creating A User Dashboard with Redwood and Prisma - Milecia McGregor | Prisma Day 2021

    https://www.youtube.com/watch?v=Oa_W6cCY4x0▾

    In this workshop, attendees will learn how to create a fully functional user dashboard. Using the Redwood framework, we'll be able to make a full-stack JAMStack app that simplifies connecting the front-end and back-end. We'll create multiple database tables, handle migrations, add seed data, and a lot more with Prisma. By the end of the workshop, attendees should have a working dashboard. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
    🙌 1
  • b

    Brian de la Motte

    07/14/2021, 8:02 PM
    Is it possible to do something like
    expires_at                        DateTime @default(now() + 30)
    in a model?
    r
    • 2
    • 2
  • c

    Chris Tsongas

    07/15/2021, 5:23 AM
    If I add code to my seed file to seed more tables, then re-run
    prisma db seed --preview-feature
    is that going to add duplicate seed data to previously seeded tables?
    r
    • 2
    • 5
  • n

    Niraj

    07/15/2021, 7:08 AM
    Hello folks, I have been exploring at different database options from sequelize to typeorm but prisma hands down wins on almost all cases. I am trying to create an offline app that syncs with an API when there is connection and we were planning to use sqlite with Ionic. I have already tried out prisma locally on a desktop device and it has been an amazing experience but it looks like it won't work with Ionic/sqlite as it seems to require nodejs for things like running migrations and such? My use case is individual users will have their own the sqlite database and when we push for updates, if there are database changes, we will have to run the migration on each of those devices. We obviously won't be able to run the migrations like we do on a nodejs setup but I saw an example where typeorm is being used with Ionic so I was thinking it must be possible? Any resources and answers on this would be super helpful as I can't find anything about mobile support on the docs/forums. Thanks
    r
    j
    • 3
    • 13
  • t

    Traky Richard

    07/15/2021, 7:34 AM
    Good morning all; someone would have a clearer idea than mine on how to do BDD testing with prisma on nestjs. I’ve been stuck on the subject for 3 days. It will be really cool if you help me with your experience on the subject.Good morning all; someone would have a clearer idea than mine on how to do BDD testing with prisma on nestjs. I’ve been stuck on the subject for 3 days. It will be really cool if you help me with your experience on the subject.
  • d

    Dev__

    07/15/2021, 7:39 AM
    hello, I have
    rejectOnNotFound
    enabled on a global level for all
    findFirst
    and
    findUnique
    queries but it doesnt seem to work. I am using
    nestjs
    tho so the
    prisma
    configuration is different
    Copy code
    // prisma config
    export class PrismaService extends PrismaClient<LogOptions> implements OnModuleInit, OnModuleDestroy {
    	constructor() {
    		super({
    			log: [
    				{
    					emit: 'event',
    					level: 'query'
    				}
    			],
    			rejectOnNotFound: {
    				findFirst: () => new Error('error'),
    				findUnique: () => new Error('error')
    			}
    		});
    	}
    
    	async onModuleInit() {
    		await this.$connect();
    	}
    
    	async onModuleDestroy() {
    		await this.$disconnect();
    	}
    }
    
    // findFirst query
    const buyer = await this.prisma.buyer.findFirst({
    	where: {
            id
        },
    	rejectOnNotFound: true
    });
    1. so when I execute this
    findFirst
    it does throw an error but not the error i defined in the
    prisma
    config. Instead it says
    [NotFoundError: No Buyer found] { clientVersion: '2.26.0' }
    2. Also, when I do NOT provide the
    rejectOnNotFound
    in the
    findFirst
    query it seems that the globally configured
    rejectOnNotFound
    is not even doing anything... 3. as last, when I configure
    rejectOnNotFound
    on a global level i'd expect that my
    buyer
    variable can not be a possible
    null
    value because it will be rejected if not found but it still says is
    possibly 'null'
    t
    r
    • 3
    • 17
  • y

    yoenho park

    07/15/2021, 9:06 AM
    Hi 🙂  Just for my curiosity I tested two pieces of code with the same result. the left side retrieves the user’s posts with prisma, the right side, prisma searches only the user and searches the post in the user’s post fields. the two results are the same, the difference is that the N+1 problem occurs on the right. so what i’m wondering is… 1. if solve the N+1 problem(right side), is the left/right code style a difference in my taste ? 2. when using nexus, except for query resolver, in what cases do you use type field resolver ? 🤔 in my opinion, two cade are exactly the same, just written differently.
    a
    • 2
    • 1
  • a

    Ahmed Khan

    07/15/2021, 10:08 AM
    https://github.com/prisma/prisma/discussions/8191
  • f

    Feralheart

    07/15/2021, 10:33 AM
    Hi everyone
  • f

    Feralheart

    07/15/2021, 10:33 AM
    In Prisma schema, if I want a column what can be string/number/boolean which type should I use?
    r
    • 2
    • 2
  • k

    Kieran Salawu

    07/15/2021, 10:45 AM
    Hi, Is there a way to convert an object into a prisma object
    r
    • 2
    • 20
  • f

    Feralheart

    07/15/2021, 11:12 AM
    In the schema what's the correct way to make a "double unique" constraint?
    r
    • 2
    • 2
  • u

    user

    07/15/2021, 12:03 PM
    Install a local MongoDB Database on macOS

    https://www.youtube.com/watch?v=BwVOIRX3VXk▾

    In this video we look at how easy it is to get a MongoDB server running locally on macOS. We step through installation, configuration and using basic CRUD operations to interact with the database. Prisma now supports document databases with the new MongoDB connector. Check out the docs to get started: https://www.prisma.io/docs/concepts/database-connectors/mongodb Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • m

    Mohamed M'rabet

    07/15/2021, 12:05 PM
    Hello, I have this error but I don't know how to fix it :
    "Command failed (IllegalOperation): This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.)"
    Can you help me please #mongodb In my .env :
    Copy code
    DATABASE_URL="<mongodb://username:password@host:27017/dbname>"
    o
    m
    • 3
    • 3
  • o

    Oluwasetemi Ojo

    07/15/2021, 12:19 PM
    It seems the
    @unique
    directive is not working with mongodb?
    j
    • 2
    • 2
1...458459460...637Latest