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

    Ty Holbrook

    10/04/2018, 7:38 PM
    Anyone else having "Failed to Fetch" on GraphCool?
    t
    • 2
    • 6
  • s

    seandeveloper

    10/04/2018, 8:52 PM
    Hi guys sorry for this ultra noob question, is prisma the new graph.cool
  • s

    seandeveloper

    10/04/2018, 8:52 PM
    is it made by the same people looking to replace graph.cool?
  • s

    seandeveloper

    10/04/2018, 9:01 PM
    Also is there an authentication module, or a way to quickly implement auth services like in AppSync (AWS Amplify or Firebase)?
    j
    t
    • 3
    • 3
  • d

    donedgardo

    10/04/2018, 10:07 PM
    I think I don't like this new way of querying relation data Docs:
    Copy code
    // A `main` function so that we can use async/await
    async function main() {
    
      // Read the previously created user from the database and print their posts to the console
      const postsByUser = await prisma
        .user({ email: "<mailto:bob@prisma.io|bob@prisma.io>" })
        .posts()
      console.log(`All posts by that user: ${JSON.stringify(postsByUser)}`)
    
    }
    What if i wanted to query the posts and something else like books. How would i do that? would it require two round trip requests
    Copy code
    const postsByUser = await prisma
        .user({ email: "<mailto:bob@prisma.io|bob@prisma.io>" })
        .posts()
    const booksByUser = await prisma
        .user({ email: "<mailto:bob@prisma.io|bob@prisma.io>" })
        .books()
    We loose the info way of only one query to get all data...
    Copy code
    {
        id
        posts {
           id
        }
       books {
         id
       }
    }
    fast parrot 1
    👍 1
    h
    g
    d
    • 4
    • 7
  • h

    hinsxd

    10/05/2018, 5:18 AM
    hi everyone
    👋 1
  • h

    hinsxd

    10/05/2018, 5:20 AM
    I was trying to follow various "official" tutorials provided by the old graphcool and new prisma, and found out that the packages and docs are pretty messy.
  • h

    hinsxd

    10/05/2018, 5:22 AM
    The Prisma team tries to push new thingy to the public while not announcing old stuff as deprecated.
  • h

    hinsxd

    10/05/2018, 5:22 AM
    Just as they abandoned graphcool in favor of prisma
  • h

    hinsxd

    10/05/2018, 5:25 AM
    Now, it seems that some boilerplates from a few months ago still used
    prisma-binding
    but new "official examples" are using
    prisma-client
    v1.17
  • h

    hinsxd

    10/05/2018, 5:26 AM
    Can someone please tell me what stack of tools should I use to start a new Prisma Project?
    d
    n
    • 3
    • 7
  • m

    makarst

    10/05/2018, 9:09 AM
    Hello everyone, I’m facing this very weird issue where I did the following: 1. Introduced a new optional Int field to an existing Prisma server 2. Now I want to run a manual migration by using “updateMany” mutation and I get an error “<field> is not defined in the input type” However, I can see that field defined in Playground. Moreover, I am able to run a regular update mutation (not a batch one) on a single item. Also, I am able to run this batch mutation with a local docker. Have any of you encountered this type of behaviour? This is really weird.
    ✅ 1
    👍 1
    n
    • 2
    • 5
  • v

    Vinnie

    10/05/2018, 9:36 AM
    when running prisma locally via Docker
  • v

    Vinnie

    10/05/2018, 9:36 AM
    is it possible to connect to Postgres with a client?
  • v

    Vinnie

    10/05/2018, 9:36 AM
    I’ve forwarded the port, and used the credentials specified in the docker file
  • v

    Vinnie

    10/05/2018, 9:36 AM
    but I get connection refused
    n
    • 2
    • 1
  • s

    Sach97

    10/05/2018, 12:23 PM
    Hello everyone, does someone have experienced writing nested object write queries using go-client ? If so, can someone help me with a snippet ?There is the doc for typescript https://www.prisma.io/docs/prisma-client/basic-data-access/writing-data-TYPESCRIPT-rsc7/#nested-object-writes but not for golang.
  • v

    val

    10/05/2018, 2:40 PM
    I have an issue with paging not working correctly. I have a datamodel like
    Copy code
    type User {
        id: ID! @unique
        numFollowers: Int! @default(value: "0")
    }
    I then try to run a query like:
    Copy code
    return ctx.db.query.users({
                    orderBy: "numFollowers_DESC",
                    after: afterId,
                    first: pageSize
                });
    But if i run with an
    afterId
    that's not null I don't get valid results. I sometimes get duplicates, sometimes nothing
    👍 1
    n
    • 2
    • 9
  • c

    calvin

    10/05/2018, 2:56 PM
    sorry I have a noob question in regards to prisma. We are migrating from graph.cool to prisma. Is it correct that we need to implement our own resolvers for prisma? Just wondering as in graph.cool this was abstracted away. Any help is much appreciated. Thanks
    n
    • 2
    • 1
  • o

    O

    10/05/2018, 6:31 PM
    Hi! Do you know why npm shows 1.17.1 version while current stable is 1.17.2?
    e
    a
    n
    • 4
    • 4
  • f

    Fi1osof

    10/05/2018, 7:02 PM
    Just leave it here... https://www.prisma.io/forum/t/prisma-cms-boilerplate/4604
    👌 3
  • s

    Stef

    10/06/2018, 7:50 AM
    Woah! I’ve been happily paying $35/month for my graphcool subscription and suddenly this month it billed me for $450 because of the new way that pricing is calculated. @nilan who can I talk to about this please? I’ll have to immediately shut down my side project.
    😮 4
    n
    b
    • 3
    • 2
  • f

    Fabio Rizzello

    10/06/2018, 3:15 PM
    how can I do more powerful migrations with prisma? MIgrations that go beyond ranaming
    n
    • 2
    • 1
  • g

    Greyson

    10/06/2018, 6:03 PM
    Hey, so maybe this is just a general GraphQL question, but I'm trying to do some basic relations with Prisma. The relation is as follows: There is a table that stores Users and a table that stores Vehicles. A single Vehicle can belong to many Users, and each User can configure things like the display name of that Vehicle. So my schema looks like this:
    Copy code
    type User {
      id: ID! @unique
      ...
      assets: [UserAsset!]!
    }
    
    type Asset {
      assetId: String! @unique
      assetType: AssetType
    }
    
    type UserAsset {
      asset: Asset!
      name: String!
    }
    Is this the proper way to go about something like this?
  • g

    Greyson

    10/06/2018, 6:03 PM
    The problem is I'm finding it hard to do things like: "If an asset is deleted remove it from any users that have that asset"
  • z

    zebapy

    10/06/2018, 6:41 PM
    ive deployed an app to digital ocean to learn but now my mutations are creating double entries in the db? this is the code https://github.com/zebapy/fs-prisma
    d
    • 2
    • 1
  • a

    aroman

    10/06/2018, 7:37 PM
    Hi! I've been having an issue where I am trying to query all of something. Let's say users. such as:
    Copy code
    export const userQueries = {
        async fetchUsers(_, {}, ctx) {
            console.log(await ctx.db.users())
            return ctx.db.users();
        }
    };
    but on playground it tells me:
    "message": "Cannot return null for non-nullable field User.firstName.",
    However, that
    console.log
    I have there does log out the object. Is there something I'm missing?
    h
    • 2
    • 5
  • n

    Nick

    10/06/2018, 11:36 PM
    The angular boilerplate https://github.com/graphql-boilerplates/angular-fullstack-graphql says that it is outdated and points people to the react one. Any idea when it will be updated react and angular kinda two different frameworks... Update have notice that someone made a
    pull-request
    trying to update the code https://github.com/graphql-boilerplates/angular-fullstack-graphql/pull/140
    k
    • 2
    • 3
  • l

    lyteq

    10/07/2018, 11:58 AM
    Guys, what's going on with
    graphql-yoga
    ? It's seems abandoned and not updated for months: https://github.com/prisma/graphql-yoga/issues/449
  • s

    signor_busi

    10/07/2018, 12:23 PM
    Is there a way to use the prisma client from nodejs directly instead of over the prisma cli?
    u
    w
    • 3
    • 2
1...131132133...637Latest