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

    martin

    11/04/2020, 4:04 AM
    In this case, both the
    Facilitator
    and
    User
    fields are relations.
  • m

    martin

    11/04/2020, 4:04 AM
    Unfortunately, I couldn’t find any guidance in the docs.
  • b

    Bex

    11/04/2020, 6:11 AM
    Hello, dear Prisma community! It took me a full day to research the alternatives, but I finally decided to go with Prisma for migrating my project from Ruby on Rails to Node.js. I am in the middle of replicating the queries, and got into a trouble while handling Enums in Prisma. I have just opened an Issue and would love to learn more about how it’s done here! Any help is deeply appreciated. Link to the issue: https://github.com/prisma/prisma/discussions/4149
    t
    r
    • 3
    • 4
  • l

    Lucas

    11/04/2020, 7:22 AM
    Hello, I am quite new to Prisma - nexus and have a basic question. Is there any way to create automatic nexus schema definition from prisma database definition file? I have a project using prismic but will need to add a graphql API on top, so reading the docs I see the way to go is use
    nexus/schema
    and
    nexus-plugin-prismic
    to create the schema an then use it into
    apollo-server
    or
    graphql-yoga
    . My question is if there is any way to automatically build
    NexusSchema.makeSchema
    ? Or maybe i am confused and the way to go is to pass the
    nexus-prismic-plugin
    as a plugin options to
    makeSchema
    and this should be enough? Thanks in advance!
    r
    • 2
    • 6
  • g

    Gabriel Oliveira

    11/04/2020, 12:21 PM
    Hey everyone, what are the recommended places to review when you have this kind of error:
    Cannot return null for non-nullable field User.id.
    This is happening when trying to fetch data from a model called
    Consultation
    which has a field called
    requestedBy
    which is a relation to a model
    User
    , so one
    Consultation
    has a
    1-to-1
    relation with
    User
    model I know the data exist in this nested query, because I'm migrating from prisma1 to prisma2, and in the prisma1 project the result comes in correctly simplified Models:
    Copy code
    model User {
      id                                          String          @id @default(cuid())
      name                                        String
      Consultation_Consultation_requestedByToUser Consultation[]  @relation("Consultation_requestedByToUser")
    }
    
    model Consultation {
      id                                  String                  @id @default(cuid())
      details                             String?
      requestedBy                         String?
      User_Consultation_requestedByToUser User?                   @relation("Consultation_requestedByToUser", fields: [requestedBy], references: [id])
    }
    Query Resolver:
    Copy code
    return ctx.prisma.consultation.findMany({
                  include: { 
                    User_Consultation_requestedByToUser: true,
                  },
                })
    So my general question is, when you face this kind of error, would it be because something is wrong in the resolver query only, or should I also review if something is wrong in my models relation design
    n
    • 2
    • 8
  • n

    Natalia

    11/04/2020, 3:23 PM
    graphql GraphQL Mega Meetup is almost here! 👋 Tomorrow (November 5th at 7PM CET) the London, Berlin and Munich GraphQL Meetup groups will join forces to bring you this interactive event. Two talks, a discussion panel and a GraphQL quiz. Listen closely to the talks and answer the question correctly for a chance to win exciting prizes: • Prisma swag (Tshirt, mask, stickers) • commercetools swag (jumper, socks) • “Learn All GraphQL” Tshirt • 2 tickets to GraphQL Galaxy conference. Find out more and RSVP here.
    👀 2
    🦜 7
    🥇 2
    💯 4
    graphql 3
    ❤️ 1
    🎉 4
    👏 3
    prisma cool 4
  • m

    Malik

    11/04/2020, 6:29 PM
    when is prisma considered to be production ready?
  • m

    Malik

    11/04/2020, 6:29 PM
    It looks awesome but experimental migrations is really holding me back
  • a

    Adam

    11/04/2020, 7:18 PM
    I think prima itself is production ready, but the migration feature itself is experimental
  • m

    Malik

    11/04/2020, 7:24 PM
    Any ideas on when it will be stable?
    r
    a
    • 3
    • 5
  • p

    Pieter

    11/04/2020, 7:32 PM
    How do we do soft delete with prisma? busy migrating from sequelize and we got deletedAt fields and it doesnt seem like prisma is respecting those when fetching.
    j
    • 2
    • 6
  • j

    Justin Ellingwood

    11/05/2020, 4:10 PM
    We just pushed a new article to Prisma's Data Guide: https://www.prisma.io/dataguide/mysql/authentication-and-authorization/privilege-management Let us know if you have any feedback
    prisma cool 3
    💯 2
  • d

    Deniz Aybars

    11/05/2020, 5:26 PM
    Hi, I am stuck with a previous project implemented with graphcool. I have an executable that generates the DB structure which I do not have currently. I am trying the github resources to get it up but The localfaas docker image is erased and I could not get local server up. I wonder if anyone here has a previous copy of the localfaas docker image and can share with me ? So I wil get the db structure and can migrate it and be more than happy . Thanks,
    d
    • 2
    • 2
  • n

    Natalia

    11/05/2020, 5:52 PM
    GraphQL Mega Meetup starts in less than 10 minutes! graphql😁

    Tune in here▾

    or on Prisma Twitter : https://twitter.com/prisma .
    prisma green 1
    💯 1
    fast parrot 1
  • a

    Ahmet

    11/05/2020, 9:03 PM
    Does prisma 2 have golang support?
    a
    r
    • 3
    • 5
  • a

    Alexis Gonzalez

    11/06/2020, 8:18 AM
    Hello has anyone experience this error on prisma server
  • a

    Alexis Gonzalez

    11/06/2020, 8:18 AM
    Copy code
    "message":"Task slick.basic.BasicBackend$DatabaseDef$$anon$3@67704cfc rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@355c4e9e[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 508840]"
    d
    • 2
    • 1
  • j

    Jose Maria CL

    11/06/2020, 6:36 PM
    Hi there, I have a weird issue. My prisma docker image keeps restarting. It seems there is java exception with the postgresql connector and I don't have idea of what can I do in order to fix it. Can you help me?
    • 1
    • 6
  • j

    John Cantrell

    11/06/2020, 7:24 PM
    is it possible to build up the datasource url programmatically? Seems like I can either give it a string or env(). I want to construct it using multiple env vars (PGHOST/PGUSER/PGPASSWORD/etc)
    r
    • 2
    • 3
  • m

    Maher Aldous

    11/07/2020, 4:30 AM
    Hello do any of you know where I can find a docs or tutorial to use Prisma NexusJS with MongoDB?
    r
    • 2
    • 3
  • m

    Mark Jackson

    11/07/2020, 4:44 AM
    I'm trying to understand when "relation scalar fields" are needed (as used in the first example here: https://www.prisma.io/docs/concepts/components/prisma-schema/relations) . I've seen examples with and without it. Any insight here? Thank you
    • 1
    • 1
  • w

    Windward Hive

    11/07/2020, 4:14 PM
    Hello. prisma isn't generating 3 files (prisma.yml, docker-compose.yml & datamodel.grapgql) when i run "prisma init". Anyone have an idea why? I've been searching on google but i can't find any relevant information
    r
    • 2
    • 1
  • a

    Ahmet

    11/07/2020, 10:41 PM
    Schema:
    Copy code
    type Project {
      id: UUID! @id
      locationSecurity: Json
    }
    PostgreSQL type:
    locationSecurity     | text                           |           |          |         | extended |              |
    It is stored in schema as JSON and in the database as text. Why? This is bug? Or is there a specific reason?
    r
    • 2
    • 1
  • m

    Manthan Mallikarjun

    11/09/2020, 9:11 AM
    Why isn't there an
    @createdAt
    just like
    @updatedAt
    ? It could literally map to
    @default(now())
    but it would make the schema feel more consistent
    👍 1
    a
    a
    • 3
    • 4
  • k

    KJReactor

    11/09/2020, 4:12 PM
    I need to create a db for integration testing. Can I set an additional env variable, ie., DATABASE_URL_TEST, rather than creat an other .env file?
    r
    • 2
    • 2
  • a

    Amit

    11/09/2020, 7:34 PM
    Hey guys any code sample for real time subscription using prisma and graphql?
    d
    r
    • 3
    • 3
  • a

    Aaron Fulkerson

    11/10/2020, 2:40 AM
    No way to create many! 😞
    r
    • 2
    • 2
  • s

    stephan

    11/10/2020, 9:20 AM
    does prisma 2 already support MONGODB ?
    r
    • 2
    • 2
  • p

    pedeceul

    11/10/2020, 1:21 PM
    Hello. I am using prisma 1.34(docker), I am trying to make a deploy that includes adding a field to a type that already has 2.000.000 records. For a minute the deploy has the status IN_PROGRESS, after one minute it has status ROLLBACK_SUCCES and the following error is thrown:
    ["java.sql.SQLNonTransientConnectionException: (conn=10954) Connection timed out\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:161)\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:106)\n\tat org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:235)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:224)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.execute(MariaDbPreparedStatementClient.java:159)\n\tat com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)\n\tat com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)\n\tat slick.jdbc.StatementInvoker.results(StatementInvoker.scala:39)\n\tat slick.jdbc.StatementInvoker.iteratorTo(StatementInvoker.scala:22)\n\tat slick.jdbc.Invoker.first(Invoker.scala:30)\n\tat slick.jdbc.Invoker.first$(Invoker.scala:29)\n\tat slick.jdbc.StatementInvoker.first(StatementInvoker.scala:16)\n\tat slick.jdbc.StreamingInvokerAction$HeadAction.run(StreamingInvokerAction.scala:52)\n\tat slick.jdbc.StreamingInvokerAction$HeadAction.run(StreamingInvokerAction.scala:51)\n\tat slick.basic.BasicBackend$DatabaseDef$anon$3.liftedTree1$1(BasicBackend.scala:276)\n\tat slick.basic.BasicBackend$DatabaseDef$anon$3.run(BasicBackend.scala:276)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: java.sql.SQLException: Connection timed out\n\tat org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:142)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:217)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:218)\n\t... 15 more\nCaused by: java.sql.SQLException: Could not send query: Read timed out\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.handleIoException(AbstractQueryProtocol.java:1738)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1302)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1281)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:214)\n\t... 16 more\nCaused by: <http://java.net|java.net>.SocketTimeoutException: Read timed out\n\tat <http://java.net|java.net>.SocketInputStream.socketRead0(Native Method)\n\tat <http://java.net|java.net>.SocketInputStream.socketRead(SocketInputStream.java:116)\n\tat java.net.SocketInputStream.read(SocketInputStream.java:171)\n\tat java.net.SocketInputStream.read(SocketInputStream.java:141)\n\tat <http://java.io|java.io>.BufferedInputStream.fill(BufferedInputStream.java:246)\n\tat <http://java.io|java.io>.BufferedInputStream.read1(BufferedInputStream.java:286)\n\tat java.io.BufferedInputStream.read(BufferedInputStream.java:345)\n\tat <http://org.mariadb.jdbc.internal.io|org.mariadb.jdbc.internal.io>.input.StandardPacketInputStream.getPacketArray(StandardPacketInputStream.java:238)\n\tat <http://org.mariadb.jdbc.internal.io|org.mariadb.jdbc.internal.io>.input.StandardPacketInputStream.getPacket(StandardPacketInputStream.java:208)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1300)\n\t... 18 more\n"]
    I tried to increase some mysql parameter to increase the timeout: wait_timeout, max_execution_time, but the error is the same. Did someone encountered this or has a clue about how to solve it? Thanks
  • s

    Samrith Shankar

    11/10/2020, 8:52 PM
    Hello guys, I ran into a problem with middlewares, and created this feature request. Could this maybe interest other people as well?
    r
    • 2
    • 1
1...403404405...637Latest