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

    H

    03/28/2019, 7:08 PM
    Hi, does anyone know why the @relations are not working when i use prisma binding in queries, but in prisma server are ok?
    h
    • 2
    • 2
  • h

    H

    03/28/2019, 7:11 PM
    Query users{ User(where : email@email.com){ name posts { id } } } Prisma result The name And the ids of post Prisma binding result The name “posts”:null
  • s

    steveb

    03/28/2019, 7:19 PM
    Does anyone know of a way to add middleware to just the
    /playground
    route for graphql-yoga? i want to password protect the playground with basic auth.
    a
    h
    • 3
    • 3
  • y

    YErii

    03/29/2019, 2:56 AM
    type such as 'book: [Author!]!' can't generate the required field and it will be 'book: [Author!]' in graphql schema, anyone knows how to fix it?
    • 1
    • 1
  • f

    Fran Dios

    03/29/2019, 4:00 AM
    Hi everyone! Now that it’s been released for a while, what are your opinions on
    graphql-nexus
    and its “code-first” philosophy? Have you tried
    graphql-modules
    (“SDL-first”) as well?
    f
    • 2
    • 2
  • m

    Mahalakshmi Ramanathan

    03/29/2019, 5:01 AM
    Hi everyone. Can we create graphql server using flask and prisma?
  • r

    rdc

    03/29/2019, 6:59 AM
    👋 hi peeps,i'm new at Prisma!! what is the best approach to deploy on AWS? Fargate, EC2 w/ docker or something else? Cheers 🤔
    h
    j
    • 3
    • 6
  • b

    bkstorm

    03/29/2019, 9:09 AM
    Copy code
    const iterator = await prisma.$subscribe
        .reviewContent({
          mutation_in: ['UPDATED'],
          updatedFields_contains_some: ['status', 'isPaid'],
        })
        .node()
      iterator.next().then(e => console.log(e))
    Hi, I have a problem when using prisma client subscription. My code only works when I update for the first time, I want
    console.log
    is executed whenever I update
    ReviewContent
    types.
    j
    • 2
    • 3
  • y

    Yehor Chernenko

    03/29/2019, 9:43 AM
    Hi, every one Is some body now how to retrieve schema from https://github.com/coralproject/talk Using get-graphql-schema [OPTIONS] ENDPOINT_URL > schema.graphql I can't get it because Talk doesn't provide direct access to schema
    h
    • 2
    • 4
  • e

    Elliott

    03/29/2019, 10:42 AM
    Hi guys. I'm stuck with trying to do some simple linking between two tables. A link can have many comments, so I've defined the schema like this by using linkId so that when i comment is created it will save the linkId to the table. It correctly saves the linkId to the comments table, but then when the user queries for links, it will will not return the comments for those links. Attached example of the error. Question is how do I correctly link these two tables?
    Copy code
    type Query {
      links: [Link!]
    }
    
    type Mutation {
      post(url: String!, description: String!): Link!
      deleteLink(id: ID): Link
      updateLink(id: ID, url: String!, description: String!): Link
      createComment(description: String!, author: String!, linkId: ID): Comment!
    }
    
    type Link {
      id: ID!
      description: String!
      url: String!
      comments: [Comment!]!
    }
    
    type Comment {
      id: ID!
      description: String!
      author: String!
      linkId: Link
    }
    h
    • 2
    • 3
  • e

    Elliott

    03/29/2019, 10:42 AM
  • n

    nuno

    03/29/2019, 11:21 AM
    Is Prisma Admin open source? I can't find it in the main prisma repo.
    k
    x
    s
    • 4
    • 6
  • i

    impowski

    03/29/2019, 5:38 PM
    Hey guys
  • t

    Thom Meredith

    03/29/2019, 5:41 PM
    Hello
  • i

    impowski

    03/29/2019, 5:46 PM
    I have a problem with one thing I’ll try to describe it how I see it. So, I have
    Message
    which will be send to a user, in that message I can ask a user to send me a different types of data, for example like
    age
    ,
    weight
    ,
    date
    , etc. So how do I approach this, should I create a different type like
    MessageResponseType
    which will have a unique name of type and a
    MessageResponse
    which will contain a
    String
    which is basically could be any data and I’ll have a field which will be a predefined
    MessageResponseType
    , then on a client I’ll make a response to that message and send a data in that
    String
    , check the
    MessageResponseType
    on the server and make a processing function which will parse a needed type and save it to a different model.
    • 1
    • 2
  • j

    José Gomes

    03/30/2019, 1:36 AM
    Hello! I'm with a trouble here. Can someone help me? 🙂 { projects(where: { OR: { managedBy_some: { user: { id: "cjtur8l7h07io07030szzprs2" } } owner: { id: "cjtur8l7h07io07030szzprs2" }, } }) { id name } } This query should find projects where i'm the owner or i'm managing it. But it is only getting the ones that i'm managing. What's wrong? 😕
    • 1
    • 2
  • e

    Ecker

    03/30/2019, 6:47 AM
    Does Prisma have any way to secure that a relationship is
    unique
    ? Avoiding duplicate entries in the relation array. For example enforce that members can only be hooked up to the same team one time, not multiple times? – Or does it already work like that? 🤔
    h
    • 2
    • 2
  • i

    Industrial

    03/30/2019, 1:19 PM
    Hi.
  • i

    Industrial

    03/30/2019, 1:19 PM
    Hi. I have two services: Prisma and GraphQL Yoga. Prisma is private and not exposed to the Proxy, the Yoga service is. It's the Public API of the Prisma Service, which sits in front of PostgreSQL. https://github.com/Industrial/test-next.js/tree/develop/services/prisma https://github.com/Industrial/test-next.js/tree/develop/services/api (Yoga) Now inside the API service I have two methods,
    createChart
    (https://github.com/Industrial/test-next.js/blob/develop/services/api/src/server/resolvers/Mutation/createChart.js) and
    deleteChart
    (https://github.com/Industrial/test-next.js/blob/develop/services/api/src/server/resolvers/Mutation/deleteChart.js). When I call
    createChart
    from my app, this is the output: https://gist.github.com/Industrial/8b839cbba7a872f1e9dbd0a95a013a3b For
    deleteChart
    the output is:
    Copy code
    [33mapi_1              |[0m deleteChart options { data: { where: { id: 'cjtslwjqb000m0b78y3b48mfh' } } }
    [33mapi_1              |[0m deleteChart result undefined
    Seems there isn't even a request going out to the Prisma server from the Yoga server. Why? The implementation is identical to createChart.
  • m

    Myer Nore

    03/30/2019, 4:55 PM
    I can't seem to update typed array fields in Prisma Console (https://app.prisma.io) - is this a bug? I see the three dots button next to the field, I click "add item" and try to add an item to the array followed by "update database", but nothing changes the saved item. Refreshing the page doesn't help. UPDATE - I have no idea if this is a bug or not, but I got around it by going to the Prisma Playground for my db and writing a mutation to update the array field.
  • i

    impowski

    03/30/2019, 5:41 PM
    Using latest
    prisma/1.30.0-beta.6
    release I guess something is wrong here
    h
    • 2
    • 16
  • o

    Olivier M

    03/30/2019, 10:12 PM
    Does anyone know good examples of Prisma with graphql-shield, using AWS Cognito user pools?
  • j

    Joseph

    03/31/2019, 1:05 AM
    Any idea how to set a cookie from a prisma mutation? I'm passing the request through context with GraphQLServer, but can't send the response with the cookie from the mutation
  • h

    H

    03/31/2019, 5:27 AM
    anyone knows about why @relations are not working with prisma binding
    e
    • 2
    • 4
  • h

    H

    03/31/2019, 5:27 AM
    ?
  • h

    H

    03/31/2019, 5:28 AM
    i connect the post to the user, but the post doesnt appear when i query the user from my graphql yoga server
  • h

    H

    03/31/2019, 5:28 AM
    im sending the context but just doesn`t work
  • j

    James

    03/31/2019, 9:06 AM
    At what url does my prisma client based server serve the schema by default?
  • j

    James

    03/31/2019, 10:09 AM
    I'm trying to setup the graphql-config in my editor and I need the schema. Instead of copying the file into the project I'd like to just point to it via the url
    h
    • 2
    • 1
  • i

    impowski

    03/31/2019, 4:47 PM
    Is there any example on how to use the generated resolvers with
    graphqlgen
    and to return the right type inside
    __resolveType
    ?
1...244245246...637Latest