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

    dohomi

    09/26/2018, 10:24 PM
    Hello, what happened to the graph.cool usage information on each endpoint? Since a few weeks you are sending out reports but there isn’t any statistics available for the endpoints any longer - it used to be in the settings section.
  • d

    dohomi

    09/26/2018, 10:26 PM
    it would be nice if you would not just shut down an endpoint within less than few hours and no notice upfront - there should be a warning section in the console itself if limits has been reached.
  • k

    Kai

    09/27/2018, 3:16 AM
    I have a User model, and in my schema.graphql I want to add computed field. If I first query user from prisma server, and then add the computed field to user object. Then the computed filed is computed even if frontend user does not include this filed in the query. I know in normal Graphql server, resolver for a field is not executed unless the filed is requested in the query. What if I have several computed filed, do I have to computed all of them in my resolver even if they are not requested? What if the computed filed depend on field that are not requested by frontend user, do I have to rewrite the query to include those field? What’s the right way to do it?
    • 1
    • 1
  • g

    go4cas

    09/27/2018, 7:04 AM
    Hey guys ... in the "Prisma under the Hood" section, of the docs, there is mention of running multiple Prisma services on a single server. Now, if I need my client (web app) to make a single
    /graphql
    call which contains data from multiple of these services, what would be the best approach? Is this where schema stitching comes in? Is there a suggested pattern (or maybe some sample code) of how to do this in the Prisma ecosystem?
    n
    • 2
    • 2
  • a

    AzuriteJP

    09/27/2018, 9:45 AM
    Hi, I have a question about Prisma, can I have a single prisma instance with two separate GraphQL servers exposing different parts of the prisma schema? Lets say types the prisma schema contains the types A, B, C and I want one GraplQL server to expose types A, B, and another separate server to expose type C... is this possible? I realise this may be more related to what I would do with Apollo+Express, but any thoughts would be welcome 🙂
    n
    g
    • 3
    • 14
  • a

    aman06

    09/27/2018, 2:43 PM
    I read that deleteMany with cascade is not supported currently but is there another way to achieve the cascade effect without using the deleteMany call? Currently I’m trying to fetch all the elements I wish to delete through a prisma query, then loop through them and perform a single delete on each one however I get this message after the first one deletes:
    Copy code
    [GraphQL error]: Message: Whoops. Looks like an internal server error.
    n
    • 2
    • 5
  • c

    Chris H

    09/27/2018, 4:23 PM
    Does 1.17 break prior releases?
  • d

    Drew Delianides

    09/27/2018, 4:34 PM
    anyone using typescript with prisma? Do you get type errors when using a string for schema delegation? ie
    ctx.db.query.foo({ where: { id: 1 }}, '{ bar }');
    k
    • 2
    • 2
  • d

    Drew Delianides

    09/27/2018, 4:35 PM
    Argument of type '"{ bar }"' is not assignable to parameter of type '{ [key: string]: any; } | undefined'.
    l
    • 2
    • 1
  • s

    steveb

    09/27/2018, 4:44 PM
    In a schema type, is there a way to specify a property that will return an object? For example, we call out to Stripe to get some user data and want to stick that returned object in a prop
  • s

    steveb

    09/27/2018, 4:44 PM
    so like a free-form object, so we don't have to build out a type for it
  • h

    Henry

    09/27/2018, 4:47 PM
    @steveb You could JSON Stringify it and put it in a string? Otherwise maybe investigate custom scalars
  • s

    steveb

    09/27/2018, 4:47 PM
    yeah, that's what we're doing currently (stringify)
  • s

    steveb

    09/27/2018, 4:48 PM
    would just rather not stringify if we don't have to
  • i

    Industrial

    09/27/2018, 5:59 PM
    Hi!
  • i

    Industrial

    09/27/2018, 6:06 PM
    I want to serve financial charts over GraphQL with Prisma. I have a lot of
    { trader: String, category: String, type: String, base: String, quote: String, timestamp: String, open: String, high: String, low: String, close: String, volume: String }
  • i

    Industrial

    09/27/2018, 6:06 PM
    forgot period (the chart zoom level)
  • i

    Industrial

    09/27/2018, 6:07 PM
    My problem is with updating the data. Say I have a month of data in the DB and now I query from 15th til 15th next month so it overlaps half the data
  • i

    Industrial

    09/27/2018, 6:08 PM
    How would I handle this (With PostgreSQL)? Prisma does not have an upsert mutation, right?
  • h

    hudsonb

    09/27/2018, 6:08 PM
    Ack where did
    JFXPanel
    go
    i
    • 2
    • 1
  • i

    Industrial

    09/27/2018, 6:10 PM
    updateManyX
    doesn't do an insert 🙂
  • i

    Industrial

    09/27/2018, 6:13 PM
    Oh!
    upsertX
  • i

    Industrial

    09/27/2018, 6:13 PM
    never mind!
    h
    • 2
    • 2
  • i

    Industrial

    09/27/2018, 6:25 PM
    1) Can I do this without the where and id? 2) Are the create and update correct?
    Copy code
    mutation upsertMarket(
      $trader: String!,
      $base: String!,
      $quote: String!,
      $category: String!,
      $type: String!
    ) {
      upsertMarket(
        where: {
          id: "123"
        },
        create: {
          trader: $trader
          base: $base
          quote: $quote
          category: $category
          type: $type
        },
        update: {
          trader: $trader
          base: $base
          quote: $quote
          category: $category
          type: $type
        }
      )
    }
    m
    h
    • 3
    • 13
  • v

    valstu

    09/27/2018, 8:54 PM
    Anyone facing similar problems with
    prisma introspect
    ? After running it I’m getting following error
    TypeError: Cannot read property 'datamodel' of undefined
  • v

    valstu

    09/27/2018, 8:55 PM
    datamodel-xxxxxxx.prisma
    file is created but also getting that error
  • v

    valstu

    09/27/2018, 9:18 PM
    Apparently related to this line https://github.com/prisma/prisma/blob/06304e5f6e13174cadc05be94ecbcb104d43d032/cli/packages/prisma-cli-core/src/commands/introspect/introspect.ts#L113
    n
    • 2
    • 1
  • z

    Zach

    09/27/2018, 11:30 PM
    I am migrating to Prisma v 1.17. In previous versions the data models generated data schemas and associated filters, pagination, etc. Do I now need to write all of this by hand in my schema.graphql file?
    n
    • 2
    • 4
  • k

    kitze

    09/28/2018, 5:59 AM
    In the examples there is a
    resolvers.ts
    file in the
    generated
    folder. However, after running
    prisma deploy
    or
    prisma generate
    that file is not generated anymore. Is there a flag that I'm missing or something?
    b
    d
    • 3
    • 23
  • k

    knowbody

    09/28/2018, 9:27 AM
    hey, I'm getting an error like this:
    Field "createdAt" is not defined by type PlaceCreateInput; did you mean createdBy?
    and I'm not sure what it is about
    n
    • 2
    • 18
1...125126127...637Latest