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

    Jeanre Swanepoel

    08/04/2020, 11:27 AM
    how do I get the database url and not just the https url
    r
    • 2
    • 4
  • j

    Jeanre Swanepoel

    08/04/2020, 11:27 AM
    ?
  • j

    Jeanre Swanepoel

    08/04/2020, 11:40 AM
    Might it be easier / better just to create a new prisma 2 app and copy and paste?
  • z

    zth

    08/04/2020, 12:46 PM
    What's Prisma's role in security? Using Postgres for instance, can Prisma help me manage RLS etc?
  • z

    zth

    08/04/2020, 12:47 PM
    Also, it seems like the command for running the experimental Studio on the website doesn't work. Or, at least not for me, I get "unknown command studio"
    r
    • 2
    • 1
  • v

    veksen

    08/04/2020, 5:09 PM
    given the order by multiple field.. how does it work with an object given JS objects have no order? 🤔 re: talking about this snippet
    Copy code
    // order by `age` descending and then by `name` ascending
    const users = await prisma.user.findMany({
      orderBy: {
        age: 'desc',
        name: 'asc'
      }
    })
    👍 2
    🤔 1
    r
    r
    t
    • 4
    • 4
  • m

    Michael Aubry

    08/04/2020, 8:54 PM
    I built After Effects for dummies using Prisma 2. Just posted on Hacker News. If its interesting to you, would appreciate the love ❤️ https://news.ycombinator.com/from?site=storycreatorapp.com
  • m

    Michael Aubry

    08/04/2020, 9:14 PM
    A friend just told me I did it wrong haha If you could go to https://news.ycombinator.com/newest and cmd + f "I built an After Effects for dummies" then upvote it. That would be amazing for gaining some traction.
    👍 3
    🔼 3
  • m

    Michael Aubry

    08/04/2020, 10:45 PM
    Just hit #1 on Hacker News. Thanks guys for the support 🙂
    fast parrot 1
  • g

    g

    08/04/2020, 10:51 PM
    Well.. it's a great product. Congratulations
  • c

    Charles Gaudreau Jackson

    08/05/2020, 12:55 AM
    Hi all, I am getting this error when running
    prisma deploy
    - what can I do?
  • a

    Al

    08/05/2020, 5:21 AM
    Hello, I have a question about prisma and nexus.
    ModelWhereInput
    of Prisma 2 accept for
    string
    (for example) type
    name: String | StringFilter
    . I'm trying to recreate the same input object with nexus, but seems if there where multiple inputs with same name, the last input will override the others
    Copy code
    schema.inputObjectType({
      name: 'StringFilter',
      definition(t) {
        t.string('equals')
        t.string('contains')
      },
    })
    
    
    schema.inputObjectType({
      name: 'ModelWhereMany',
      definition(t) {
        t.string('name')
        t.field('name', {type:'StringFilter'})
      },
    })
    
    schema.objectType({
      name: "Query",
      definition(t) {
        t.field("findManyModel", {
          type: "Model",
          args: {
            where: schema.arg('ModelWhereMany')
          },
          async resolve() // other code
        }
    });
    So in this case I have only
    StringFilter
    There is a workaround for that or could be a new feature?
    r
    • 2
    • 4
  • a

    Adri V.

    08/05/2020, 3:08 PM
    Hi, I have a question regarding prisma and graphQL. I would like to create a query that would be able to filter a table with regards to different custom enum types, that would respond to things such as category or status. So far I managed to implement it only in the case that all different filter options are passed, but I don't seem to figure out a way to leave some of those blank and still be able to perform the query on Prisma syntax. This is the query I wrote so far:
    Copy code
    const filterSuggestions = async (_, { input }, { db, me, utils }) => {
        try {
            if (!input.archived) {
                input.archived = false;
            }
    
            return await db.suggestion.findMany({
                where: {
                    AND: [
                        { status: input.status },
                        { category: input.category },
                        { priority: input.priority },
                        { archived: input.archived }
                    ]
                }
            });
    So far, as you can see only if input contains a valid value for all of the filter options it will work. Is there a way to implement it correctly?
    r
    • 2
    • 3
  • p

    Pieter

    08/05/2020, 6:54 PM
    Hi, I am having an issue switching to prisma. I got a postgres db. We've been using it with sequelize but I am trying to switch to prisma 2. All our tables are camelCase and plurals. e.g.
    companies
    or
    userProfiles
    table. When I run
    prisma introspect
    it generates models that matches the table names, which results in
    nexus
    generating "singular" and plural typings for the models, both being the actual table and model names (plural) so it results in duplicates in the typescript typings which means code doesn't compile. I got over 3000 lines generated by prisma introspect and there's no proper intellisense to rename a model and all fields related to it
    j
    a
    • 3
    • 109
  • d

    Daan Helsloot

    08/05/2020, 7:16 PM
    Hi guys,  whenever I run the request function of my GraphQLClient (graphl-request library) it returns an error but the error contains the correct result. I found this https://github.com/prisma-labs/graphql-request/issues/140 problem but ever after setting the headers it still causes issues: My graphql client:
    Copy code
    GraphQLClient {
      url: '<https://api.devprtcl.com/v1/graphql>',
      options: { headers: { Accept: 'application/json' } }
    }
    The response:
    Copy code
    Error: GraphQL Error(Code: 200): {
        "response": {
            "error": "{\"data\":{\"property_authentication\":[{\"property\":\"0xcEBD1BF31DF3E3697Ea26e2F94F9E3644C809F46\"}]}}",
            "status": 200
        },
        "request": {
            "query": "{ property_authentication(where: {authentication_id: {_eq: \"vue-i18n\"}}) {\n\t\tproperty\n\t  }\n\t}"
        }
    }
    at GraphQLClient. < anonymous > (/home/daan / badge / node_modules / graphql - request / dist / index.js: 134: 35)
    at step(/home/daan / badge / node_modules / graphql - request / dist / index.js: 44: 23)
    at Object.next(/home/daan / badge / node_modules / graphql - request / dist / index.js: 25: 53)
    at fulfilled(/home/daan / badge / node_modules / graphql - request / dist / index.js: 16: 58)
    at processTicksAndRejections(internal / process / task_queues.js: 97: 5)
    r
    • 2
    • 2
  • t

    Tracy (aboutsnack.com)

    08/06/2020, 5:40 AM
    Hello!
    🤚 3
  • t

    Tracy (aboutsnack.com)

    08/06/2020, 5:40 AM
    👋
  • v

    Venkat

    08/06/2020, 7:53 AM
    Is there a repo that will help building admin dashboard / frontend for my graphql nexus app?
    a
    • 2
    • 7
  • g

    Guillermo

    08/06/2020, 10:14 AM
    Anybody knows why I can't install prisma all of the sudden?
    n
    a
    • 3
    • 7
  • t

    Toni Vaakanainen

    08/06/2020, 10:15 AM
    https://status.npmjs.org/incidents/cksjqc1w11v5
    👍 4
  • t

    Toni Vaakanainen

    08/06/2020, 10:15 AM
    I’d imagine because of that
  • t

    Toni Vaakanainen

    08/06/2020, 10:16 AM
    No biggie NPM, just take your time…
  • g

    Guillermo

    08/06/2020, 10:17 AM
    Thank you! Such a bad timing, I was going crazy
  • l

    lawjolla

    08/06/2020, 7:23 PM
    Is there any way to connect Prisma to RDS via db-auth-token? I keep getting improperly formatted url errors and I don't see a way around it. Thanks!
    r
    • 2
    • 1
  • d

    danhoang

    08/06/2020, 9:43 PM
    Question: I've been using Zeit Now 1.0 (I know, I'm really late to this), and tried using Vercel to deploy, but the link takes me to a website of just directories. Originally, on Zeit 1.0, it was pointing to a prisma server. Anyone know how to fix this?
    r
    p
    • 3
    • 2
  • s

    Suhail

    08/07/2020, 6:08 AM
    Memory issue linked with prisma https://github.com/prisma/prisma1/issues/5105
  • p

    Pieter

    08/07/2020, 10:09 AM
    Interval data type for postgres https://github.com/prisma/prisma-client-js/issues/813
    👍 1
  • p

    Pieter

    08/07/2020, 11:45 AM
    @Daniel Norman thanks for hosting streams like these:

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

    Very helpful! prisma rainbow I got a question for Ryan (don't see him here on slack) I'd like to host a prisma2 server in a serverless environment, but unlike Ryan showed there, I'd like to use vercel rather than serverless framework. I already went through this guide which worked great, but I have not load tested it in a real production app yet. Ryan pointed out in his talk that the prisma client needs to be instantiated outside of the
    handler
    so it gets re-used, which makes perfect sense. I'm not aware of how to extract handler functions etc inside a function running on vercel.
    🙏 1
    r
    • 2
    • 5
  • d

    Devin Henkel-Legare

    08/07/2020, 7:24 PM
    Has anyone seen successfully compiled arm64 binaries? I’d really love to get it running on my pi cluster swarm, but would be happy just running it on one of the SBCs.
    t
    • 2
    • 5
  • b

    borrow3d_Cod3

    08/08/2020, 3:43 PM
    hey guys i'm new to prisma, and I'm using it along with graphql , I came accross an issue that i can't figure out, I wouldn't even know where to look as I am a newb. When I change a property of my user schema to be @unique, postgres is not migrating along with graphql. I would appreciate a link to the "right" area of documentation, as I don't want an answer as much as i would like to understand what i did wrong. If this is too vague of question I can elaborate, but didn't want to write an article lol
    t
    • 2
    • 2
1...390391392...637Latest