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

    romain.charretteur

    03/27/2020, 8:42 AM
    Hello all, I have a problem when switching to relation TABLE to relation INLINE. I have a cluster running on prisma 1.34.10 with Table relation with data in database. I would like to switch some relation from TABLE to INLINE. Everything looks good, I can manage the upgrade well. Unfortunatly, when I try to query prisma: query { test { id } }. Prisma still continue to query the old useless table. Do you know why an existing prisma (with TABLE relation) switched to INLINE relation can still query the old useless inlined table ?
    o
    • 2
    • 2
  • l

    Lars Ivar Igesund

    03/27/2020, 9:23 AM
    Do anyone know (with Prisma 1), with a generated client, the endpoint can be configured in a slightly more dynamic manner?
  • l

    Lars Ivar Igesund

    03/27/2020, 9:58 AM
    I can create my own prisma client easily enough, but this will not be used in the generated nexus-prisma code. This makes it incredibly clumsy to create multiple environments for dev and production purposes.
    • 1
    • 1
  • j

    joar

    03/27/2020, 11:35 AM
    Lots of issues with graphcool again
  • s

    Soumak Dev

    03/27/2020, 11:51 AM
    Hey, I'm trying to connect MongoDB with my Apollo GraphQL server using prisma...can anyone help me with the prisma.yml database connection config...
    r
    • 2
    • 2
  • p

    Prashant

    03/28/2020, 10:29 AM
    Hello, I am learnig prisma for the first time from the docs. when I run docker-compose up -d command i get the following error: image operating system "linux" cannot be used on this platform Can someone help me? I am using Windows 10
    • 1
    • 1
  • m

    Mike SOK

    03/28/2020, 11:01 PM
    Hi Guys, I am new to this. I was wondering if you guys could give me a hand here I wanted to use this 1 to many relation in prisma graphql. I struggling to get my mutation to work so it picks the current ID that exists in the page. Rather than hardcoding the existing ID like I have in the below code. I am using prisma Apollo and graphql.
    Copy code
    const CREATE_RATING_MUTATION = gql`
        mutation CREATE_RATING_MUTATION (
            $ratingSubject: String! 
            $ratingImage: String!
            $ratingDescription: String!
            $ratingStar: Int!
        ){
          createRating(
            data: { 
                ratingSubject: $ratingSubject
                ratingImage: $ratingImage
                ratingDescription: $ratingDescription
                ratingStar: $ratingStar
                item: { connect: { id: "ck7guni5wavx90986moqstcm3" }}                
              }) {
            id
            ratingSubject
            ratingImage
            ratingDescription
            ratingStar
              item {
                id
              }
          }
        }
    `;
    Any advice would be greatly appreciated. 🙂
    a
    • 2
    • 1
  • e

    Ezequiel Pereira

    03/29/2020, 12:17 AM
    Hi people, Is there any documentation on guides to create a connector for Prisma2, I’m willing to create a [Cassandra Connector](https://github.com/prisma/prisma/issues/1750)
  • f

    Felinto

    03/29/2020, 10:00 AM
    Hello! I'm a beginner in javascript.
  • f

    Felinto

    03/29/2020, 10:00 AM
    How I start to use GraphQL yoga ?
  • f

    Felinto

    03/29/2020, 10:01 AM
    I download the official repository in GitHub, look: https://github.com/prisma-labs/graphql-yoga/tree/88b08ddde53641c6856ed240ea42da01fb7eea20
  • f

    Felinto

    03/29/2020, 10:01 AM
    However, I can't just "yarn start"
  • f

    Felinto

    03/29/2020, 10:01 AM
    $ yarn start yarn run v1.22.0 error Command "start" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    o
    • 2
    • 3
  • f

    Felinto

    03/29/2020, 10:02 AM
    I get an error
  • f

    Felinto

    03/29/2020, 10:02 AM
    How I can to start with a boilerplate template using GraphQL-yoga ?
    r
    • 2
    • 1
  • d

    Davide Berdin

    03/30/2020, 1:30 PM
    Hello all 🙂
  • d

    Davide Berdin

    03/30/2020, 1:36 PM
    I do have a little issue 😕 I have the following schema
    Copy code
    type Alert {
      id: Int! @id
      name: String!
      description: String!
      imageUrl: String
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    
    type AlertSet {
      id: Int! @id
      organization: Organization!
      alert: Alert!
      parameters: String!
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    and I'd like to retrieve the
    Alert
    when I am retrieving the
    AlertSet
    . Basically I want to fetch the relationships. My
    go
    code looks like the following
    Copy code
    func GetAlertSet(pc *prisma.Client, alertSetID string) (*prisma.AlertSet, error) {
    	ctx := context.Background()
    
    	as, err := pc.AlertSet(prisma.AlertSetWhereUniqueInput{
    		ID: utils.ConvertStringToInt32(alertSetID),
    	}).Exec(ctx)
    
    	if err != nil {
    		return nil, nil, err
    	}
    	return as, nil
    }
    
    func GetAllAlertSets(pc *prisma.Client, orgID int32) ([]prisma.AlertSet, error) {
    	ctx := context.Background()
    
    	as, err := pc.AlertSets(&prisma.AlertSetsParams{
    		Where: &prisma.AlertSetWhereInput{
    			Organization: &prisma.OrganizationWhereInput{
    				ID: prisma.Int32(orgID),
    			},
    		},
    	}).Exec(ctx)
    
    	if err != nil {
    		return nil, err
    	}
    	return as, nil
    }
    However, the result never contains the relationships inside. I checked this link (https://www.prisma.io/docs/get-started/03-build-graphql-servers-with-prisma-GO-g201/) but the generator throws so many errors. Can somebody point me out maybe how to write a
    QueryResolver
    or something similar? Thank you in advance 🙂
  • r

    Rain

    03/30/2020, 2:41 PM
    Hi, I have the following relation, but it ask me to give a name to the relation
    Copy code
    type User {
      id: ID! @id
      email: String! @unique
      username: String! @unique
      password: String!
      chatrooms: [Chatroom!]!
      followedRooms: [Chatroom!]! @relation(name: "RoomMember")
    }
    
    type Chatroom {
      id: ID! @id
      name: String!
      description: String
      isPrivate: Boolean! @default(value: false)
      owner: User! @relation(link: INLINE)
      members: [User!]! @relation(link: TABLE, name: "RoomMember")
    }
    
    type RoomMember @relationTable {
      user: User!
      room: Chatroom!
    }
    It give the following error
    Copy code
    Errors:
    
      User
        ✖ The relation field `chatrooms` must specify a `@relation` directive: `@relation(name: "MyRelation")`
    
      Chatroom
        ✖ The relation field `owner` must specify a `@relation` directive: `@relation(name: "MyRelation")`
    e
    • 2
    • 2
  • r

    Rain

    03/30/2020, 3:06 PM
    ok, just googled that I need to
    prisma delete
    first hmmm
  • d

    Daniel Esteves

    03/30/2020, 4:49 PM
    👋 I’m here! What’d I miss?
  • p

    Paul

    03/30/2020, 8:53 PM
    Hi, is prisma-binding module in active development or is there something new in the ecosystem that replace it?
  • s

    Scott

    03/31/2020, 1:49 AM
    Anyone use redwood.js yet?
  • a

    Ashiqur Rahman

    03/31/2020, 6:49 AM
    after running docker compose I am getting this error! can anyone please help, how to get rid of this?
  • a

    ArcticSpaceFox

    03/31/2020, 9:24 AM
    Hey guys just looked at the new Website, it is amazing!!! Thank you for this great piece of Software 😄
    prisma rainbow 10
    n
    • 2
    • 2
  • s

    Samson Amaugo

    03/31/2020, 1:00 PM
    Hello please I would like to know if the pubsub integration for postgresql is compatible with mysql
  • s

    Samson Amaugo

    03/31/2020, 1:01 PM
    Or is there support for MySQL using pubsub
  • s

    Samson Amaugo

    03/31/2020, 1:30 PM
    Ok sorry for the question I went through the docs and discovered that it was easy to implement
  • j

    johhansantana

    03/31/2020, 4:38 PM
    hello, prisma 1 docs site seems broken
    j
    r
    • 3
    • 10
  • j

    johhansantana

    03/31/2020, 4:39 PM
    is there any guide to migrate from prisma 1 to 2? Also, does prisma2 support subscriptions already?
    d
    j
    r
    • 4
    • 11
  • a

    adrianmg

    03/31/2020, 5:25 PM
    Congrats on the beta launch!
    fast parrot 6
    y
    • 2
    • 1
1...358359360...637Latest