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

    Osicka

    05/10/2019, 12:33 PM
    Where can i find the prisma icons? I want to add them to my own slack space as well 😄
    n
    k
    • 3
    • 3
  • h

    Helmi

    05/10/2019, 1:55 PM
    why I can't use filter
    id_contains
    ? I use mongoDB, prisma v1.32
    h
    • 2
    • 3
  • c

    congy

    05/10/2019, 2:25 PM
    Hello, is there a limit on active sessions for a particular prisma service? I have my server code deployed on lambda, where my prisma-binding gets instantiated on every request (using service token). Recently, I started getting this error when making requests using prisma-binding:
    Copy code
    Your token is invalid. It might have expired or you might be using a token from a different project.
    Didn't happen before.
    d
    h
    d
    • 4
    • 11
  • s

    Ste O'Neill

    05/10/2019, 4:00 PM
    Does anyone know of a way of using the same docker-compose file for my prisma & backend // frontend?
    h
    • 2
    • 1
  • n

    Nelson Pecora

    05/10/2019, 5:49 PM
    What are some best practices people have around versioning content? I was looking at Contentful's Graph API docs, and they're doing an interesting thing with how they serve "published" vs "draft" records, but I can't figure out how they're modeling it behind the scenes. Do y'all prefer record snapshots at discrete points in time? One single record with a "status" field? "Fat edges" with different versions of properties pointing to different types? (This is mostly coming from a CMS context, so I'm dealing with things like "published" vs "draft" records, and and reverting back to previous versions of records)
    • 1
    • 5
  • j

    Junsu Kim

    05/10/2019, 5:53 PM
    In case 'id:Int!@id' 1. Something: [String!] @scalarList(strategy: RELATION) 2. Mutation{ ...(... something{set["a","b"]} } Always return NULL...... If 'id:ID!@id', it will operate normally. I think it's a bug. What's wrong with you?
    h
    • 2
    • 6
  • d

    dan

    05/10/2019, 6:42 PM
    Just upgraded prisma to 1.32 and now my CircleCI builds are failing with
    Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
    No code has changed, just simply bumping the version for prisma client and server.
    h
    • 2
    • 1
  • d

    dan

    05/10/2019, 6:44 PM
    Anything that sticks out as a change that would cause this to start happening
  • j

    Jeff

    05/10/2019, 6:48 PM
    What is the difference between Prisma Token and Prisma Secret? If I'm understanding this correctly, Prisma Secret is when, let's say in a development environment, Node communicates with prisma.yml on the Prisma server, the two (Prisma Secret from prisma.js in Node and Prisma Secret in prisma.yml on Prisma server) check against each other to make sure they match. In that sense, Prisma Secret is something I can arbitrarily create with any series of characters, where as Token is something Prisma generates. What is Prisma Token and when is it used?
    v
    h
    • 3
    • 9
  • j

    Jeany Meza

    05/11/2019, 5:55 AM
    Does anybody has experience about how to run a Prisma server on Kubernetes with an external mongo database?

    https://www.youtube.com/watch?v=fvpq4jqtuZ8â–¾

    I’m following this video to handle the external connection from my cluster. But I get the following error from the Prisma container:
    Copy code
    java.lang.IllegalArgumentException: An SRV host name 'mongo-service-prod' was provided that does not contain at least three parts. It must contain a hostname, domain name and a top level domain.
    at com.mongodb.internal.dns.DnsResolver.resolveHostFromSrvRecords (DnsResolver.java:52)
    at com.mongodb.ConnectionString.<init> (ConnectionString.java:325)
    at com.prisma.deploy.connector.mongo.MongoInternalDatabaseDefs.<init> (MongoInternalDatabaseDefs.scala:9)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabaseDefs$lzycompute (MongoDeployConnector.scala:14)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabaseDefs (MongoDeployConnector.scala:14)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.mongoClient$lzycompute (MongoDeployConnector.scala:15)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.mongoClient (MongoDeployConnector.scala:15)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabase$lzycompute (MongoDeployConnector.scala:16)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabase (MongoDeployConnector.scala:16)
    at com.prisma.deploy.connector.mongo.MongoDeployConnector.<init> (MongoDeployConnector.scala:18)
    at com.prisma.connectors.utils.ConnectorLoader$.loadDeployConnector (ConnectorLoader.scala:39)
    at com.prisma.local.PrismaLocalDependencies.deployConnector$lzycompute (PrismaLocalDependencies.scala:83)
    at com.prisma.local.PrismaLocalDependencies.deployConnector (PrismaLocalDependencies.scala:83)
    at com.prisma.local.PrismaLocalDependencies.<init> (PrismaLocalDependencies.scala:90)
    at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1 (PrismaLocalMain.scala:13)
    at com.prisma.local.PrismaLocalMain$delayedInit$body.apply (PrismaLocalMain.scala:8)
    at scala.Function0.apply$mcV$sp (Function0.scala:34)
    at scala.Function0.apply$mcV$sp$ (Function0.scala:34)
    at scala.runtime.AbstractFunction0.apply$mcV$sp (AbstractFunction0.scala:12)
    at scala.App.$anonfun$main$1$adapted (App.scala:76)
    at scala.collection.immutable.List.foreach (List.scala:388)
    at scala.App.main (App.scala:76)
    at scala.App.main$ (App.scala:74)
    at com.prisma.local.PrismaLocalMain$.main (PrismaLocalMain.scala:8)
    at com.prisma.local.PrismaLocalMain.main (PrismaLocalMain.scala)
    h
    • 2
    • 2
  • j

    Jonathan Demirgian

    05/11/2019, 7:48 PM
    Would someone confirm that this is not expected behavior? I don't think it is but the last two days of searching have me feeling gaslit. My issue is that the the basic
    prisma init
    Docker example built into the Prisma CLI doesn't work. Here's the standard boilerplate setup in an empty dir:
    Copy code
    Jonathans-Air:prismaex lirum$ ls
    Jonathans-Air:prismaex lirum$ prisma init
    ? Set up a new Prisma server or deploy to an existing server? Create new database
    ? What kind of database do you want to deploy to? MySQL
    ? Select the programming language for the generated Prisma client Prisma JavaScript Client
    
    Created 3 new files:
    
      prisma.yml           Prisma service definition
      datamodel.prisma    GraphQL SDL-based datamodel (foundation for database)
      docker-compose.yml   Docker configuration file
    
    Next steps:
    
      1. Start your Prisma server: docker-compose up -d
      2. Deploy your Prisma service: prisma deploy
      3. Read more about Prisma server:
         <http://bit.ly/prisma-server-overview>
    
    Generating schema... 25ms
    Saving Prisma Client (JavaScript) at /Users/lirum/Documents/programming/projects/learndocker/ex5/prismaex/generated/prisma-client/
    
    
    
       ╭──────────────────────────────────────╮
       │                                      │
       │   Update available 1.32.0 → 1.32.2   │
       │    Run npm i -g prisma to update     │
       │                                      │
       ╰──────────────────────────────────────╯
    
    Jonathans-Air:prismaex lirum$ ls
    datamodel.prisma        docker-compose.yml      generated               prisma.yml
    Jonathans-Air:prismaex lirum$ docker-compose up -d
    Creating network "prismaex_default" with the default driver
    Creating prismaex_mysql_1  ... done
    Creating prismaex_prisma_1 ... done
    Jonathans-Air:prismaex lirum$
    Cool, so they're running and I can check with `docker ps`:
    Copy code
    Jonathans-Air:prismaex lirum$ docker ps
    CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                    NAMES
    3421e8b8f214        prismagraphql/prisma:1.32   "/bin/sh -c /app/sta…"   4 minutes ago       Up 4 minutes        0.0.0.0:4466->4466/tcp   prismaex_prisma_1
    dba528e010a4        mysql:5.7                   "docker-entrypoint.s…"   4 minutes ago       Up 4 minutes        3306/tcp, 33060/tcp      prismaex_mysql_1
    Jonathans-Air:prismaex lirum$
    But when I checkout the playground at localhost:4466 in my browser, I'm show a "Server cannot be reached" error message (attached). This is not what I should be seeing, right? I should be able to inspect the schema from this Playground?
    s
    j
    • 3
    • 6
  • s

    Sávio Serra

    05/11/2019, 10:02 PM
    Guys, does anyone know how's the wip on https://github.com/prisma/prisma/issues/3846#issuecomment-491546518 ? :(
    h
    • 2
    • 1
  • i

    impowski

    05/12/2019, 5:36 AM
    What am I missing? I keep getting this error:
    Cannot read property 'deleteManyLoads' of undefined
    b
    • 2
    • 2
  • j

    Junsu Kim

    05/12/2019, 8:10 AM
    I want to combine two columns instead of 'unique' and make them unique. I want to make a kind of Composite Key, is this possible in prisma??
    b
    s
    • 3
    • 3
  • y

    yolen

    05/12/2019, 12:49 PM
    Some time ago I read about having one way relations i.e. a relation which only appears in one of the types in the relation? Is that possible now?
  • z

    zicho

    05/12/2019, 4:17 PM
    im trying to get prisma up and running but after doing "docker-compose up -d" i get stuck. when i deploy it says server is not running. If i run "docker ps" i see the prisma server running, but the "ports" field is emty. however, if i stop and start the container, the ports show its adress properly until I do docker ps again. so running it directly shows it, but running it again shows empty. what could be causing this?
  • z

    zicho

    05/12/2019, 4:18 PM
    it seems like it crashes or something but I do not know why
  • z

    zicho

    05/12/2019, 4:31 PM
    it keeps restarting itself
    b
    k
    • 3
    • 2
  • t

    Taylor

    05/12/2019, 6:28 PM
    hey guys is anyone working on wes bos course advanced react?x
    j
    • 2
    • 7
  • p

    Philipp Köhler

    05/13/2019, 9:42 AM
    Hey, I'm trying to connect a n:m relation of Code and Tag like this:
    Copy code
    return context.prisma.createCode
        code: args.code,
        description: args.description,
        created_by: { connect: { id: args.id }},
    	
        tags: { connect: { id: args.tags.id }},
    });
    The
    created_by
    field works, but the
    tags
    field doesn't, because
    args.tags
    is a list. But I don't know how to resolve this.
    b
    • 2
    • 3
  • a

    Andrei Bacescu

    05/13/2019, 9:53 AM
    Hello guys! I want to create a prisma API (prisma service) with read-only permissions, I don't want to accidentally modify the database's content. Is this possible? Thanks!
    h
    • 2
    • 2
  • k

    Karim

    05/13/2019, 11:09 AM
    Hi guys, I don't know why I can't use the --prototype flag for introspection, even with prisma@1.33.0-beta.2, any idea ? Many thanks
    Error: Unknown flag --prototype
    h
    • 2
    • 1
  • j

    Jeroen

    05/13/2019, 12:35 PM
    Hey, i am looking at a problem and I can't find a proper solution for this. I have a schema which stores a number of Products with a price. When someone saves an order, I save the order with a relation to the specific Product. So far so good, but whenever the price of the Product changed with an update, I don't want the price of the product within the order to change. My best guess is, I would need to implement some kind of revisioning with Products. Am I on the right track or should I look at a different route?
    s
    j
    • 3
    • 2
  • s

    Sven Haiges

    05/13/2019, 2:49 PM
    What is the recommended graphql client to use for a vue.js app and including subscriptions? Right now I am doing the graphql queries simply with ‘fetch’ and it works great. Is there an example how to support subscriptions from a client perspective and possibly without a library or with minimal library support?
    j
    h
    • 3
    • 3
  • p

    Petr Homoky

    05/13/2019, 3:34 PM
    Hello do you have anyone already solved the
    globalSetup
    for testing Yoga 2 + Nexus with Jest?
    h
    • 2
    • 2
  • e

    evan

    05/13/2019, 4:50 PM
    Is it possible to use prisma outside of the resolvers context? Basically, I’m trying to update a Canvas’ data to an arbitrary value every 60 seconds – I have a
    node-cron
    job for this which starts scheduling on the yoga server start… Sample Job
    Copy code
    import * as cron from 'node-cron'
    
    import {prisma} from './generated/prisma-client'
    
    let cronCounter: number = 0
    const updateData = cron.schedule(
      '*/1 * * * *',
      () => {
        prisma.updateCanvas({
          where: {id: '1'},
          data: {data: `cron data${cronCounter}`},
        })
        cronCounter++
        console.log('cron job: updateData')
      },
      {scheduled: false},
    )
    
    export {updateData}
    The cron job runs, but the database isn’t actually updated. I assume this is because its not attached to a request from the graphQL server. Is there any way to implement this type of system?
    h
    • 2
    • 2
  • h

    Hajnal Benjamin

    05/13/2019, 5:56 PM
    Hey! You are stating in the documentation that
    Copy code
    The fields annotated with the @id, @createdAt and @updatedAt directives are managed by Prisma and read-only in the exposed Prisma API.
    however the generated <Model>CreateInput includes the @id field and a new record can be inserted by custom id. Is it a bug or the documentation is outdated?
    j
    h
    • 3
    • 5
  • b

    Bruce He

    05/13/2019, 11:48 PM
    Copy code
    type User {
      id: ID! @id
      name: String!
      email: String! @unique
      password: String!
      age: Int
      img: String
      location: Location
      hostedEvents: [Event]! @relation(name: "HostedEvents", onDelete: CASCADE)
      joinedEvents: [Event]! @relation(name: "EventMembers", onDelete: CASCADE)
      pushNotificationTokens: [PushNotificationTokens]!
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    
    type Event {
      id: ID! @id
      owner: User! @relation(name: "HostedEvents")
      name: String!
      imgs: [String]!
      description: String
      start: DateTime!
      end: DateTime!
      categories: [Category]!
      members: [User]! @relation(name: "EventMembers")
      chatRoom: GroupChatRoom!
      pendingRequests: [PendingRequest]!
      locations: [Location]!
      comments: [Comment]!
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
  • b

    Bruce He

    05/13/2019, 11:48 PM
    Program pops up this -> (Valid values for the strategy argument of @scalarList are: RELATION.) after run prisma deploy. Any one knows why ?
  • b

    Bruce He

    05/13/2019, 11:51 PM
    b
    • 2
    • 2
1...268269270...637Latest