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

    Enrico

    02/14/2020, 8:19 AM
    anyone got experience with nexus and nextjs and can tell me how to set up a api routes graphql server?
    d
    s
    • 3
    • 3
  • p

    Pavel Srom

    02/14/2020, 8:23 AM
    hello, I have a little issue with Prisma - I have two different GraphQL projects, one is using Postgres and the other one has just been created with MongoDB. When I ran 'prisma deploy' from the MongoDB project, Prisma is actually modifying data in my Postgres database. I know the solution is probably trivial, but I don't know why that is?
    s
    • 2
    • 5
  • y

    Yonaides

    02/14/2020, 12:42 PM
    Hello everybody!
    🙌 1
  • d

    Dany Aracena

    02/14/2020, 2:47 PM
    👋 I’m here! hello all
    👋 2
  • s

    Stephan Du Toit

    02/15/2020, 6:42 AM
    hi everyone,
  • s

    Stephan Du Toit

    02/15/2020, 6:43 AM
    anyone know how to add a custom input? For example, my User type query, only has the following inputs available:
    Copy code
    input UserWhereUniqueInput {
            id: ID
            email: String
          }
    g
    • 2
    • 5
  • s

    Stephan Du Toit

    02/15/2020, 6:43 AM
    I would like to modify to:
    Copy code
    input UserWhereUniqueInput {
            id: ID
            email: String
            resetPasswordToken: String
          }
  • e

    Efe

    02/15/2020, 4:11 PM
    Hey, guys I’ve been developing an app with prisms and I’m enjoying it so far. My only problem is that I can find a simple tutorial that walk me through taking app from development with a demo database to production. I tried the deploy to AWS fargate tutorial but I got errors when using the prisms fargate template. Anyone have any ideas?
    • 1
    • 1
  • g

    Giorgio Delgado

    02/15/2020, 9:16 PM
    Hey, noobie here. Based on the community guidelines, it seems like the slack is not the best place to ask questions ... but i feel like my question is really simple, so i am wondering if there's a channel i can still ask my question in??
  • g

    Giorgio Delgado

    02/15/2020, 9:21 PM
    Here's my question: https://gist.github.com/gDelgado14/cec16deeea43312300a27a3fd8694738
  • g

    Giorgio Delgado

    02/15/2020, 9:41 PM
    Also, where can i find docs on the sorts of exceptions that the prisma v1 client throws?
  • m

    mikkelsl

    02/16/2020, 10:11 AM
    Is there are a way to batch create with prisma2 client at this point?
  • m

    Matheus Assis Rios

    02/16/2020, 11:00 AM
    Hi guys! I want to know the nth position/ordinary number of a registry. Like, if this registry is the 20th, etc. For now, I'm doing this in the "post" resolver. Root being a post.
    Copy code
    export const currentPosition: = async (root, args, context) => {
      return context.prisma
        .user({ id: root.user.id })
        .posts({ where: { label: root.label }, orderBy: 'createdDate_DESC' })
        .post({ id: root.id }) // This doesn't work
        .getCurrentIndex() // This doesn't exist, it is just an example
    };
    I have to await for
    context.prisma.user({ id: root.user.id }).posts({ where: { label: root.label }, orderBy: 'createdDate_DESC' })
    ? I didn't want to load all posts in memory. Is there another way? Is it possible using only prisma queries so it does that in the database itself?
  • p

    Pratik

    02/16/2020, 8:48 PM
    Hi Guys, I'm stucked in the similar situation as - https://github.com/Evilweed/prisma-2204-error/pull/1 Can you please check the comment. Thanks
  • w

    windkomo

    02/17/2020, 9:52 AM
    @nikolasburk are you guys still answering to intercom? I need help upgrading a cluster if you have time. Thanks!
  • r

    Ruhan Khandakar

    02/17/2020, 12:57 PM
    why am I getting this error ? please someone help me.
    g
    • 2
    • 6
  • a

    Aske

    02/17/2020, 1:14 PM
    Can someone point me to any documentation how to get a contribution development setup of Prisma 1 running? Couldn’t find anything searching online or any appropriate channels for contributors here on Slack.
    d
    • 2
    • 4
  • l

    lionbrahh

    02/17/2020, 1:57 PM
    i run
    Copy code
    npx nexus-prisma-generate --output ./src/generated/nexus-prisma
    but not genered nexus.ts and schema.graphql, any wrong ? this is my server.ts
    Copy code
    import { GraphQLServer } from "graphql-yoga";
    import "./lib/env";
    import { prisma } from "./generated/prisma-client";
    import * as path from "path";
    import { makePrismaSchema } from "nexus-prisma";
    import { permissions } from "./permissions";
    import * as allTypes from "./resolvers";
    import datamodelInfo from "./generated/nexus-prisma";
    
    const schema = makePrismaSchema({
      types: allTypes,
      prisma: {
        datamodelInfo,
        client: prisma
      },
      outputs: {
        schema: path.join(__dirname, "./generates/schema.graphql"),
        typegen: path.join(__dirname, "./generated/nexus.ts")
      },
      nonNullDefaults: {
        input: false,
        output: false
      },
      typegenAutoConfig: {
        sources: [
          {
            source: path.join(__dirname, "./types.ts"),
            alias: "types"
          }
        ],
        contextType: "types.Context"
      }
    });
    
    const server = new GraphQLServer({
      schema,
      middlewares: [permissions],
      context: (request: any) => {
        return {
          ...request,
          prisma
        };
      }
    } as any);
    
    const options = {
      port: 8100
      // cors: {
      //   credentials: true,
      //   origin: "<http://localhost:3000/>"
      // }
      // playground: "off"
    };
    
    server.start(options, ({ port }) =>
      console.log(`server ready at <http://localhost>:${port}`)
    );
  • f

    flybayer

    02/17/2020, 3:35 PM
    Prisma 2 is a key part of this 😉 https://twitter.com/flybayer/status/1229425878481793024?s=21
    🚢 2
    🎉 4
    fast parrot 4
    react 3
    🦜 4
    👏 3
    graphql 2
    prisma cool 2
    prisma rainbow 8
    s
    • 2
    • 4
  • a

    Arkangel

    02/17/2020, 4:25 PM
    Hi has anyone ever used Prisma
  • a

    Arkangel

    02/17/2020, 4:25 PM
    with Prisma
  • a

    Arkangel

    02/17/2020, 4:25 PM
    ?
  • j

    Jonathan

    02/17/2020, 10:16 PM
    Hi folks, I have a very newbish question. I was wondering whether the generation of the Prisma Client for Prisma v1, is something you generally want to keep out of git, and more like the build process when you are deploying your application
    j
    • 2
    • 2
  • p

    Pavel Srom

    02/18/2020, 6:58 AM
    hello people, I'm building a simple API with Prisma and I have a feature where you can delete your posts. I want to check if the post is yours, because you should only be able to delete your own posts. However, I can't make it work with 'connect', so I have to use a little workaround where I fetch the author separately and then make the check. Is there any better solution for this?
    Untitled
    l
    • 2
    • 1
  • l

    lionbrahh

    02/18/2020, 8:43 AM
    hello there , i want to know what prisma respond if we have type like
  • l

    lionbrahh

    02/18/2020, 8:45 AM
    Copy code
    type User {
      id: ID @id
      company: [Company!]
    }
    
    type Company {
      id: ID @id
      company: name @unique
    }
    
    prisma.upateUser({
       data: {
         company: {
           connect: companyId
         }
       },
       where:{
         id: personId
       }
    })
    i have one company on that user, if i do update like that? would it add more company on that person? so the user now have 2 companies., or it would gonna replace of that company ? so the user only has one now? because another user already on that company also, thatis why i do connect insteade create, because name of company ise unique:)
  • r

    Ruhan Khandakar

    02/18/2020, 8:58 AM
    Prisma deploy error. Refer this post . https://www.prisma.io/forum/t/postgres-deploy-bug-on-existing-database/6802 @jasonkuhrt @nikolasburk please help me. I am struggling from last couple of days. 😣
    f
    • 2
    • 5
  • j

    Jahmiamor

    02/18/2020, 1:08 PM
    Hey y’all, working on a project & was handing a json file of data i need to use to create the graphql data models from. Is there a tool or package for that? Thanks!
  • p

    poohbar

    02/18/2020, 2:04 PM
    @tim2 @huv1k Hi Prisma Labs, is anyone going to take care of the 47 open PRs in this project? https://github.com/prisma-labs/graphql-playground/pulls If not, can you please do one of: 1. Choose new maintainers from the community. 2. Give the project to GraphQL foundation. 3. Make a statement that the project is no longer supported. 4. Make any statement whatsoever. https://github.com/prisma-labs/graphql-playground/issues/1100
    t
    • 2
    • 2
  • o

    Olle Holmberg

    02/18/2020, 5:00 PM
    Hello. Anybody in here know where I can find a guide on how to set up my old legacy graphcool framework locally instead of on the graphcool cloud?
1...346347348...637Latest