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

    timm

    06/06/2018, 8:29 PM
    does anyone know how to do NDF import of relations that are many to one or many to many? the example given https://www.prisma.io/docs/reference/data-import-and-export/normalized-data-format-teroo5uxih#relations is a one to one
  • j

    James Bellamy

    06/06/2018, 11:50 PM
    Has anyone managed to get pgRelations and the array relation type fields to work for a postgres existing db?
  • t

    timm

    06/06/2018, 11:55 PM
    if i have something like
    songs: [Song!]! @relation(name: "ArtistOnSong", onDelete: SET_NULL)
    in my data model, does the
    [Song!]!
    enforce that I must have at least one Song in an array type, or just an array type?
    c
    • 2
    • 3
  • e

    emma

    06/07/2018, 9:39 AM
    Does anyone have a text list (not logos) of companies using GraphQL in production? 🙂
  • n

    nikolasburk

    06/07/2018, 9:43 AM
    @emma
    -.txt
  • u

    user

    06/07/2018, 9:44 AM
    A file was commented on
  • u

    user

    06/07/2018, 9:44 AM
    A file was commented on
  • e

    emma

    06/07/2018, 9:44 AM
    Thanks 🙂
  • w

    weakky

    06/07/2018, 9:46 AM
    Hey there. I’m building an ecommerce app using Prisma, which will in the end have several shops. Do you think it’d be better to gather everything on the same prisma api/db (using a
    Shop
    model that would have it’s own products/orders/customers etc, etc (like Shopify is doing)), or to split all shops into their own prisma/db, and when the user choose his shop (on sign-in), store a link on the
    User
    model that would contain let’s say the graphql-endpoint of the chosen shop ?
    k
    a
    h
    • 4
    • 43
  • s

    siyfion

    06/07/2018, 10:29 AM
    Is there going to be support in
    graphql-yoga
    for handling thrown errors, and returning them to the client in a nicely formatted way? A la Apollo Server 2.0?
    w
    m
    n
    • 4
    • 9
  • c

    Corjen

    06/07/2018, 11:19 AM
    Hi! I have a prisma instance running on Digital Ocean and included the managementApiSecret in
    docker-compose.yml
    . The
    /management
    endpoint is protected, but my projects aren't. How do I enforce that the management secret is checked on queries and mutations on one of the projects? Seems like the public/private keypair authentication is deprecated since 1.8?
    n
    • 2
    • 4
  • g

    glennreyes

    06/07/2018, 1:20 PM
    Hey all! I’ve just created a database model for a CRM app. Now I’d want to seed it with fake data with
    faker
    . As far as I understood
    prisma seed
    supports NDF files only for now. Since there’s no
    createManyX
    my idea was to create a script that runs
    createX
    multiple times but that’s way less than ideal. What’s common practice for seeding the DB with fake data out of a JS object using
    faker
    ?
    p
    • 2
    • 2
  • h

    hamdi

    06/07/2018, 1:42 PM
    i can use 2 mutation in the same component in react
    h
    • 2
    • 5
  • h

    hez

    06/07/2018, 3:08 PM
    Stupid GraphQL Questions with Hez™: Let's say I have the following schema:
    Copy code
    type Thing {
      thingID: String!
      createdAt: DateTime!
      updatedAt: DateTime!
      thingProfile: ThingProfile
    }
    
    type ThingProfile {
      thingID: String
      thingPropertyA: String
      thingPropertyB: String
    }
    
    type Mutation {
      createThingProfile(
        thingID: String
        thingProfile: ThingProfile
        ): Thing
    }
    And I want to add a
    profile
    to a
    thing
    that was not initialized with a
    profile
    ...using a mutation on the
    thing
    .... how would I do this? This feels like it should be possible...but I'm stumbling on the config
    n
    • 2
    • 3
  • h

    hez

    06/07/2018, 3:08 PM
    If possible, I want to avoid using GraphQL/Prisma's native
    id: ID!
  • h

    hez

    06/07/2018, 3:15 PM
    I'm starting to fear that the last part there may not be possible....?
  • l

    lucasbento

    06/07/2018, 4:10 PM
    is there a way to add hooks to `prisma-bindings`/`graphql-bindings`? like a
    beforeCreate
    or
    afterQuery
    n
    • 2
    • 2
  • d

    Dorkside

    06/07/2018, 5:13 PM
    Trying to understand why my dockerized graphql-yoga in front of prisma is not working.
  • d

    Dorkside

    06/07/2018, 5:13 PM
    Copy code
    [Metrics] Warning: no metrics will be recorded.
    java.lang.RuntimeException: ProjectHelper: Could not resolve project with id: graphql$default
            at scala.sys.package$.error(package.scala:27)
            at com.prisma.subscriptions.helpers.ProjectHelper$.$anonfun$resolveProject$1(ProjectHelper.scala:13)
            at scala.util.Success.$anonfun$map$1(Try.scala:251)
            at scala.util.Success.map(Try.scala:209)
            at scala.concurrent.Future.$anonfun$map$1(Future.scala:287)
            at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
            at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
            at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
            at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
            at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
            at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
            at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
            at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
            at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
            at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:43)
            at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
            at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
            at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
            at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
    Anyone know what this means ? I'm guessing it's something I may have initiliazed wrong but I just can't seem to find what.
    n
    • 2
    • 3
  • j

    jaybauer

    06/07/2018, 6:01 PM
    Quick question guys: If I have a query like
    feed(where: { input: 'String' }) { id }
    for example, how would I structure this to return a result for multiple possible
    input
    values? Something like
    feed(where: { input: 'String' OR 'OtherString' }) { id }
    .
    w
    • 2
    • 2
  • a

    alec

    06/07/2018, 6:41 PM
    Has anyone successfully implemented a custom resolver and is willing to share the code? Im having so much trouble. Every time i perform an async action within the resolver it returns null
    m
    • 2
    • 5
  • n

    noahdavis

    06/07/2018, 6:45 PM
    Is prisma.io down?
    w
    n
    • 3
    • 6
  • h

    hez

    06/07/2018, 6:53 PM
    How does one query relational MySQL data with prisma-binding?
  • h

    hez

    06/07/2018, 6:53 PM
    I keep getting
    null
    for nested objects
    n
    • 2
    • 2
  • w

    weakky

    06/07/2018, 7:01 PM
    Any reasons why this mutation would give me the following error:
    No Node for the model Shop with value cji4szvj4000h08543s2qehgk for id found.
    ? The shopId IS valid, and so is the product id.
    Sans_titre.txt
  • h

    harrisrobin

    06/07/2018, 8:46 PM
    Upgraded Prisma to latest and getting a bunch of errors like:
    n
    • 2
    • 2
  • h

    harrisrobin

    06/07/2018, 8:46 PM
  • u

    user

    06/07/2018, 8:49 PM
    A file was commented on
  • q

    qsys

    06/07/2018, 9:29 PM
    so, this is the flow: 1. auth0 login -> auth0 token 2. auth0 token -> graphcool token (JWT) 3. request external app -> verification of graphcool JWT However, for the last step, since graphcool is using HS256 (right?), I need the server secret (that was used to generate the token). Where can I find the secret for verification? (I prefer to use the graphcool token, since I need the payload as well. If I have to use the auth0 JWT, I have to make an extra call to auth0 every time...)
  • b

    brant

    06/07/2018, 9:33 PM
    Is there anyone around that could help me out with a simple deploy to
    now
    ?
    m
    n
    • 3
    • 77
1...505152...637Latest