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

    Zarazas

    02/23/2019, 9:12 PM
    at best with typescript 😄
  • z

    Zarazas

    02/23/2019, 9:13 PM
    or would someone be so kind as to upload/send the link from their project?
  • j

    jasonmj

    02/24/2019, 12:07 AM
    I'm playing with nexus-prisma and I think I borked my postgres db:
    Copy code
    org.postgresql.util.PSQLException: ERROR: schema "prisma" does not exist
    I'm getting this error even after removing and rebuilding the prisma and postgres docker containers. Not sure what to do next. I'm working off the prisma-examples > typescript > graphql-auth example.
    • 1
    • 1
  • r

    rooneyK

    02/24/2019, 9:09 AM
    Hi. I've been attempting to reduce the amount of data that is possible to retrieve in a single query from our graphql-endpoint. One of the things I am doing here is setting the default
    first
    value to 100 for all array-type queries. I've successfully added this to the schema, and I can see that
    first
    is defaulted to 100 in all queries. However, it doesn't apply correctly to nested queries. Is this a bug, or am I doing something wrong here?
    Copy code
    type Query  {
      cats(first: Int = 2, last: Int): [Cat]!
    }
    
    type Cat implements,Node {
      name: String!
      slaves(first: Int = 2, last: Int): [Person!]
    }
    Copy code
    query {
        cats{name slaves{name}}
    }
    # results has the first 2 cats and all their slaves, while they should only have the first 2 slaves, a total of 4 here.
    h
    • 2
    • 6
  • g

    go4cas

    02/24/2019, 9:19 AM
    Hey guys ... has anyone used the Prisma ecosystem to build a microservices stack? I.e. having separate services, each with its own DB, and exposing via a GraphQL API gateway (with auth, permissions, etc)?
    r
    • 2
    • 2
  • j

    joan

    02/24/2019, 10:12 AM
    how can I remove a record in the DB using the schema editor?
    h
    • 2
    • 2
  • j

    Jenkins

    02/25/2019, 7:13 AM
    You need a
    set
    . Make it look like:
    Copy code
    mutation {
      createPlace(data: {
        title: "Haha"
        description: "Hoho"
        location: {
          create: {
            type: "Point"
            coordinates: {
              set: [4.2, 1.5]
            }
          }
        }
      }) {
        id
      }
    }
    You can always inspect what the prisma resolvers expect by looking at the docs in the playground, btw.
  • r

    rein

    02/24/2019, 12:04 PM
    hey guys, just saw that 1.27 was released, but I guess that is not the update with the new datamodel?
    h
    • 2
    • 1
  • s

    stereu

    02/24/2019, 7:39 PM
    would like to contribute to Prisma Admin...who can i contact for invitation?
  • j

    Joellao

    02/24/2019, 10:19 PM
    Hello there, a quick question. How do you guys manage to sign up a user with email or username? So the user inputs or the username or an email and a password with that just let him signup. I thought using like a mutation
    signup(emailOrUsername: CustomType!, password: String!)
    and
    customType{data: String!}
    and then check in the backend if I should insert as email or username, but do you guys use another method, seems like hacky to me
    b
    • 2
    • 2
  • c

    ChiwanAhn

    02/25/2019, 6:49 AM
    Hi all, Quick question. I am using
    apollo-client
    prisma
    react-native
    I want to import graphql query from generated js file with prisma. How can I import queries and mutations directly from generated files?
    j
    • 2
    • 3
  • l

    lawjolla

    02/25/2019, 7:03 AM
    Can anyone point me to a tutorial for adding https to CloudFormation / ECS. It's missing from the Prisma Fargate CloudFormation file.
  • m

    Martí Crespí

    02/25/2019, 9:14 AM
    With last update of prisma, we are losing nested arrays, it's creating only one object in a relation 1>N with
    prisma introspect
    . Someone has experienced the same?
    h
    • 2
    • 8
  • a

    Andrei Bacescu

    02/25/2019, 10:38 AM
    Hello guys! I want to know if Prisma provides a way to customize errors by default. From what I read on the internet
    apollo-errors
    library is a good way to handle errors in a GraphQL API. What do you recommend for formatting error on the server side? Thanks in advance.
    👍 1
  • s

    Stefan

    02/25/2019, 11:13 AM
    Hi there, I very much like the prisma docs pages, e.g. https://www.prisma.io/docs/1.26/get-started/01-setting-up-prisma-demo-server-TYPESCRIPT-t001/. Are they built using a specific tool/lib, e.g. gitbook?
    j
    • 2
    • 2
  • l

    lewisedc

    02/25/2019, 11:44 AM
    What does this piece of code do?
    Copy code
    @relation(name: "OldRelation")
    j
    • 2
    • 3
  • l

    Lotafak

    02/25/2019, 12:22 PM
    Hey! I jumped a few versions up in prisma (from 1.7 to 1.27) and I’m looking for help. I have problem with quering data with relations. I’m using
    javascript-client
    and previously was using
    graphql-binding
    . So, previously I was using this to grab data with all the relationships underneath
    Copy code
    await ctx.db.query.accounts({
          where: { user: { id }, role },
          orderBy: 'createdAt_ASC',
          last: 1,
        }, `{
          contact { phone, phone2, skype, address }
        }`)
    datamodel
    Copy code
    type User {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
    
      accounts: [Account!]! @relation(name: "UsersAccount")
    }
    
    type Account {
      id: ID! @unique
      createdAt: DateTime!
      user: User! @relation(name: "UsersAccount")
    
      role: Role!
      contact: Contact @relation(name: "AccountsContact")
    }
    
    type Contact {
      id: ID! @unique
      updatedAt: DateTime!
      account: Account! @relation(name: "AccountsContact")
    
      phone: String!
      phone2: String
      skype: String
      address: String!
    }
    now, going from
    ctx.db.query.accounts
    to
    ctx.db.accounts
    results in empty relations data. How should I call it so it returns the relations data properly for me?
    h
    • 2
    • 6
  • s

    Slackbot

    02/25/2019, 2:00 PM
    This message was deleted.
    h
    • 2
    • 1
  • j

    Julián Álvarez

    02/25/2019, 2:55 PM
    Hello 🙂, somebody has integrated prisma nexus with apollo client? If so, can you show me how with a smooth repo 😌
    h
    • 2
    • 1
  • s

    sandorTuranszky

    02/25/2019, 3:38 PM
    Hello, I wonder if there is a directive to set
    expireAfterSeconds
    for MongoDb? I'd like to set an expiration time for value. Thank you.
    h
    • 2
    • 14
  • i

    iago

    02/25/2019, 6:24 PM
    With the datamodel:
    Copy code
    type Client {
      invitees: [ClientInvitee!]!
      (...)
    }
    type ClientInvitee @embedded {
      email: String!
      permissions: ClientInviteeUserClientPermissions!
    }
    type ClientInviteeUserClientPermissions @embedded {
      company: Boolean! @default(value: false)
      soundtracks: Boolean! @default(value: false)
      fence: Zone @relation(link: INLINE)
    }
    I find a bit strange there's no permissions to update:
    Copy code
    type ClientInviteeUpdateManyDataInput {
    email: String
    }
    Plans for this to change? Soon?
    • 1
    • 1
  • d

    dan

    02/25/2019, 7:14 PM
    So we are deploying using Docker on Kubernetes and have a CMD running
    npm install -g prisma && prisma deploy && prisma seed && npm start
    at the end of the Dockerfile, Im looking for advice when it comes to running prisma deploy and generate on the server. The issue I am having is that multiple replicas of this docker image will start by running prisma deploy at the same time, causing errors on all the images that spin up after the first. I was wondering if anyone else is deploying their prisma changes as part of the automated deployment process and if they are solving for this somehow.
    👍 1
  • a

    Aditya Gupta

    02/25/2019, 7:37 PM
    Hi there, i am trying to use Prisma with mongodb, but i am constantly getting this error " Could not connect to server at http://192.168.99.100:4466. Please check if your server is running.", i tried localhost also but still same error and when i am using postgres or mysql, service is running perfectly. if someone can help.
    s
    • 2
    • 1
  • d

    dan

    02/25/2019, 7:39 PM
    @Aditya Gupta What does your docker compose file look like?
  • a

    Aditya Gupta

    02/25/2019, 7:47 PM
    @dan after checking docker logs.
    j
    d
    +3
    • 6
    • 20
  • a

    Aditya Gupta

    02/25/2019, 7:49 PM
    Here is my docker-compose file coversion: "3" services: prisma: image: prismagraphql/prisma:1.27 restart: always ports: - "4466:4466" environment: PRISMA_CONFIG: | port: 4466 databases: default: connector: mongo uri: 'mongodb+srv://uri'
    s
    • 2
    • 1
  • j

    Julián Álvarez

    02/25/2019, 8:09 PM
    @Aditya Gupta +1, I am facing the same
  • a

    arsan.irianto

    02/26/2019, 2:50 AM
    hello everyone, my graphql error with message : "Expected Iterable, but did not find one for field Team.players." how to solve this?. I will to query graphql client like this : query { teams{ strTeam players{ strPlayer } } }
    GraphQL_server_from_rest_api.txt
    c
    s
    j
    • 4
    • 35
  • d

    deepak

    02/26/2019, 7:40 AM
    Hello everyone. I am facing an issue with prisma-client-lib. I get an error Can't find 'fs' in prettier. Have also logged this as an issue. Any one else came across this? Thanks
  • j

    Jidé

    02/26/2019, 7:43 AM
    Any idea why extractFragmentReplacements would not work ?
1...224225226...637Latest