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

    siyfion

    05/29/2018, 9:49 AM
    It’s really annoying to have to maintain two separate files 😕
  • p

    picosam

    05/29/2018, 9:59 AM
    Hello! Using
    json-to-graphql-query
    I can, for example, send a whole filter object as a variable to my GraphQL API. My question is: is it possible to send a JSON object as a filter withotu using such a library, if one of the filter object variables has an
    enum
    type?
    n
    • 2
    • 3
  • c

    codebeast

    05/29/2018, 10:28 AM
    Hi. I am trying to run
    prisma deploy
    on this project but even with the hook, it doesn’t download the prisma schema: https://github.com/christiannwamba/hackernews-node/tree/generated
    k
    n
    • 3
    • 12
  • h

    halborg

    05/29/2018, 11:39 AM
    So I have a project set up from following tutorials. Now I’ve added a new workspace on my Prisma console with the team name, and would like to start a new service with dev+prod stages for that team and provide the generated url to my .env file. How do I do that? Every time I run
    prisma init
    , it creates a service on my “default” team instead
    m
    • 2
    • 1
  • m

    Mathieu Devos

    05/29/2018, 12:41 PM
    Hey, going through a few older tutorials of graphcool (slowly getting into graphQL, still gotta convince the company to swap over :D), and one of them was by Soren in an AWS Serverless web day, any chance the code for this talk is available somewhere (I went through sorenBS his github page but couldn’t find it). This is the talk I’m referring to:

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

  • m

    Mathieu Devos

    05/29/2018, 12:43 PM
    Reason for getting into this: I’m kinda having trouble finding a simple “hello world” kind of demo regarding serverless + lambda + graphql + DB kind of demo. One that doesn’t use 500000 NPM packages, but keeps it lowkey.
  • s

    siyfion

    05/29/2018, 12:52 PM
    So if I’m using
    forward-to('db')
    in a query resolver in my API, how do I get all the
    where
    syntax that Prisma offers, on my API?
    h
    • 2
    • 2
  • s

    siyfion

    05/29/2018, 12:53 PM
    If I try doing a
    where
    , it doesn’t know what it is… And looking at the Schema for the type, it only knows the fields, not the Input Types.
  • s

    siyfion

    05/29/2018, 2:21 PM
    Umm, how do I go about seeding my DB? I thought that having a
    seed.graphql
    file with multiple mutations listed, would do it.. but I get an error:
    ERROR: Must provide operation name if query contains multiple operations
    n
    • 2
    • 18
  • m

    marco

    05/29/2018, 2:35 PM
    Hi all. I got a question. I have the following three types
    Copy code
    type User @model {
    	id: ID! @isUnique
        name: String
    	conversations: [Conversations!]! @relation(name: "UserConversations")
    	auth0UserId: String @isUnique
    	nachrichten: [Message!]! @relation(name: "MessagesSendByUser")
    }
    
    type Conversations @model {
    	id: ID! @isUnique
    	user: [User!]! @relation(name: "UserConversations")
    	messages: [Message!]! @relation(name: "MessagesInConversation")
    	createdAt: DateTime!
    	updatedAt: DateTime!
    }
    
    type Message @model {
    	id: ID! @isUnique
    	createdAt: DateTime!
    	updatedAt: DateTime!
    	message: String!
    	conversation: Conversations @relation(name: "MessagesInConversation")
    	read: Boolean
    	from: User @relation(name: "MessagesSendByUser")
    }
    And I want that only the authenticated User can get the Conversations (which contain messages) he is involved in. How do I extend my shema? I find the graphcool doc rather not so helpful. I tried something along the lines like this.
    Copy code
    query getConversations($user_id: ID!, $conversationsUser_id: ID!) {
    	getSomeConversations(filter: { AND: [{ id: $user_id }, { id: $conversationsUser_id }] })
    }
    
    extend type Query {
        getSomeConversations(
    
        )
    }
    But I still don't really get how to, maybe you guys can help me? Thank you
    s
    • 2
    • 9
  • s

    stearm

    05/29/2018, 3:08 PM
    hi guys, anyone knows why
    updatedFields_contains_every
    and
    updateFields_contains_some
    dont work? (im talking about subscriptions)
    n
    • 2
    • 1
  • t

    timm

    05/29/2018, 5:07 PM
    anyone run into this type of error before?
    Error: Directive model: Couldn't find type model in any of the schemas.
    I'm implementing directive permission structure along these lines: https://medium.com/@lastmjs/advanced-graphql-directive-permissions-with-prisma-fdee6f846044
    n
    • 2
    • 1
  • h

    hez

    05/29/2018, 5:41 PM
    Is there a way to dry up the datamodel.graphql and typeDefs.graphql files... such that the latter imports everything from the former unless overridden?
    👍 2
    v
    n
    • 3
    • 4
  • d

    Dan

    05/29/2018, 7:35 PM
    How can I generate a prisma token that doesn't expire?
    • 1
    • 1
  • v

    v

    05/29/2018, 8:40 PM
    How do I setup a Prisma project in a way I don't leak credentials, so I can upload it to GitHub?
    h
    • 2
    • 4
  • p

    pnicolaou

    05/29/2018, 8:42 PM
    Hey I am trying to do prisma deploy
  • p

    pnicolaou

    05/29/2018, 8:42 PM
    but i get this error
  • p

    pnicolaou

    05/29/2018, 8:42 PM
    Duplicate entry 'flavorli@dev' for key 'PRIMARY'","query":
  • p

    pnicolaou

    05/29/2018, 8:42 PM
    anyone know how to fix it?
    n
    • 2
    • 4
  • e

    Ermolay

    05/29/2018, 10:33 PM
    If I have two services implementing the Node field and I want to stitch them together using Apollo — how would I do that?
  • v

    v

    05/29/2018, 10:38 PM
    How can I set my own errors for Prisma errors? for example, when I get a unique conflict error, I can throw my own
    apollo-errors
    error. Something like:
    Copy code
    {
      "data": {
        "signup": null
      },
      "errors": [
        {
          "message": "Someone already has taken that username.",
          "name": "TakenUsernameError",
          "time_thrown": "2018-05-29T22:38:00.358Z",
          "data": {}
        }
      ]
    }
    n
    • 2
    • 1
  • d

    Devin

    05/29/2018, 11:19 PM
    quickstart appears twice in the docs
  • v

    virtualirfan

    05/30/2018, 12:08 AM
    @lastmjs Just read your awesome blog post: https://medium.com/@lastmjs/advanced-graphql-directive-permissions-with-prisma-fdee6f846044 from Mar 12. FWIW: have you had more refinements of those ideas since Mar?
  • l

    lancej

    05/30/2018, 12:17 AM
    What solution have people got (if any) to force prisma to auto gen the files prisma.graphql and prisma.ts. doing a
    prisma deploy
    does not work (https://github.com/prismagraphql/prisma/issues/2528) The suggestion in the github issue does not work for me.. or at least not in an obvious way.
    n
    • 2
    • 5
  • d

    Devin

    05/30/2018, 12:51 AM
    What do you do when
    prisma deploy
    shows that it's updating your generated file but doesn't actually update anything. Then you delete the generated file and it doesn't regenerate it at all but the cli is saying it does. On version 1.7.4
    l
    • 2
    • 5
  • j

    Jscott388

    05/30/2018, 1:23 AM
    Any update on mongodb?
    👀 1
    p
    • 2
    • 2
  • d

    Duy Doan

    05/30/2018, 2:03 AM
    Hello
  • d

    Duy Doan

    05/30/2018, 2:04 AM
  • d

    Duy Doan

    05/30/2018, 2:05 AM
    I got this bug on GrapCool, so I can not show all records. How to fix them?
    n
    • 2
    • 1
  • d

    Duy Doan

    05/30/2018, 2:05 AM
    Many thanks
1...434445...637Latest