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

    Alex Reyne

    08/25/2020, 8:56 PM
    No you cannot, gotta use rawQuery if anyone else had a similar question
    👍 1
  • k

    KJReactor

    08/25/2020, 10:35 PM
    I have a one to many relation between i.e. Product and Store. I can already create new Products that refer to their one Store like this: `` return await ctx.prisma.product.create({ data: { ..._data, // establish connection with store store_productTostore: { connect: { store_id }, }, }, }); ``
    data
    contains the input for the new
    product
    I checked the table it indeed refers to the designated home. However, I can't get the
    products
    column in Home to refer to the set of keys it has
    products
    is an array of the same type of key.id. I tried changing the above to this but it doesn't work: `` return await ctx.prisma.store.update({ where: { store_id }, data: { products: { create: { ...data } } } }); ``
    n
    • 2
    • 59
  • j

    justinhandley

    08/26/2020, 1:26 PM
    I have urgent need to talk to someone at Prisma about an old graph.cool account. I’ve tried support chat but not heard back… hoping someone might be lurking here?
    n
    • 2
    • 2
  • j

    Jayanth

    08/26/2020, 1:58 PM
    Hello all, Won't prisma introspect work on database with no tables?. Does that mean everytime I should create a dummy table on new database with no data?
    n
    • 2
    • 5
  • k

    KJReactor

    08/26/2020, 2:01 PM
    From what I understand, prisma tries to deduct the existing schema in your db. Therefore, you must either create the tables, enums, etc before then call introspect
    👍 3
  • g

    Gabriel Oliveira

    08/26/2020, 11:37 PM
    Hi Everyone, I have to do some maintenance in a project created with prisma 1 I guess (
    "prisma-binding": "^2.1.1" on the project package.json
    ) and I only have experience with prisma 2 using prisma cloud, which does not include that step. I need to figure out what is the service that was created by the previous dev and hosted on heroku, this service is the endpoint for the Prisma instance of prisma-binding class as below:
    Copy code
    const prisma = new Prisma({
        typeDefs: 'src/generated/prisma.graphql',
        endpoint: endpoint,
        secret: secret,
        fragmentReplacements
    })
    Since I do not have access to whatever was created and deployed to the endpoint consumed above, I wonder if this is possibly something that will need to be altered as I create other queries mutations and everything else, or if it's just some sort of middleware between prisma and the postgres DB The url is formatted as:
    <https://projetc-802bb3764d.herokuapp.com/project/dev>
    Thanks!
  • m

    Michael Aubry

    08/27/2020, 7:10 AM
    Finally launched on Product Hunt. Using Prisma 2 on the backend. Lets BLOWWW it up 🚀 https://www.producthunt.com/posts/story-creator-2
    👏 13
    prisma rainbow 7
    prisma cool 4
    fast parrot 6
    ✨ 2
    🙌 3
    🌟 4
    🎥 1
    m
    • 2
    • 1
  • j

    Jayanth

    08/27/2020, 9:53 AM
    Hello all, Is type "ID" invalid in prisma2 ?
    r
    • 2
    • 4
  • j

    Jayanth

    08/27/2020, 10:28 AM
    Hello all, Is there a way I can alter table?. For eg I have 10 users with 3 fields. Lets say a fourth field is required for user keep value null for existing users. Changing model throws me an error. I don't want to purge my db and start from scratch. How can I achieve this?
    r
    m
    r
    • 4
    • 9
  • v

    vnadygin

    08/27/2020, 11:16 AM
    Hey guys. I am looking for a proper solution on how we can achieve specific order positions. For example we want to query todos by priority. We could add a priority INT field, but changing a one todo priority will require us to update all following records. Any suggestions?🙏
    j
    • 2
    • 7
  • g

    Gabriel Oliveira

    08/27/2020, 11:57 PM
    Can someone help me find the docs for prisma 1.10 (or equivalent) where it's specified what are the environment variables that prisma deploy command expects when you pass an env file with
    prisma deploy -e
    r
    • 2
    • 9
  • k

    kpav

    08/28/2020, 12:09 AM
    anyone know if there has been work on emacs integration for prisma files? I saw https://github.com/prisma/prisma/issues/2312 on github so I am assuming the answer is "not yet"
  • t

    Tobias Meixner

    08/28/2020, 6:56 AM
    Hello, is there any existing tooling/solution for having multiple schema files and import/reuse models across many prisma schema files It will be great to define models in separate files for larger projects wondering if anything out there that does play nicely with prisma IDE tooling already? Let's say an Activity model that is tracking table activity but being used by multiple services as relational model
    r
    • 2
    • 1
  • j

    Jayanth

    08/28/2020, 7:41 AM
    Hey all, let's say I have a model like:
    UserActivity{
    type:String!
    target: Int!
    unit: String!
    }
    type has enums like {Drinking Water, Yoga} etc. If type is Drinking Water can I set unit to litres predefined. For yoga it has to be minutes. How can I do this ?
    r
    • 2
    • 4
  • k

    Kaspar Naaber

    08/28/2020, 11:24 AM
    Hello! Is Prisma plugin incompatible with the latest version of IntelliJ IDEA? (https://plugins.jetbrains.com/plugin/14282-prisma-support)
    r
    g
    • 3
    • 2
  • g

    Gabriel Oliveira

    08/28/2020, 3:10 PM
    Hi all, what should I review in my project (starting a new one) in case the hook
    - graphql get-schema -p prisma
    is not generating the
    src/generated/prisma.graphql
    file?
  • g

    Gabriel Oliveira

    08/28/2020, 3:10 PM
    it runs without errors after the deploy command but no file is generated
  • g

    Gabriel Oliveira

    08/28/2020, 5:52 PM
    Is the command prisma list supposed to show only the cloud services that I have deployed to or should it also show the local services too?
  • g

    Gabriel Oliveira

    08/29/2020, 5:50 PM
    Hi there, I'm having trouble making prisma create the tables for my existing model/schema into a new database. I already have everything setup and working but I accidentally deleted the local postgres db I was using, now after I created the db again with the same name, prisma deploy always says everything is up to date and never creates the tables again. How can I force prisma to create again or delete the cache where prisma checks for this "everything is up to date", would it be in docker somehow?
  • g

    Gabriel Oliveira

    08/29/2020, 7:24 PM
    Answering my own question, prisma delete (I used -e /path_to_env/development.env) That made prisma delete all its internal data about that project and I was able to deploy it again without the message that everything was up to date
    đź’Ż 1
  • p

    Pieter

    08/31/2020, 6:56 AM
    https://prisma.slack.com/archives/CM2LEN7JL/p1598791795001800
    ✔️ 1
  • j

    Jayanth

    08/31/2020, 8:43 AM
    Hey all, how do I set OnDelete CASCADE in prisma 2 ?
    r
    • 2
    • 2
  • n

    Natalia

    08/31/2020, 12:51 PM
    “What’s new in Prisma” (v2.6.0) live stream will air on Youtube this Thursday at 5 PM CEST. Niko and Ryan from the Prisma team will discuss news in the Prisma ecosystem.

    Tune inâ–ľ

    to learn about new releases, planned features, and other interesting bits from the Prisma world.
    prisma rainbow 11
    📺 3
    🎥 2
    đź‘€ 4
    đź’Ż 5
    prisma green 4
    🇳🇬 2
  • m

    Manthan Mallikarjun

    09/01/2020, 5:00 AM
    Can someone take a look at this and let me know if this is a good way to test Prisma? https://www.notion.so/nahtnam/Testing-with-Prisma-and-Jest-4263872c3a73439f8a16bdd27a604ce5 This is the best way I could come up with based on my limited knowledge, but it is fully typed
    n
    j
    • 3
    • 3
  • y

    yendi

    09/01/2020, 6:28 AM
    Hi, I need help with prisma connecting to postgresql
  • y

    yendi

    09/01/2020, 6:30 AM
    the first question is that, what is the alternetive to host.docker.internal for linux in docker-compose.yml
  • y

    yendi

    09/01/2020, 6:44 AM
    Sep 01, 2020 64257 AM org.postgresql.core.v3.ConnectionFactoryImpl log prisma_1 | WARNING: IOException occurred while connecting to host.docker.internal:5432 prisma_1 | java.net.UnknownHostException: host.docker.internal prisma_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) prisma_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) prisma_1 | at java.net.Socket.connect(Socket.java:589) prisma_1 | at org.postgresql.core.PGStream.<init>(PGStream.java:69) prisma_1 | at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:156) prisma_1 | at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) prisma_1 | at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) prisma_1 | at org.postgresql.Driver.makeConnection(Driver.java:452) prisma_1 | at org.postgresql.Driver.connect(Driver.java:254) prisma_1 | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:119) prisma_1 | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369) prisma_1 | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198) prisma_1 | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467) prisma_1 | at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) prisma_1 | at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:706) prisma_1 | at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:692) prisma_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) prisma_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) prisma_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) prisma_1 | at java.lang.Thread.run(Thread.java:748)
    r
    • 2
    • 4
  • a

    Aaron Dye Jr

    09/01/2020, 11:22 AM
    Uhm, where can I go to get support for prisms
  • a

    Aaron Dye Jr

    09/01/2020, 11:22 AM
    Prisma*
    r
    • 2
    • 54
  • a

    Aaron Dye Jr

    09/01/2020, 11:25 AM
    I don’t really know how to use slack so uh
1...394395396...637Latest