https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • g

    guille

    02/13/2018, 9:09 PM
    I'm starting to develop a new app, should I use Graphcool or Prisma?
  • g

    guille

    02/13/2018, 9:09 PM
    if I choose Prisma, what cloud service should I use to host my database?
    d
    • 2
    • 1
  • r

    Ramsay Lanier

    02/13/2018, 9:53 PM
    hi all, I have a Prisma question. I’m struggling to figure out how to get the result of a database query in a sub query.
  • r

    Ramsay Lanier

    02/13/2018, 9:53 PM
    -.txt
  • r

    Ramsay Lanier

    02/13/2018, 9:53 PM
    here is a Game type and I want
    ruleCount
    to return an aggregation
  • r

    Ramsay Lanier

    02/13/2018, 9:54 PM
    or rather the result of an aggregation which would be count, which is an Int
  • r

    Ramsay Lanier

    02/13/2018, 9:55 PM
    -.txt
  • m

    matic

    02/13/2018, 10:00 PM
    @Ramsay Lanier you can use
    info
    parameter as the second argument of
    .query
    Copy code
    count: {
          fragment: `fragment LikesCount on Post { id }`,
          resolve: async ({ id }, args, ctx: Context, info) => {
             const likes = await ctx.db.query.likesConnection(
                { where: { post: { id } } },
                ` { aggregate { count } } `,
             )
    
             return likes.aggregate.count
          }
       },
  • r

    Ramsay Lanier

    02/13/2018, 10:03 PM
    oh man I feel dumb - thanks!
    m
    • 2
    • 1
  • p

    patstrz

    02/13/2018, 11:20 PM
    I followed the graphcool blog post for prisma deployment with zeit now ( https://blog.graph.cool/deploying-graphql-servers-with-zeit-now-85f4757b79a7 ) and deployment fails with the following output:
    Copy code
    > Building
    > ✓ Installed 914 modules [12s]
    > ▲ npm run build
    > > test-ts-server@ build /home/nowuser/src
    > > rimraf dist && tsc
    > node_modules/graphql-yoga/dist/src/types.d.ts(6,37): error TS2307: Cannot find module 'graphql-subscriptions/dist/subscriptions-manager'. `
    any ideas what to do with this? I’m using graphql-yoga version 1.2.4
    n
    • 2
    • 4
  • t

    tbrannam

    02/14/2018, 2:48 AM
    i'm working to Grok how to use
    withFilter
    on top of a subscription
    Copy code
    const newLink = {
       subscribe: (parent, args, ctx, info) => {
         return ctx.db.subscription.link(
           { },
           info,
         )
       },
    }
  • t

    tbrannam

    02/14/2018, 2:50 AM
    my understanding is that
    subscribe
    expects an AsyncIterator result - so I've assumed that's what
    ctx.db.subscription.link
    would do
  • t

    tbrannam

    02/14/2018, 2:51 AM
    which would suggest that I should be able to wrap all of that as the first arg to
    withFilter((parent.....)
    but this yields an error stating that
    next
    isn't implemented - so I'm confused
  • t

    tbrannam

    02/14/2018, 2:52 AM
    does Prisma have a different behavior for this interface?
  • j

    jesper

    02/14/2018, 2:59 AM
    Hi, can anyone tell me if I can create a node and have graphcool lookup a user based on an email, and if it finds one add the user as a reference?
  • m

    Mr.niko.la

    02/14/2018, 5:05 AM
    '''Please choose the cluster you want to deploy "my-app@dev" to Added cluster: local to prisma.yml Creating stage dev for service my-app ! ▸ Could not connect to cluster local. Please use prisma local ▸ start to start your local Prisma cluster.'''
    n
    • 2
    • 2
  • m

    Mr.niko.la

    02/14/2018, 5:05 AM
    is this due to docker-compose?
  • m

    Mr.niko.la

    02/14/2018, 5:05 AM
    i had a hard time getting the latest docker-compose on my ubuntu 17.10
  • m

    Mr.niko.la

    02/14/2018, 5:06 AM
    curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-
    uname -m
    > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
  • m

    Mr.niko.la

    02/14/2018, 5:06 AM
    is not installing the latest docker-compose
  • m

    Mr.niko.la

    02/14/2018, 5:06 AM
    pretty strage there is no simple way to install docker-compose in linuxz
  • m

    Mr.niko.la

    02/14/2018, 5:22 AM
    k running docker-compose 1.19
  • m

    Mr.niko.la

    02/14/2018, 5:25 AM
  • m

    Mr.niko.la

    02/14/2018, 5:26 AM
    is this what i am supposed to see running the node.js quickstart
  • g

    gihrig

    02/14/2018, 8:42 AM
    Hi everyone! I’m working through How To GraphQL/NODEJS. At the end of chapter 5 “Signup & Login” it is assumed that I know how to use the “vote” mutation to create a vote. But I’m totally lost on this. If someone could post a working vote mutation as it would be used to create a new vote in the Playground, that would be most helpful! Thanks 😅
    h
    n
    • 3
    • 3
  • g

    gihrig

    02/14/2018, 8:50 AM
    @nikolasburk The last line of that chapter, literally is: “That’s it! You can now restart the server and send the vote mutation in your app Playground.” Am I supposed to know how format this mutation at this point?
    n
    • 2
    • 6
  • g

    gihrig

    02/14/2018, 8:52 AM
    @nikolasburk
    I believe
    vote
    mutations are only covered in the following chapter
    OK, I’ll move on then, ignoring this line. Thanks for the rapid reply 😄
  • w

    wallslide

    02/14/2018, 11:02 AM
    I'm using
    graphql-yoga
    . Looking for insight on how to programmatically control if a field gets returned or not:
    Copy code
    type Event {
     id: ID!
     adminOnlySecret: String
    }
    How do I write a resolver that returns/hides
    adminOnlySecret
    using
    graphql-yoga
    , depending on something like whether the person requesting the
    Event
    is an admin or not?
    a
    • 2
    • 30
  • r

    romshark

    02/14/2018, 11:32 AM
    Guys, any idea how I could embed GraphQL Playground (https://github.com/graphcool/graphql-playground/) into our Golang API server without any extra server? Currently I've got an embedded GraphiQL webapp served by the debug version of the API server which is directly embedded into the servers code as a source-file-string with CDN links, is the same possible with GraphQL Playground?
    a
    h
    • 3
    • 15
  • r

    romshark

    02/14/2018, 1:15 PM
    Yet another problem with GraphQL Playground: We've got a https://github.com/neelance/graphql-go server running, and there is a special HTTP endpoint /debug which is dev-build-only, it skips permissions and allows to do basically everything on the API. On startup I get the following error when connecting to http://localhost:8080/debug/
    Copy code
    Introspection must provide input type for arguments.
    Queries do work fine, but there's no schema docs available, the schema introspection doesn't work. Just googled the error and didn't find anything useful... any ideas what this might be caused by? Did the GQL standard change? Is it the library's fault? Or is it mine?
1...572573574...637Latest