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

    Suhail

    07/16/2020, 12:23 PM
    Any idea @Ryan?
  • s

    Suhail

    07/16/2020, 12:50 PM
    Anyone? 🤔
  • m

    Mohammed alreai

    07/16/2020, 5:42 PM
    Copy code
    .graphqlconfig
    projects:
      app:
        schemaPath: "src/schema.graphql"
        extensions:
          endpoints:
            default: "<http://localhost:4000>"
      prisma:
        schemaPath: "src/generated/prisma.graphql"
        extensions:
          prisma: prisma/prisma.yml
    
    prisma.yml
    endpoint: ${env:PRISMA_ENDPOINT}
    datamodel: datamodel.prisma
    secret: ${env:PRISMA_SECRET}
    hooks:
      post-deploy:
        - graphql get-schema --project prisma
    
    run scripts
        "deploy": "prisma deploy --env-file .env"
    not generate prisma.graphql why ????????
  • m

    Mohammed alreai

    07/16/2020, 5:50 PM
    not generate prisma.graphql
  • d

    David Gwon

    07/16/2020, 6:02 PM
    I NEED HELP!!!
  • d

    David Gwon

    07/16/2020, 6:03 PM
    SOMEBODY HELP ME!
    l
    r
    • 3
    • 5
  • a

    Ashwin Kudva

    07/16/2020, 7:15 PM
    Hi guys! Quick question - I want to set up prisma with a mySQL database that requires SSH credentials. Is there any way to do this? (
    prisma init
    times out, for obvious reasons and it doesn't ask me if i have SSH credentials)
    j
    • 2
    • 1
  • a

    Alex Vilchis

    07/16/2020, 8:34 PM
    Hi there. Quick survey! How many of you are using a serverless paradigm when deploying Prisma APIs? • 👩‍🚀 for serverless • 📦 for other
    📦 7
    👩‍🚀 7
    t
    • 2
    • 1
  • p

    Peter

    07/17/2020, 12:59 PM
    Hi All, Is a latency of accessing from Asia would be significant?
    t
    • 2
    • 3
  • p

    Peter

    07/17/2020, 1:00 PM
    Read/Write
  • a

    Ashiqur Rahman

    07/17/2020, 4:45 PM
    does prisma provide any default method to handle this? I am directly filtering the products array which is not optimized at all.
    Copy code
    async productsByKeyword(_, { keyword }) {
        const products = await prisma.product.findMany({
          orderBy: { createdAt: 'desc' },
        });
    
        const lowerCasedKeyword = keyword.toLowerCase();
    
        const filteredProducts = products.filter((product) =>
          product.title.toLowerCase().includes(lowerCasedKeyword)
        );
    
        return filteredProducts;
      },
    r
    • 2
    • 3
  • n

    Nachiket Patel

    07/17/2020, 4:49 PM
    Prisma1 production issue, any help/pointers appreciated All of sudden RDS started hitting 100% CPU usage & not coming down, essentially making everything unusable. having 5 prisma-workers @ <20% CPU load & Memory load Restarting prisma-workers seems to work for 15min to 3hrs, couldn't find any patterns Seeing errors in workers
    Copy code
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
    java.util.concurrent.RejectedExecutionException: Task slick.basic.BasicBackend$DatabaseDef$$anon$3@e390b3 rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@c5b4995[Running, pool size = 4, active threads = 4, queued tasks = 1000, completed tasks = 545109]
  • a

    Amin Bakhtiari Far

    07/18/2020, 7:00 AM
    Hey guys!
  • a

    Amin Bakhtiari Far

    07/18/2020, 7:05 AM
    I'm using graphql-yoga@1.18.3 and prisma 1 I want to import a enum from generated schema file fetched from prisma into server schema but it seems to not work. This is my import statement:
    Copy code
    # import input UserOrderByInput from './src/generated/schema.graphql'
    # import input UserOrderByInput from './../../generated/schema.graphql'
    These are the two different ways I tried to no avail. Any suggestions would be highly appreciated. And by the way this is how i instanciate GraphQLServer:
    Copy code
    import mainSchema from "./gql/schema/schema.graphql"
    const server = new GraphQLServer({
        typeDefs: [mainSchema],
        resolvers,
        context(request) {
            return {
                request,
                prisma,
                Auth,
                Policy
            }
        },
        fragmentReplacements
    })
  • m

    Mohammed alreai

    07/18/2020, 9:30 AM
    i have issue i need to pass path to .graphqlconfig.ym file scheme but there is no file specific for schema i used this to schema const typeDefs = loadFilesSync(   path.join(__dirname, "./resolvers/schema/.graphql")* ); so how to pass this in .graphqlconfig.yml any suggestion to do that
  • m

    Manthan Mallikarjun

    07/18/2020, 7:38 PM
    I feel like the docs should tell you to create a index.ts file in your prima folder that exports the primsa client and then tells tsconfig to alias
    prisma
    to that folder
    r
    r
    • 3
    • 13
  • m

    Manthan Mallikarjun

    07/18/2020, 7:38 PM
    i learnt how to do it myself as a ts noob but i feel like its a huge improvement for those who dont know it exists
  • n

    Noah

    07/18/2020, 8:05 PM
    Z
  • p

    pradip Hajra

    07/20/2020, 8:14 AM
    graphql create prisma-books -boilerplate node-basic is not working for me. nothing happening .. please help me
    r
    • 2
    • 2
  • a

    Ashiqur Rahman

    07/20/2020, 2:31 PM
    Copy code
    const categories = [
      { name: 'search engine' },
      { name: 'language translation' },
      { name: 'home life' },
      { name: 'read' },
      { name: 'telecommutin' },
      { name: 'tool' },
      { name: 'learn' },
      { name: 'make money' },
    ];
    
    const createManyCategories = categories.map((category) =>
      prisma.category.create({
        data: category,
      })
    );
    I have created some categories like this, I saw on prisma studio they are save as id 1,2,3....8 but when I want to query them from playground, I dont get any id. How can I get it?
    r
    • 2
    • 7
  • k

    Kervin Vasquez

    07/20/2020, 8:02 PM
    anyone else is having issues with the build command of nexus. For some reason the nexus build -d vercel used to work without issue but I recently noticed that my deployments were failing the build command doesn't bundle the prisma/schema.prisma file . It's missing from the dist folder.
    r
    • 2
    • 2
  • a

    Awey

    07/21/2020, 12:18 PM
    If I have a Post and I want to be able to see which users liked that post. It would make sense to store the id of each user that liked the post in an array, correct? Something like
    Copy code
    model Post {
      ...
      likes   Int      @default(0)
      likedBy String[]
    }
    r
    r
    • 3
    • 32
  • n

    Neil Francis Nahid

    07/21/2020, 2:45 PM
    is it just me or the prisma migration is broken?
  • a

    Ashiqur Rahman

    07/22/2020, 5:06 AM
    Every time I checkout to a branch, I have to - delete the migration folder - remove the docker container using docker system prune! How to get rid of this?
  • b

    Ben Schwartz

    07/22/2020, 6:39 PM
    I’m using managed federation through Apollo Studio and get some annoying log messages every few seconds. Is there a way to disable this?
    Copy code
    Checking service definitions...
    No change in service definitions since last check.
  • a

    Alexander Lang

    07/22/2020, 7:31 PM
    Hi. I'm just looking for some general guidelines on how I should organize our code. I've traditionally worked with explicit data layers where a specific module would map to a table. With the very "nested" nature of Prisma (where one would create a group of related objects in a single transaction via a nested "create"), it seems like this model of mapping modules to database tables gets very fuzzy. I am curious as to how you all go about invoking Prisma client functions? Does your business logic code invoke the Prisma client directly? In which case, the business logic would have to be very aware of how Prisma works? Do you create an expllicit "data access" layer that tries to encapsulate date queries?
    r
    • 2
    • 2
  • d

    Dali Rojas

    07/23/2020, 1:11 AM
    Are there common patterns for implementing a soft delete with prisma?
    r
    l
    • 3
    • 7
  • j

    Jonathan

    07/23/2020, 7:13 AM
    For those who deploy using docker, what do you generally include in your final image for your api (post builder)? Im figuring out how thin I can make the image using multi stage builds, but I think for stuff like migrations the prisma cli and all its system depencies are stil necessary (unless its better to use a separate image for that?
    r
    • 2
    • 2
  • a

    Al

    07/23/2020, 12:55 PM
    Hello, Do you recommend to use prisma without Nexus or Nexus prisma plugin? there are some prisma examples where nexus is not used?
    r
    j
    b
    • 4
    • 9
  • j

    John Cantrell

    07/23/2020, 3:17 PM
    is it possible to get a list of enum values using prisma client?
    r
    j
    t
    • 4
    • 3
1...387388389...637Latest