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

    Josef Henryson

    09/24/2019, 3:04 PM
    I made an example below to illustrate my current solution for a resolver I need. I suspect it is not optimal however. On a Shelf I want to know if there is any Book but I go through all books and look for the shelf ID. Is there a way to call BooksConnection for the current Shelf only?
    Copy code
    const Shelf = prismaObjectType({
        name: 'Shelf',
        definition: t => {
            t.prismaFields(['*'])
            t.field('hasBooks', {
                type: 'Boolean',
                resolve: async (root, args, ctx) => {
                    return await ctx.prisma.booksConnection({ where: { shelf: { id: root.id }}})
    	            	.aggregate()
    	            	.count() > 0
                }
            })
        }
    })
  • q

    Quinn Vaughn

    09/24/2019, 5:05 PM
    Seeing as how prisma currently has no support for union types, is the best way to create a feed where the return can be anything from a post to a reaction to a comment to a share, to create a following type that prisma can query that is basically just has pointers to the various data types where all the types are optional (I'm already doing this for interfaces)? Does anyone have experience with a situation like that?
    • 1
    • 1
  • m

    Mark N Carpenter Jr

    09/24/2019, 5:47 PM
    Hey, running into an issue with
    prisma init
    and an existing MySQL database. Introspection fails? or completes and then fails with
    Copy code
    RelationalIntrospectionResult Relations enums resolved. +3ms
     !
    TypeError: Cannot read property 'type' of undefined
    Totally new to working with prisma. any help would be much appreciated.
  • m

    Muneeb Akhlaq

    09/25/2019, 7:41 AM
    Hi, I am getting error when I try to deploy prisma see the images
  • j

    jasonkuhrt

    09/25/2019, 6:05 PM
    https://prisma.slack.com/archives/CA491RJH0/p1569434648264400?thread_ts=1563405941.200200&cid=CA491RJH0
  • i

    Ismail Arafa

    09/25/2019, 8:12 PM
    hey guys. it's me again. i tried creating a server on Prisma Cloud but the option(s) for Heroku integration are unavailable. Any word on if/when they'll be back up again? If not, what's the simplest docker-less way to deploy to any cloud provider (preferably Heroku) given that I was running prisma + postgres with docker-compose locally. Any and all help are greatly appreciated. Thanks!
    d
    • 2
    • 1
  • k

    Kimble

    09/25/2019, 10:52 PM
    @prisma team Can I please get some support with Graphcool!! No one is answering intercom, emails, github issues or slack requests! Need help with upgrading resolver functions to latest node. Paying customer! Please help, very frustrating
    😮 1
    m
    • 2
    • 2
  • c

    Cyrus David

    09/26/2019, 2:01 AM
    Does anyone know the docs to "Fulltext Search" that's listed at https://www.prisma.io/features/databases
  • e

    Elias GM

    09/26/2019, 6:11 AM
    Hi guys, I need assistance in one aspect of Prisma that I can't see to crack. I have a model with two types defined as follows: type User { id: @ID email: String! password: String! bio: Bio! contacts: [Contact!]! } type Contact { id: @ID bio: Bio! } Each user can have MANY contacts and each contact can belong to MANY users. When inserting contacts for users, how can I verify that I am not creating duplicate relationships? In other words, check for existence of many to many relationships
    👀 2
    m
    r
    • 3
    • 2
  • j

    jbe

    09/26/2019, 8:19 AM
    Hi Guys . Could you tell me how do you manage seeding data and automatic backups with Prisma on production, please. Thank you !
    👀 1
    l
    • 2
    • 32
  • m

    MartĂ­ CrespĂ­

    09/26/2019, 8:38 AM
    Is no longer support to prisma 1 since 0.4.1 version of nexus-prisma? Or it's still compatible but it won't be maintenanced for future issues/features?
    j
    d
    • 3
    • 5
  • t

    Thomas Leveque

    09/26/2019, 9:46 AM
    Hi guys ! I'm trying to do the Get Started with existing database but i'm getting this issue When i'm running
    prisma init myproject
    and chose existing database then mongoDB then i pass this string connextion
    <mongodb+srv://userName:<password>@cluster0-q2tur.mongodb.net/test?retryWrites=true&w=majority>
    with the userName and password of the user i have created in mongoDB Atlas, the following deprecationWarning comes out and i don't know how to fix it. Thx for your help ! 🙂
    Prisma CLI version: prisma/1.34.8 (darwin-x64) node-v12.10.0
  • d

    Darryl

    09/26/2019, 10:17 AM
    Has there been any news on the Prisma 1 to Prisma 2 migration doc? I'm running
    nexus-prisma
    0.3.8
    right now and I'm interested in Prisma 2 but held off all summer during the early stages.
    d
    • 2
    • 3
  • e

    Eshwar Yaddanapudi

    09/26/2019, 11:23 AM
    @json and all. Hi. I am Eshwar. I am currently using Prisma in one of my projects for POC. Now am moving this POC to production. I am using MongoDB as my database. When I am connecting MongoDB to Prisma on the server, I am passing the SSL certificates given by my Database team. However, the connection is not successful. One of the platform team's architect has pointed out that Prisma is dropping these SSL certs and thus the connection to the DB is failing. Can someone please pitch-in and help me get over this issue. I am super excited to have my Production app run using Prisma. Can you help me overcome this show stopper and become a success story of Prisma community?
    ❤️ 1
    d
    • 2
    • 3
  • e

    Eshwar Yaddanapudi

    09/26/2019, 11:24 AM
    @json and all, I am using Prisma v1.34
  • i

    Igor Vuleta

    09/26/2019, 12:55 PM
    Hi all, is perhaps anyone from the core prisma team available for some graphql technical questions?
  • c

    Cuong Duy Nguyen

    09/26/2019, 4:43 PM
    Hi guys, I use Jest for unit testing, so I want to create another database for only testing. Have a solution, thanks.
    prismo gif 1
    🤔 1
    prisma rainbow 1
    👀 1
    ❤️ 1
    parrotwave2 1
    👋 1
    j
    t
    • 3
    • 5
  • j

    JamesJ

    09/26/2019, 5:00 PM
    Hi, have a cloud deployment question if anyone can shed some light. Am a bit stuck with connecting to the prisma server from my backend graphql-yoga. I have deployed prisma-prod (and prisma-prod-management to deal with the management API), rabbitmq and graphql-yoga backend image into a k8s cluster on GCP and set up an external load balancer from the backend server. Also am using a sidecar CloudSQL-Proxy container in the prisma and backend deployments to connect to CloudSQL postgres instance. All of it seems to be up and running. When I visit the backend URL at the load balancer IP (http://x.x.x.x:4000) I get the playground come up, but when I run a basic query to test the connection to the prisma server I can an ECONNREFUSED message. I have tried putting labels on the service manifests (Helm templates), using an external load balancer IP for the prisma server and even connecting by http//[prisma service name]4466, but nothing works. I have checked the prisma pod logs and the prisma server says it’s running. If anyone has any ideas what I can try next please let me know. Thanks!
    ❤️ 1
    • 1
    • 1
  • o

    Oscar

    09/26/2019, 6:56 PM
    I have a small question. I am using nexus with this example https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-auth. How can I use the resolvers that are create by nexus (like createUser(), updateUser()) creating them myself in the mutation resolver. Or do I need to create those resolvers myself?
  • m

    Michael F

    09/26/2019, 8:46 PM
    Hey is it possible to connect to an MYSQL database over SSH tunnel? my database server is on a private network.
  • h

    H

    09/26/2019, 9:16 PM
    why heroku deploys are disable?
  • p

    pettanko

    09/26/2019, 11:52 PM
    Where is the best place to get support for Prisma2 related questions?
    d
    • 2
    • 1
  • p

    Pete Perpich

    09/27/2019, 12:30 AM
    hi everyone! I just joined this channel and am trying to learn. The prisma methodology seems like the future of app development, since it takes away so much of the overhead. I am trying to put together a fullstack app with prisma/graphql-yoga hosted on digitalocean right know, so would appreciate any advice or tips to get started. In the future I want to move all the backend to serverless functions, but haven't quite figured out the ins and outs of that yet. Thank you!
  • p

    prisma-chobo

    09/27/2019, 3:45 AM
    hello
  • p

    prisma-chobo

    09/27/2019, 3:48 AM
    Can anyone help me? when I try to do “prisma init” it says “FetchError: request to http://localhost:4466/management failed, reason: connect ECONNREFUSED 127.0.0.1:4466"
    e
    j
    • 3
    • 5
  • e

    Emiel

    09/27/2019, 8:45 AM
    Hey there, I have a question regarding the use of CUID’s in MySQL and their performance characteristics. I can see in the Prisma source code that it will use VARCHAR(25) for id columns. So this is (at least) 25 bytes per id as opposed to 4 or 8 bytes for (big)int. And these will of course also be used for join-tables and foreign keys. Although I think nowadays we shouldn’t be concerned that much about disk-space, maybe even index-size; what concerns me is the efficiency of index-lookups for VARCHAR. I understand CUID’s are monotonically increasing which is beneficial for b-tree indexes but I expect that an integer index is (much) more efficient than varchar. Did the Prisma team research or benchmark this? Does this scale to millions (or billions) of rows, or does it fall apart at some point? Thanks!
  • k

    KJReactor

    09/27/2019, 7:27 PM
    Hello everyone! I'm trying to create a one to many relationship. How can I connect the nested document if receiving an array?
    Copy code
    ...
    const fields = {username, ...args};
    fields.books = {connect: {username: username}}
    return ctx.prisma.createBooks(books)
    Books should returns a list correctly but the above (mutation) returns an error that property username does not exist
  • c

    Corey Snyder

    09/27/2019, 8:48 PM
    Are there any tutorials or documentation about how to manage dev/staging/prod instances on the prisma hosting?
  • a

    Arnav Verma

    09/27/2019, 9:06 PM
    I know for prob there https://www.prisma.io/tutorials/deploy-prisma-to-aws-fargate-ct14/
  • a

    Arnav Verma

    09/27/2019, 9:06 PM
    also a bunch here https://www.prisma.io/tutorials/
1...314315316...637Latest