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

    dan

    03/06/2019, 2:28 AM
    data: Json! @default(value: {})
    ->
    The value {} is not a valid default for fields of type Json.
    j
    i
    • 3
    • 2
  • d

    dan

    03/06/2019, 2:28 AM
    any ideas??
  • a

    anargu

    03/06/2019, 3:40 AM
    Hi, Does Prisma Nexus generate code for golang?
    h
    • 2
    • 1
  • a

    anargu

    03/06/2019, 3:41 AM
    I want to extend the crud operations with custom mutations (custom resolvers) in my server
  • m

    Martí Crespí

    03/06/2019, 7:21 AM
    Is there a way to deactivate massively the create input (I only want the connect one) in all the mutations with prisma or nexus? I know how do it, but one by one with nexus, filtering this property but I would like to know if exists some way to do it massively.
    c
    j
    u
    • 4
    • 54
  • o

    Omprakash

    03/06/2019, 10:58 AM
    How to deploy multiple prisma containers connecting to the same db in our own servers?
  • r

    rem

    03/06/2019, 10:58 AM
    With prisma.$subscribe - the examples aren't clear how I can use
    .node()
    https://www.prisma.io/docs/prisma-client/features/realtime-JAVASCRIPT-rsc8/ - how do I ask for something like
    comments { date, text }
    as a sub field of a post subscription (for instance)
  • b

    boennemann

    03/06/2019, 1:59 PM
    Is there anyone else experiencing problems with running prisma-server recently? We've done extremely well running it on zeit.co for quite some time, until it started constantly throwing OutOfMemory errors across many versions. We tried switching to heroku and adding a ton more memory, but that didn't seem to fix anything, because it's probably just leaking the memory anway.
    Copy code
    03/06 02:44 PM (13m)
    Uncaught error from thread [single-server-akka.actor.default-dispatcher-2]: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[single-server]
    03/06 02:44 PM (13m)
    java.lang.OutOfMemoryError: Java heap space
    f
    h
    • 3
    • 74
  • j

    jdoyle112

    03/06/2019, 4:49 PM
    Does anyone know if/ how you could add additional rest api routes to a graphql-yoga server?
    t
    • 2
    • 11
  • n

    Nikita

    03/06/2019, 5:07 PM
    Hey guys! Sorry for probably stupid question. How can I get raw ProstgreSQL database access created by Prisma? I mean, I'd like to see generated tables, see data (maybe connect via some GUI like HeidiSQL).
    i
    j
    • 3
    • 6
  • h

    Hasen

    03/06/2019, 5:48 PM
    hi all, I have a question after looking at the nexus-prisma info page. I see that you get the CRUD for free but where do you put in your user access restrictions? at the resolver level? I would like to be granular with permissions. Any pointers are welcome 🙂
    z
    • 2
    • 2
  • j

    Jared Starin

    03/06/2019, 6:47 PM
    quick question: just checking out Prisma... Is there current support for cockroachDB?
    b
    • 2
    • 2
  • b

    boennemann

    03/06/2019, 8:02 PM
    Is there a preferred Postgres version that Prisma supports? 10, 11? Can't find info on this.
    h
    • 2
    • 1
  • l

    Leonardo

    03/06/2019, 8:06 PM
    Hi, does anyone know how to make 2 level nested queries in prisma client?, I'm trying to make a query like: prisma.user({userId}).sentOpinions().toUser().userId But the only thing that works is: prisma.user({userId}).sentOpinions()
    h
    • 2
    • 1
  • r

    Robert

    03/06/2019, 8:08 PM
    Hi — I’ve been following along with a GraphQL/Prisma tutorial (https://www.howtographql.com/graphql-js/6-authentication/) and one of the ‘unlock the next page’ questions they asked is one that’s got me puzzled. Specifically, I’m wondering why one redefines types in the application schema when they are already part of the Prisma database schema and could be imported from there. The answer the tutorial gives is “To hide potentially sensitive information from client applications”, but I’m afraid I don’t understand it. What does this mean, to you, and why, indeed, do we replicate definitions in ‘schema.graphql’ and ‘datamodel.prisma’? Specifically in ‘schema.graphql’ I have
    Copy code
    type User {
        id: ID!
        name: String!
        email: String!
        links: [Link!]!
    }
    and in ‘datamodel.prisma’ I have
    Copy code
    `
    type User {
        id: ID! @unique
        name: String!
        email: String! @unique
        password: String!
        links: [ Link!] !
    }
    l
    • 2
    • 1
  • l

    Leonardo

    03/06/2019, 8:21 PM
    Hi, does anyone know how to make 2 level nested queries in prisma client?, I'm trying to make a query like: prisma.user({userId}).sentOpinions().toUser().userId But the only thing that works is: prisma.user({userId}).sentOpinions()
    b
    • 2
    • 2
  • m

    Michael

    03/06/2019, 9:04 PM
    Just updated from 1.23 => 1.28 and I am not getting introspection errors when deploying. Anyone else experiencing this?
    message":"Encountered unknown SQL type float8 with column lat. IntrospectedColumn(lat,float8,null,true)"}}
    h
    e
    • 3
    • 3
  • m

    Madhav

    03/06/2019, 10:02 PM
    With reference to my previous post about an error in multi node prisma server setup, I posted my latest findings here: https://www.prisma.io/forum/t/prisma-implementation-in-production/6105. Any help would be appreciated. @nilan Thanks!
    🙌 1
  • e

    ezeikel

    03/07/2019, 1:19 AM
    Having issues with returning data for relations with Mongo Connector My datamodel looks like this:
    Copy code
    // datamodel.prisma
    
    type User {
      id: ID! @id
      firstName: String!
      lastName: String!
      username: String @unique
      email: String! @unique
      password: String!
      posts: [Post!]! @relation(link: INLINE)
      following: [User!]! @relation(name: "Following", link: INLINE)
      followers: [User!]! @relation(name: "Followers", link: INLINE)
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    
    type Post {
      id: ID! @id
      caption: String
      image: String
      published: Boolean @default(value: false)
      author: User
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    My
    user
    resolver looks like this:
    Copy code
    user (_, { id }, ctx, info) {
        return ctx.prisma.user({ id }, info);
      },
    If i try to query for a user’s posts:
    Copy code
    {
      user(id: "5c7c04e824aa9a0007495114") {
        firstName
        posts {
          id
        }
      }
    }
    I get
    Cannot return null for non-nullable field User.posts.
    and not sure why? I can see the data is there in the
    Posts
    collection via Mongo Compass but dont seem to be able to query it.
    b
    h
    • 3
    • 13
  • m

    Martí Crespí

    03/07/2019, 7:08 AM
    Hi, someone knows why it throws this error when I click to play? I don't understand it because I'm sending like in another mutation that works perfectly, but in this one, is requirying me $data variable but it's defined and it's well formed, there isn't any error validating its structure. 🤔
    j
    • 2
    • 37
  • c

    Christian

    03/07/2019, 10:06 AM
    when executing a larger query I get
    The server was not able to produce a timely response to your request
    once in a while... is it due to a timeout? If yes, any chance to increase the limit?
    h
    • 2
    • 2
  • s

    Siddhant

    03/07/2019, 11:04 AM
    I am trying to use prisma via demo server but it shows errors like split not defined.
    h
    • 2
    • 2
  • j

    Jeroen

    03/07/2019, 1:14 PM
    I want to query a nested field for multiple variables. In this case, I want to query RPR, but only return RPR if the label of the nested Region is given. One variable for the nested Region (field: label) works fine, but how can I filter on multiple variables of the same field? The way I see it, when I call up the query-client (in my case through Apollo), I want to give an array as a variable and let the query in the backend go through that array and query based on any of the variables given in the array. The resolver does nothing more then:
    Copy code
    rPRs: (root, args, ctx, info) => {
        return ctx.db.query.rPRs(args, info);
      },
    My Schema:
    Copy code
    type RPR {
      id: ID! @Unique
      RPRID: String! @Unique
      state: String
      region: Region!
      resource: Resource!
      price: Float
      theme: String
      editionTitle: String
      information: String
    }
    
    type Region {
      id: ID! @Unique
      regionID: String! @Unique
      label: String! @Unique
      name: String! @Unique
      aov: Float!
      aov_multiplier: Float!
    }
    Query:
    Copy code
    query ADVICE_RESOURCES_QUERY($theme: String, $regio: String) {
      rPRs(where: {
        theme: $theme,
        region: {
          label: $regio
        }
      })
      {
        RPRID
        region {
          label
        }
      }
    }
    l
    h
    • 3
    • 5
  • o

    Omprakash

    03/07/2019, 2:21 PM
    Hi team, does the latest version of prisma support local clusters ? Or is there a way to connect 5 instances of prisma to a same db ?
    h
    • 2
    • 3
  • n

    Naka

    03/07/2019, 2:47 PM
    Hey ppl, can I restore a prisma server from a previous prisma server postgres dump or it is only possible with the SDL export?
    h
    • 2
    • 3
  • r

    rein

    03/07/2019, 3:21 PM
    Is anyone else having trouble with adding services to a self hosted server? I can do
    prisma init
    but I do not see the service appear in the list of services on prisma.io even though I selected the correct server.
    h
    • 2
    • 4
  • g

    gaby

    03/07/2019, 4:23 PM
    Hello everybody, prisma recent fan boy
    👋 2
  • l

    l0ck3

    03/07/2019, 4:25 PM
    Hello @gaby. I think I know you.
    🤗 1
  • m

    Michael Jones

    03/07/2019, 5:09 PM
    Should the Database and Prisma Server be protected with SSL? If so, how would I go about doing that with RDS/Fargate (from the Prisma Cloudformation tutorial)?
    d
    • 2
    • 3
  • n

    Nishant

    03/07/2019, 5:48 PM
    Is there a way to check/monitor the database queries that are actually being resolved by our prisma resolver functions?
1...230231232...637Latest