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

    Bram

    12/31/2018, 3:38 PM
    I'm gonna try CI/CD variables
  • c

    CCBCodeMonkey

    12/31/2018, 6:04 PM
    is
    prisma deploy
    supposed to run
    prisma generate
    ? because it doesn't seem to for me, seems nice if it would
    h
    • 2
    • 1
  • r

    roberto.guerra

    12/31/2018, 6:04 PM
    no, you have to run generate separately
  • c

    CCBCodeMonkey

    12/31/2018, 6:05 PM
    it also says it runs
    graphql get-schema -p prisma
    but doesn't actually generate the .graphql file.. I have to run the command separately
    h
    • 2
    • 2
  • c

    CCBCodeMonkey

    12/31/2018, 6:05 PM
    maybe its the order... maybe I need to run graphql prepare first
  • c

    CCBCodeMonkey

    12/31/2018, 6:06 PM
    also it seems to have issues with not overwriting the existing files, I have to delete the files sometimes or it says it updated them but didn't actually update them
  • e

    Eliezer Braun

    12/31/2018, 8:58 PM
    Keep on getting status
    booting
    for a long time. Then the status is:
    Not reachable
    Any ideas why? Is there any error logs, helpful messages? Is this meant to be complicated?
  • c

    CCBCodeMonkey

    12/31/2018, 11:20 PM
    is it possible to reference something created in the same mutation? i.e.:
    Copy code
    db.updateUser({
        where {
        userid:'123'
        }
        data: {
            posts: {
                create: {
                    name:'my new post'
                }
            },
            actions: {
                create:{
                    actionType: 'posted',
                    post: {
                        // somehow connect the above created post?
                    }
                } 
            }
        }
    });
    h
    • 2
    • 10
  • m

    Mitchell

    01/01/2019, 6:08 PM
    I'm working through the Hackernews tutorial and have a problem connecting to the demo server. I realized later you need to make Prisma account or the
    Prisma deploy
    step fails. This isn't obvious from the tutorial or the error message. https://www.howtographql.com/graphql-js/4-adding-a-database/
  • a

    Artur Malak

    01/01/2019, 6:55 PM
    I want to allow to edit box name only for its owner. I get unwanted "owner": "filed Variable '$where' expected value of type 'BoxWhereUniqueInput!' Reason: 'owner' Field 'owner' is not defined in the input type 'BoxWhereUniqueInput'"
    -.ts
    h
    • 2
    • 3
  • a

    Artur Malak

    01/01/2019, 7:06 PM
    how can I solve it? Please for help 😞
  • r

    Ruslan Baigunussov

    01/01/2019, 7:18 PM
    Hi everyone! I have an application written in .NET Core on the backend and Vue on the frontend. I used the REST API and recently decided to rewrite my server using GraphQL. I found a cool vue-apollo plugin that added GraphQL support to the client, and also created a GraphQL server on Node.js. I started migrating my application. Connected Sequelize, added description of entities in the database. And here it came to the declaration of types GraphQL. And I found that they completely copy the description of the entities in the database. I began to look for tools that will avoid duplication and will generate a schema for me based on the existing database. I found Postgraphile, Hasura and Prisma. I found that all of these tools require running a separate server to work. I wanted to add some middleware to an existing server, without running a separate instance. Can I use these tools this way or should I use something fundamentally different, like the GraphQL Code Generator? Thanks a lot
    c
    h
    • 3
    • 2
  • i

    Industrial

    01/01/2019, 9:18 PM
    Hi. https://www.prisma.io/docs/1.2/reference/migration-guides/authentication-and-authorization-yaeco6ieth using JWT does this mean you are not saving any token of the client session on the server side at all?
    l
    • 2
    • 2
  • i

    Industrial

    01/01/2019, 9:18 PM
    So I don't need to keep a redis server for user sessions etc?
  • c

    CCBCodeMonkey

    01/02/2019, 3:57 AM
    I've been writing an app using prisma and getting to the point I need to actually set up my servers and launch it, and now I'm wondering, it supports 3 databases now... Is one of them actually recommended? Is there a comparison of performance between the 3 specific to prisma, comparison of stability or features?
    h
    • 2
    • 3
  • z

    Zhao

    01/02/2019, 4:25 AM
    Hey guys, I have a question regarding prisma client
    updateMany
    . We use it to wrap deletions from two tables into one transaction, we also want to delete the relation between them. We are soft deleting so what we do is actually
    update
    TableA,
    updateMany
    TableB, and
    disconnect
    TableB. It turns out when we have both
    disconnect
    and
    updateMany
    in the same
    data
    object, the
    updateMany
    will be ignored. It seems there is some internal priorities and the disconnect was executed first? Is it a design choice or is it a bug? Thx!
    😧 1
    d
    • 2
    • 1
  • s

    shreyansh-zazz

    01/02/2019, 7:54 AM
    https://stackoverflow.com/q/54002875/10274910 Help me please.
    h
    • 2
    • 1
  • r

    rooneyK

    01/02/2019, 9:10 AM
    I have a question regarding the https://www.prisma.io/blog/graphql-server-basics-demystifying-the-info-argument-in-graphql-resolvers-6f26249f613a -post. For instance, one can add a custom resolver for a field, lets say
    Post.firstChars
    , which returns the first 10 characters of the
    title
    -field. This requires a fragment to be added on
    Query.posts
    which ensures that the field
    title
    is available. This works great when I am accessing the field through
    posts
    , ut for relations accessing
    Posts.firstChars
    , lets say through
    query{ users{ id posts{ title } } }
    , the fragment is of course not available. Is it possible to add the fragment in some other way, so that the field is always available, no matter the root-resolver?
    h
    • 2
    • 21
  • m

    Max Ast

    01/02/2019, 12:48 PM
    Does anyone know if I can make arrays in the datamodel unique? In this example, I want every room to have a set of allowed domains (e.g. prisma.io and prisma.com) and these domains must not be used by other rooms
    -.txt
    f
    • 2
    • 2
  • f

    fgreinus

    01/02/2019, 1:01 PM
    Hey! I'm about to deploy prisma in kubernetes on Google Cloud Platform. To do so I added a cloud sql proxy to access the Cloud SQL-Postgres Database. The proxy sidecar container works fine, but when the prisma container starts it says
    Exception in thread "main" org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in.
    I currently have no idea why.. any idea around here? 🙂
    h
    • 2
    • 4
  • m

    Mitchell

    01/02/2019, 6:02 PM
    I'm working through the Hackernews Express tutorial. In the section on Subscriptions the code snippet shows:
    Copy code
    subscription {
      newLink {
        node { 
          ...
        }
      }
    }
    Seems this should be:
    Copy code
    subscription {
      newLink {
        ...
      }
    }
    https://www.howtographql.com/graphql-js/7-subscriptions/
    h
    • 2
    • 1
  • a

    Artur Malak

    01/02/2019, 9:08 PM
    HI ❤️ Anybody tried TypeGraphQL with Prisma? I am not able to create even simple Query because schema definition is different then function implementation :C Without TypeGraphQL: users(filter: String): [User!]! + users(parent, args, context) With TypeGraphQL: @Query(returns => [User]) async users(parent, args, context): Promise<User[]> { ...} 😮 ?! Where is function implementation that is going to define schema too?
    l
    h
    • 3
    • 4
  • b

    Bardhi

    01/02/2019, 10:16 PM
    Hi guys, are there any best practices around passing in secrets to Prisma? I am looking into using AWS Secrets Manager to store my DB password. 1) Does Prisma provide out of the box support to read the password from an aws secret, assuming it runs on an instance and has the right permissions to read the secret? 2) If the answer to the above is no, is there a way to run a script that sets up the config file before Prisma starts? We’re running prisma in a k8s cluster using the
    prismagraphql/prisma:1.19
    docker image. I cannot find the source Dockerfile however and don’t want to reverse-engineer/rely on implementation details that might change
    h
    • 2
    • 5
  • s

    serum

    01/02/2019, 11:39 PM
    @divyendu sorry for the late reply - new years, and whatnot 😉 in the meantime, I also managed to find a solution to my issue:
    Copy code
    findBlasWithFooTextContaining: (_, { search }, ctx) => {
        return ctx.prisma
            .foos({
                where: {
                    text_contains: search
                }
            })
            .bla()
            .then((foos) => {
                return R.map(R.prop('bla'), foos);
            });
    }
    so the trick basically was to just shave off the unneeded
    Foo
    😉
    🙌 2
  • e

    Eivind

    01/03/2019, 8:13 AM
    Hey there! How should I achieve the following: We have Users and an object X. There exists several Xs, and the User can have a collection with any number of Xs. How could I create the link between the X and the User? Should I have a "Connection" type that refers to a UserID and an X-Id? And how could I add to the collection with a mutation. Sorry if this is really dumb question, I've been reading the docs and googling but haven't found what I'm looking for 😕
    • 1
    • 2
  • a

    Andrew Meyer

    01/03/2019, 8:29 AM
    Hello, i'm having a bit of an issue with the GraphQL Playground desktop app. I want to setup a .graphqlconfig with environment variables, but I can't seem to set them. I am on Mac OS and have attempted to set them with "launchctl setenv", but they seem to not be readable. Anybody have any light to shed on this situation?
  • a

    Andrew Meyer

    01/03/2019, 8:50 AM
    Just solved my own problem. After reading the source code it seems that environment variables are read from a .env file. After creating one next to my .graphqlconfig file, it all works.
    👍 1
  • m

    Marvin Jude

    01/03/2019, 11:40 AM
    Please when actually should i use prisma?
  • m

    Marvin Jude

    01/03/2019, 11:41 AM
    A link to a blog post or so will be appreciated ☺️
  • s

    Stef

    01/03/2019, 12:20 PM
    Having some pretty huge difficulties trying to migrate from Graphcool to Prisma. For a few weeks now I’ve been trying to get a new setup on Prisma going with the same schema as Graphcool, and a Yoga server in front of it. I now have a node/React app that talks to Yoga on a Heroku instance, which talks to a Prisma server also on Heroku. Even under a tiny amount of traffic, after a short while, the Prisma server ends up with 30000ms runtime executions that get timed out, and then H12 errors across the board. This is without any load other than just me running a quick test of my existing code, which uses server side subscriptions and google cloud functions. I’m at a loss as to what to do here because the Prisma instance is something of a mystery black box. Has anyone seen similar and able to point me in the right direction of how to work out what’s going wrong?
    👀 1
    m
    d
    • 3
    • 13
1...182183184...637Latest