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

    CCBCodeMonkey

    11/13/2018, 7:30 AM
    I don't get the invalidArgs
  • c

    CCBCodeMonkey

    11/13/2018, 7:30 AM
    so I can match it up on the UI
  • n

    Nick

    11/13/2018, 10:24 AM
    I'm getting some weird issue that I haven't had before so I'm using the graphql boilerplate that and the genrated file prisma.graphql Does not update
    n
    d
    • 3
    • 16
  • y

    yantakus

    11/13/2018, 11:31 AM
    Hi here. I want to implement voting functionality in my app. A video can only have one vote per user. Is there a way to set this limitation in prisma datamodel? I mean so that a user can not vote a video multiple times. Or the only way to do this is to check if a video already has a vote by this user in
    votePost
    resolver? My current datamodel is the following:
    Copy code
    type Video {
      ...
      votes: [Vote!]! @relation(name: "VideoVotes")
      voteScore: Int! @default(value: 0)
    }
    
    type Vote {
      id: ID! @unique
      parent: Video! @relation(name: "VideoVotes")
      user: User! @relation(name: "UserVotes")
      type: VoteType!
    }
    
    type User {
      ...
      votes: [Vote!]! @relation(name: "UserVotes")
    }
    
    enum VoteType {
      UP
      DOWN
    }
    n
    • 2
    • 7
  • f

    fgreinus

    11/13/2018, 11:43 AM
    you could put a combined unique key on parent and user in the vote type (dont know if prisma supports this) - that would be the way i implement this in my database manually
    a
    • 2
    • 3
  • f

    fgreinus

    11/13/2018, 11:43 AM
    but you would still have to check if it exists i guess.. it would just deny you from writing a second entry
  • s

    siyfion

    11/13/2018, 2:16 PM
    I’m having some issues when running
    prisma generate
    and it not doing _anything_… no generated files, no errors, nothing.
    n
    • 2
    • 12
  • y

    yolen

    11/13/2018, 2:26 PM
    I need to configure readiness and liveness probes for my kubernetes cluster. Mainly because the yoga server only handles post request and hence the std way using get requests is not working, Therefore i was wondering if any of you have tried to use lightship (https://github.com/gajus/lightship#using-with-expressjs) with graphql-yoga? Looks very simple with express server but I do not know how to do it with yoga? I see that I can "eject" (https://github.com/prisma/graphql-yoga#how-to-eject-from-the-standard-express-setup) the express setup but I do not understand what that means to be honest 🙂
    h
    • 2
    • 16
  • p

    prolink007

    11/13/2018, 3:25 PM
    updatedAt
    field is not working. I am seeing the same issue as reported in this bug in a later version. Is this bug still an issue? https://github.com/prisma/prisma/issues/2539
    ⁉️ 1
  • a

    Alex

    11/13/2018, 4:54 PM
    is it possible to generate multiple schemas with prisma? We have several internal departments and I’d like to be able to manage all the schemas in one place but separated for each department
  • c

    CCBCodeMonkey

    11/13/2018, 5:01 PM
    does anyone use apollo errors with prisma/graphql yoga
  • n

    Naka

    11/13/2018, 5:08 PM
    Does anyone tried to migrate data from graphcool to prisma? I am having some trouble to export graphcool data.
    • 1
    • 1
  • w

    wontwon

    11/13/2018, 5:49 PM
    Prisma auto generates types for queries and mutations. Are we able to import those mutations into yoga?
    t
    • 2
    • 3
  • d

    Drew Delianides

    11/13/2018, 6:11 PM
    anyone else see this typescript error?:
    Copy code
    [at-loader] ./src/utils.ts:81:19
        TS2345: Argument of type '"{ role }"' is not assignable to parameter of type '{ [key: string]: any; } | undefined'.
    It seems the typescript doesn't like when I pass a string into a query/mutation instead of the
    info
    object.
  • m

    mario

    11/13/2018, 6:57 PM
    Just noticed that Prisma claims to support Mongodb but the cli tools doesn’t allows me to setup a new project with Mongo. Any recommended guide?
  • n

    Naka

    11/13/2018, 6:58 PM
    Anyone using prisma server on heroku? I just deployed prisma-server and I am receiving the following error:
    Copy code
    Error R14 (Memory quota exceeded) 
    Process running mem=568M(111.1%)
  • m

    mario

    11/13/2018, 6:58 PM
    @Naka Upgrade your dyno, it just ran out of memory.
  • n

    Naka

    11/13/2018, 7:00 PM
    I think it should not be necessary, I mean... I just deployed the prisma server and tried to access from console. Upgrading to Hobby does not increase memory, it should be necessary to update to the next plan... standard that costs 25$+
  • m

    mario

    11/13/2018, 7:01 PM
    Digital Ocean is cheaper
  • n

    Naka

    11/13/2018, 7:02 PM
    I know that upgrading should probably solve the issue... but the prisma server really consumes that much of memory just on deploy and console access?
    • 1
    • 1
  • c

    CCBCodeMonkey

    11/13/2018, 7:14 PM
    does anyone know how to send validation errors back with throw? so the client can parse them?
  • c

    CCBCodeMonkey

    11/13/2018, 7:15 PM
    like
    Copy code
    too many characters in field x
    field: x
  • r

    roberto.guerra

    11/13/2018, 7:47 PM
    Is there a tool like this https://github.com/EasyGraphQL/easygraphql-tester but for Prisma?
  • r

    roberto.guerra

    11/13/2018, 7:47 PM
    This has an issue where it can’t read the generated schema file because it is too big. And it doesn’t support
    IDL style imports
    . But the concept/idea is sane…. so was wondering if anyone used something like this for Prisma.
  • j

    jdoyle112

    11/13/2018, 8:11 PM
    Hi does anyone know if it’s possible to have a relationship where there isn’t a “backrelation”
  • j

    jdoyle112

    11/13/2018, 8:12 PM
    In other words, if I have user and post types and want a relation field, can I have an “author” field on the post type without having the corresponding “posts” in the user type?
    n
    • 2
    • 2
  • n

    Naka

    11/13/2018, 8:19 PM
    One more question... Anyone having problems with queries on prisma console? It seems that the console search add the
    id_contains
    in your where variables and it is breaking the query.
  • n

    Nena

    11/13/2018, 8:35 PM
    Hi I am using Prisma server and want to create custom subscriptions. My data model is defined in
    schema.graphql
    and it has all Types in there, and I know that Prisma automatically creates queries, mutations and subscriptions for me, but I want to define my own subscription. Tried doing is inside of
    schema.graphql
    like
    type Subscription...
    but when I run it in here https://us1.prisma.sh/nevena-djaja/explorer-graphql/dev I get
    "The provided query doesn't include any known model name. Please check for the latest subscriptions API."
    Any ideas how to solve this?
    d
    • 2
    • 1
  • t

    Tamir

    11/13/2018, 8:36 PM
    Hey guys my makePrismaClientClass in the auto generated code from Prisma expects a models argument: Property 'models' is missing in type '{ typeDefs: string; endpoint: string; }'. Following the guide to the letter
    d
    • 2
    • 1
  • r

    Ramin B

    11/13/2018, 9:01 PM
    hello, I am trying to figure out the right way to express some relationships in my schema as well as the resolvers that map to it. Could use some help and guidance! Relevant schema:
    Copy code
    type MemberForm {
      id: ID! @unique
      name: String! @unique
      description: String
      formEntries: [MemberFormEntry!]!
    }
    
    type MemberFormEntry {
      id: ID! @unique
      form: [MemberForm!]!
      formItem: MemberFormItem!
      required: Boolean @default(value: "false")
      weight: Int
      label: String
      placeholder: String
      hint: String
    }
    
    type MemberFormItem {
      id: ID! @unique
      name: String! @unique
      kind: FormItemKind @default(value: "TEXT")
      formEntry: MemberFormEntry
    }
    relevant api schema:
    Copy code
    # import {} from './generated/prisma.graphql'
    type Query {
      memberForms: [MemberForm!]!
    }
    relevant resolver:
    Copy code
    memberForms: (parent, args, ctx, info) => ctx.db.query.memberForms(info)
    However, when I run the following query, I don’t get any
    formEntries
    back:
    Copy code
    memberForms {
      id
      formEntries {
        id
      }
    }
    n
    • 2
    • 6
1...155156157...637Latest