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

    deactivateduser

    10/05/2019, 5:15 PM
    😢
  • d

    deactivateduser

    10/05/2019, 5:53 PM
    okay wait so prisma-binding can not be completely replaced by the typescript client generated by prisma as prisma-binding allows info as an arg but the client doesn't?
  • a

    Adam Leith

    10/05/2019, 11:58 PM
    Hey all, help please 🙏
    Copy code
    type Request {
      id: ID! @id
      notes: [String] @scalarList(strategy: RELATION)
    }
    is erroring on
    prisma deploy
    with:
    Copy code
    Request
        ✖ Valid values for the strategy argument of `@scalarList` are: RELATION.
    Anyone know how I can fix this?
    l
    a
    • 3
    • 5
  • l

    lucid_frog

    10/06/2019, 1:14 AM
    hey guys, currently following the Get started tutorial: https://www.prisma.io/docs/get-started/02-change-data-model-TYPESCRIPT-t101/ and this line is throwing an error:
    Copy code
    import { prismaObjectType, makePrismaSchema } from 'nexus-prisma'
    Module '"../../../../path/to/project/node_modules/nexus-prisma/dist"' has no exported member 'prismaObjectType'
    Any idea?
  • h

    Heade

    10/06/2019, 8:25 AM
    @Adam Leith
    @scalarList
    is used for relation mutations
  • h

    Heade

    10/06/2019, 8:27 AM
    you shouldnt use it there
  • d

    Dan Hollick

    10/06/2019, 1:22 PM
    Anyone else having trouble using
    prisma deploy
    ? It runs in the console as expected but my Service doesn't reflect the data model changes
  • j

    James

    10/06/2019, 1:48 PM
    What limitations are there for a deployment using Prisma cloud? I could not find any mentioned in the docs
  • j

    James

    10/06/2019, 3:11 PM
    I need help copying data from one deployment to another. My data is highly related and I'm using
    prisma export
    and
    prisma import
    . That mostly works, but it gets to some relations and complains:
    Copy code
    "Failure inserting into relationtable Response with ids StringIdGCValue(ck0vyh1zd04v7079202qab9co) and StringIdGCValue(ck0w7w1sh05ov0790a9ntrvdo). Cause: .SQLIntegrityConstraintViolationException: (conn=828922) Cannot add or update a child row: a foreign key constraint fails (`james-6ee4db~instaquiz@dev`.`Response`, CONSTRAINT `Response_ibfk_3` FOREIGN KEY (`answer`) REFERENCES `Answer` (`id`) ON DELETE SET NULL)"
  • j

    James

    10/06/2019, 3:13 PM
    Many relations we imported correctly, many did not. What can I do to get around this problem?
  • j

    James

    10/06/2019, 3:29 PM
    the schema to give you an idea the shape of my data
    datamodel.prisma
  • l

    lucid_frog

    10/06/2019, 3:33 PM
    any of you has managed to write a graphql api with prisma object types ?
  • k

    Kyle Melton

    10/06/2019, 9:31 PM
    I need help troubleshooting with query failure. I'm making a query in the application layer that's failing. When I type it into the playground database layer it succeeds. If I run it from the application layer it fails. I don't know why or where to go to figure it out. All I get is the error
    Cannot return null for non-nullable field Office.publicServants
    I'm only getting their
    id
    . All offices have 1 or more
    PublicServants
    and all
    PublicServants
    have `id`s.
    j
    • 2
    • 6
  • d

    deactivateduser

    10/06/2019, 11:08 PM
    Is there an active community for Prisma to ask questions?
  • j

    James

    10/07/2019, 5:00 AM
    @deactivateduser This is it. active is relative, but usually if you ask a question here you can get an answer.
  • j

    James

    10/07/2019, 5:01 AM
    I usually have to wait about a day and sometimes my questions get no response at all
  • t

    Tobias

    10/07/2019, 5:19 AM
    A bit of an expensive feature request, but much needed 🙏 An (almost) 24/7 rotation of people from the Prisma team being active in answering / redirecting questions and ensuring a structure here on Slack. Have a look at sanity-io-land (sanity.io) for an example of how the quality of each post increases when the team is always active/present in responding. It’ll create valuable ripple effects for the team, product and users. @schickling
    🙏 1
    s
    • 2
    • 2
  • y

    Yong Yuan

    10/07/2019, 5:32 AM
    Hi guys, may I ask if it is necessary to put a column called `id' with unique type in the table to make prisma be able to query the existing postgresql dB? Thanks!
  • y

    yolen

    10/07/2019, 8:13 AM
    We are bout to upgrade from prisma 1.29 to 1.34. so going to v1.1 syntax. I have updated my prisma files. The introspect feature described here https://www.prisma.io/blog/datamodel-v11-lrzqy1f56c90#2-upgrade-your-prisma-server does not work, so i manually updated the syntax in our .prisma files. When I
    prisma deploy
    i get this message
    Copy code
    $ /home/jens/Desktop/onlaw.dk/node_modules/.bin/prisma deploy --no-seed
    Deploying service `default` to stage `default` to server `local` 914ms
    
    Warnings:
    
      Global
        ! You are migrating from the old datamodel syntax to the new one. Make sure that you understand the listed changes because the semantics are different now. Then perform the deployment with the `--force` flag.
    
    If you want to ignore the warnings, please deploy with the --force flag: $ prisma deploy --force
    Read more about deployment warnings here: <https://bit.ly/prisma-force-flag>
    should i worry?
  • m

    Martí Crespí

    10/07/2019, 8:23 AM
    yolen, I recommend you that you do a full backup of your database, in my case in this step, it deleted a lot of FK's and one N:M table with
    --force
    tag.
    y
    • 2
    • 6
  • s

    Stijn de Koning

    10/07/2019, 9:49 AM
    Good morning all, I've looked at the guidelines and think the best place for this question is here. I'm trying to do an update of a node. I have a unique field to use in the where (as described here https://www.prisma.io/docs/prisma-client/basic-data-access/writing-data-TYPESCRIPT-rsc7/#updating-records), but I'd also like to filter on an additional field:
  • s

    Stijn de Koning

    10/07/2019, 9:49 AM
    Copy code
    const updatedUser: User = await prisma.updateUser({
      data: {
        role: 'ADMIN',
      },
      where: {
          id: 'cjli512bd005g0a233s1ogbgy',
          // AND status: 'ACTIVE'
      },
    })
  • s

    Stijn de Koning

    10/07/2019, 9:49 AM
    What would be the best way to achieve this?
  • s

    Stijn de Koning

    10/07/2019, 9:50 AM
    I could fetch it first, then check it, and then update, but I prefer doing it in a single transaction. Maybe there is a common design pattern for this?
  • k

    Kishan T.

    10/07/2019, 10:57 AM
    Is there a way to hide schema whilst querying via. GraphiQL. Seems like graphiql acknowledges schema mentioned in schema.graphql. Though upon searching or querying via. __schema it seems to expose all the types.
    k
    • 2
    • 1
  • j

    Josef Henryson

    10/07/2019, 4:55 PM
    I’m running Prisma 1 with MySQL in a local Docker. When I view my objects in MySQL created by prisma-client (via nexus) they have a time offset of 2 hours. I have tried to set Swedish region in MySQL but that does not change the time of created objects. Is there a Prisma setting for timezone anywhere? Or is there some other setting in MySQL I need to change 🤔 ? UPDATE: Ok, it seems like it is my nodejs environment that has to be configured properly. UPDATE 2: I managed to change TZ before I start my nodejs server, but time in DB is still ISO. Perhaps that is intended behavior?
    d
    • 2
    • 1
  • f

    Fransjo Leihitu

    10/07/2019, 5:29 PM
    hi all .. question about selecting fields using fragments (https://www.prisma.io/docs/prisma-client/basic-data-access/reading-data-TYPESCRIPT-rsc3/#selecting-fields) .. is there a way to exlcude fields? The fragment is great, but you need to supply all the fields you want, but I only want to exclude 1 (and or maybe more)
  • g

    gem

    10/08/2019, 10:44 AM
    prisma-eu is down or i missed a news ?
    d
    • 2
    • 1
  • d

    Dan Hollick

    10/08/2019, 10:51 AM
    getting the same
  • i

    inno

    10/08/2019, 3:34 PM
    Hi, who do i ask if i need help with a complex graphql query
1...317318319...637Latest