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

    s1nc4p

    04/13/2019, 8:39 PM
    Hi guys, does prisma client getting data over http graphql endpoint or connecting to prisma server directly?
    a
    • 2
    • 1
  • j

    John Aagaard

    04/13/2019, 9:16 PM
    Hey everyone, would anybody be willing to share some of their graphql resolvers while using prisma and a sql database? I'm having issues with connecting one type to another inside the resolvers. Thanks!
  • n

    Nathan Rice

    04/13/2019, 10:59 PM
    Quick question. Is there a way to set the service name and the stage without changing my endpoint? I'd rather my mongodb database not be named default_default and I would also rather not have my endpoint be at the route /<servicename>/<stage>
  • n

    Nathan Rice

    04/13/2019, 11:02 PM
    I am reading about the prisma.yml and it seems like the only way service name and stage can be set is through prisma inferring it from the endpoint specified.
  • g

    Gamaranto

    04/14/2019, 2:52 PM
    Hey everyone, have a question about working with Expo. My backend code works well with a React Web app but I always get a network error on the React Native version
  • v

    Vinay Bedre

    04/14/2019, 7:02 PM
    Is it possible to use
    pgcrypto
    as ID generation within
    datamodel.prisma
    ? How can this be achieved? I am using Prisma 1.30 with Postgres
  • c

    CCBCodeMonkey

    04/15/2019, 6:34 AM
    hey, I have been trying to figure out how to get a count of rows that are a group by...
  • c

    CCBCodeMonkey

    04/15/2019, 6:35 AM
    like if I have a property, say,
    tagName
    , and I want to see how many rows have the same tagname, and order it by that count
  • j

    James

    04/15/2019, 6:58 AM
    Prisma doesn't currently have a group by feature, but it is frequently requested
  • c

    CCBCodeMonkey

    04/15/2019, 7:05 AM
    @James is there any way to even get this data out
  • c

    CCBCodeMonkey

    04/15/2019, 7:05 AM
    man it seems like a huge oversight
  • j

    James

    04/15/2019, 7:08 AM
    I'm not sure. If you are using mysql or postgres then it's pretty simple to do groupBy queries on the database. Prisma has an execute raw sql queries feature now, but it isn't fully documented, just says "coming soon". There is plan to have an aggregations api to allow many of the things like max, min and groupBy that are pretty easy to do in SQL but it is just a plan at this point @CCBCodeMonkey
  • c

    CCBCodeMonkey

    04/15/2019, 7:08 AM
    yea im trying to figure out how to use executeRaw
  • c

    CCBCodeMonkey

    04/15/2019, 7:08 AM
    I don't see the function on my prisma client
  • j

    James

    04/15/2019, 7:09 AM
    all I've been able to figure out is that it needs to be enabled first, add
    rawAccess: true
    to your prisma config file
  • c

    CCBCodeMonkey

    04/15/2019, 7:10 AM
    is there an easy way to see the schema?
  • j

    James

    04/15/2019, 7:11 AM
    dunno, but this github issue seems to have some useful info about how to use execute raw https://github.com/prisma/prisma/issues/3300
  • c

    CCBCodeMonkey

    04/15/2019, 7:12 AM
    when I try add rawAccess: true to my
    prisma.yml
    I get this
  • c

    CCBCodeMonkey

    04/15/2019, 7:12 AM
    Copy code
    Invalid prisma.yml file
    prisma.yml should NOT have additional properties. additionalProperty: rawAccess
  • c

    CCBCodeMonkey

    04/15/2019, 7:13 AM
    bleh... seems like you have to add it to some config file that I don't have because I used prisma cloud
  • j

    James

    04/15/2019, 7:14 AM
    yeah it needs to be added to PRISMA_CONFIG environment variable, so for me that would be in the docker-compose.yml, but I'm not sure about prisma cloud
  • c

    CCBCodeMonkey

    04/15/2019, 7:15 AM
    ah I see it in heroku
  • c

    CCBCodeMonkey

    04/15/2019, 7:18 AM
    actually I don't
  • c

    CCBCodeMonkey

    04/15/2019, 7:18 AM
    not sure how to set it
  • c

    CCBCodeMonkey

    04/15/2019, 7:20 AM
    with prisma cloud
  • j

    James

    04/15/2019, 7:24 AM
    You might try it and see if rawAccess isn't actually aleady enabled
  • c

    CCBCodeMonkey

    04/15/2019, 7:25 AM
    @James I don't see it on my list of functions on my generated prisma client
  • c

    CCBCodeMonkey

    04/15/2019, 7:27 AM
    this really sucks, usually I can work around what prisma is missing but I don't how how to work around this aside from querying every single row in the table
  • j

    James

    04/15/2019, 7:27 AM
    nor do I and I've got rawAcess set to true
  • j

    James

    04/15/2019, 7:27 AM
    Anyone ever successfully used executeRaw who can tell us how to use it?
1...252253254...637Latest