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

    impowski

    11/01/2018, 9:50 PM
    What will be the best way to test prisma resolvers?
  • m

    Martin Hunt

    11/01/2018, 11:10 PM
    Hello all. Looking at this section of the docs... What WOULD be the correct way to go about this? Getting all users with the related links populated?
    • 1
    • 1
  • r

    RVM

    11/02/2018, 1:27 AM
    Hi, I am using Prisma with GraphQL for the database of my application and ran into the bug with mutations creating duplicate data, (mentioned here https://www.prisma.io/forum/t/deployed-graphql-yoga-server-creating-duplicate-entries-in-database/4743/2). I was just wondering if there has been any update on the status of this bug? This has really hindering back my team's work, so just wanted to check in regarding this!
  • a

    Andres Montoya

    11/02/2018, 4:31 AM
    Hi, someone use typeorm of Nodejs?
    h
    l
    • 3
    • 12
  • z

    Zefex Developer

    11/02/2018, 4:34 AM
    I was wondering if it's safe to use nested mutations like in graphcool where you can call
    createBook
    and also specify the
    chapters
    for this book in on single mutation.
  • s

    Serhii Kyrychenko

    11/02/2018, 9:22 AM
    https://clip2net.com/clip/m34216/820d9-clip-65kb.png?nocache=1 When I saw it, I immediately ❤️ it
    👍 3
    🙌 4
  • m

    macieks

    11/02/2018, 12:12 PM
    Hi, I’m trying to start with prisma but each way I try i’m running into errors. I’ve tried also graphql-cli but without luck.
    Copy code
    ? Set up a new Prisma server or deploy to an existing server? Create new database
    ? What kind of database do you want to deploy to? MySQL
    ? Select the programming language for the generated Prisma client Prisma JavaScript Client
    
    Created 3 new files:                                                                          
    
      prisma.yml           Prisma service definition
      datamodel.prisma    GraphQL SDL-based datamodel (foundation for database)
      docker-compose.yml   Docker configuration file
    
    Next steps:
    
      1. Start your Prisma server: docker-compose up -d
      2. Deploy your Prisma service: prisma deploy
      3. Read more about Prisma server:
         <http://bit.ly/prisma-server-overview>
    internal/modules/cjs/loader.js:594
        throw err;
        ^
    
    Error: Cannot find module 'generate'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:592:15)
        at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1278:46)
        at Function.Module._load (internal/modules/cjs/loader.js:518:25)
        at Function.Module.runMain (pkg/prelude/bootstrap.js:1307:12)
        at startup (internal/bootstrap/node.js:274:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:608:3)
    r
    • 2
    • 1
  • p

    prolink007

    11/02/2018, 3:21 PM
    I am trying to get subsccriptions working. I have a prisma, node, graphql-yoga back end that is running and working. I can go to the playground and subscribe to my subscription and it works great. However, when i try to subscribe on my front end (angular, apollo-angular, apollo-client) it does not work. The subscription never fires and nothing happens. I am also not finding any examples or documentation on how to set up an angular front end to work with the subscriptions. Is there any configuration i need to do with the http links with apollo? If someone could just point me to a good guide, i would love to take a look at it. thanks
    ⁉️ 1
    h
    • 2
    • 91
  • e

    emattias

    11/02/2018, 3:41 PM
    How can I access react context in a apollo client middleware?
  • y

    yolen

    11/02/2018, 3:53 PM
    I really appreciate the kubernetes tutorial https://www.prisma.io/tutorials/deploy-prisma-to-kubernetes-ct13/. Only thing that troubles me (so far...) as a Kubernetes newbie is how to inject secrets / env vars into teh PRISMA_CONFIG part of the configMap i.e. :
    Copy code
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: prisma-configmap
      namespace: prisma
      labels:
        stage: production
        name: prisma
        app: prisma
    data:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: mysql
            host: database
            port: 3306
            user: root
            password: prisma
            migrations: true
    i.e. if I had a secret or an env var e.g. in .env file describing my db password how do I then inject that into the configMAP?
    h
    m
    • 3
    • 64
  • m

    mablek

    11/02/2018, 4:24 PM
    hello 🙂 thank you for the invite
  • m

    mablek

    11/02/2018, 4:26 PM
    does anyone else have the same issue, not been able to see their services on the console?
    h
    b
    e
    • 4
    • 8
  • z

    Zefex Developer

    11/02/2018, 4:42 PM
    I was wondering if it's safe to use nested mutations like in graphcool where you can call
    createBook
    and also specify the
    chapters
    for this book in on single mutation.
  • n

    Nick

    11/02/2018, 6:16 PM
    Guys I'm considering make pull-request https://facebook.github.io/create-react-app/docs/integrating-with-an-api-backend To include a section about the graphql-boilerplates. That I found amazing and I think more people should use them to build APIs. Please help me to improve this text English is my second language.
    Adding_Prisma_reference_in_CRA_.md
  • r

    Rachel

    11/02/2018, 8:15 PM
    Hi, I'm new to Prisma. Is it possible to connect Prisma to an existing Mongo replica set hosted on Atlas ( https://www.mongodb.com/cloud/atlas )? The Mongo Connector Preview docs ( https://github.com/prisma/Mongo-Connector-Preview ) don't seem to cover this. Thanks!
    a
    t
    +4
    • 7
    • 6
  • a

    Al

    11/02/2018, 9:37 PM
    Hi all, I am developing a project based on prisma where I can insert variable data model and for this reason then I need to call the relative mutation and query, but with a variable name like ctx.db.mutation.create{id}(...). Can someone recommend me the right way to do this? Or some other tip are accepted. Bye
  • d

    dspacejs

    11/03/2018, 2:35 AM
    I want to use Prisma or Graphcool for my API. Apparently Prisma is a better choice, but I don't want to manage infrastructure so maybe it's not right for me apparently you can deploy Prisma easily with Now (https://zeit.co/now) by zeit.co. But you still need to setup Docker etc. and container instances. so it seems like I'd have to manage all of that
    h
    d
    • 3
    • 2
  • d

    dspacejs

    11/03/2018, 2:36 AM
    so what do you guys recommend? Zeit claims Now is serverless. but how can that be true if you need to manage Docker? how is it going to do things like automatically scale my DB instances, share data between them, and make them globally available
    f
    h
    n
    • 4
    • 3
  • a

    Akira Laine

    11/03/2018, 4:37 AM
    Hey everyone, I'm trying to create a server w/ Heroku on the Primsa dashboard. Creating a DB works fine, but when I get to the server part and click
    Create a server
    , it throws an error saying
    GraphQL error: Invalid Version: 1.17
    . Any ideas on whats going on?
    t
    d
    • 3
    • 4
  • j

    jamiehalvorson

    11/03/2018, 10:34 AM
    Hey everyone, I’ve got a general Node question rather than Prisma. I want to trigger notifications and emails at certain times, e.g a 2 days after a user has watched a video or clicked a button. Does anyone have any recommendations about queuing these kind of jobs in Node? My initial thinking was to create a micro-service and use something like https://www.npmjs.com/package/cron? Any pointers would be greatly appreciated, and if you think this question is better suited somewhere else just say and I’ll post it there! Thanks 👍
    m
    m
    • 3
    • 5
  • e

    emattias

    11/03/2018, 1:24 PM
    I am now using addMockFunctionsToSchema to mock the whole gql api. Now part of the api is built. How can I mock only the parts that isn't built yet and have the built parts use the real api?
  • m

    Martin Hunt

    11/03/2018, 4:17 PM
    Hey all, super excited to spend the weekend learning more about Prisma / graphQL. I'm wondering what is the best way of grabbing the total count of related nodes in a query? For example, if I have a query like this:
    Copy code
    query GET_CATEGORIES{
    	categories {
        name
        id
        description
        posts {
          id
        }
      }
    }
    What I really need from the posts is the total count of the posts assigned to each category. Right now I'm just calling posts.length on the returned array of ID's but I'm guessing that's not particularly future proof / scalable. Any help would be massively appreciated!
    j
    y
    • 3
    • 4
  • a

    andrew

    11/03/2018, 8:12 PM
    Does Prisma server support the apollo-tracing exposed in the playground?
  • a

    adebiyial

    11/03/2018, 9:08 PM
    Hey people. I've been battling with a challenge. I lost my prisma.graphql file and after deploying over again, it doesn't get regenerated. What could be a possible solution to this?
    ✅ 1
    s
    • 2
    • 7
  • b

    Braden

    11/03/2018, 9:25 PM
    Are there heroku-compatible docker images for prismagraphql-prod? I'd really like to be able to deploy a prisma instance with the managementApi disabled and supply my own RabbitMQ url.
  • a

    arturgvieira

    11/03/2018, 10:08 PM
    Hi I have a dependency vulnerability. Currently unable to fix.
  • a

    arturgvieira

    11/03/2018, 10:12 PM
    Anyone able to help, here is the Audit.
    h
    • 2
    • 2
  • l

    Luca Rath-Heel

    11/03/2018, 11:30 PM
    Hi, what is the best way to model a tree that can contain groups and items? Limitation: items may not have children.
    -.erl
    a
    • 2
    • 4
  • i

    impowski

    11/04/2018, 12:21 AM
    Does anyone have an idea how I can fix this:
    Copy code
    test('create new user', async t => {
      const res = await client.request(
        print(signupMutation), { name: 'Test', email: '<mailto:test@test.com|test@test.com>', password: 'test'}
      )
      t.truthy(res.signup.user);
      const user = await prisma.deleteUser({
          id: res.user.id
      })
      console.log(user)
      t.truthy(user)
    })
    If
    const res
    doesn’t have
    any
    it’s not running tests properly
    h
    • 2
    • 2
  • g

    Gorodov Maksim

    11/04/2018, 7:16 AM
    Hey guys! I remember dokku tutorial needed some improvements because I tried it a while ago but it didn't work. Were these improvements added or not? 🙂 I believe creator is here but I cannot remember his username... maybe @w0wka91?
    🙌 1
    w
    • 2
    • 53
1...148149150...637Latest