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

    lani

    03/11/2018, 7:16 PM
    Is there a graphql file with all the built in types in Prisma? I'm using a graphql language server with Visual Studio Code. And it complains about the built in types, for example:
    Unknown directive "unique". (KnownDirectives)
    . Edit: Also posted it on the forum: https://www.graph.cool/forum/t/location-of-graphql-definitions-for-built-in-types-in-prisma/2808
  • v

    Vdrizzle

    03/11/2018, 8:33 PM
    Im trying to create new tables from the node-advanced boilerplate but prisma seems just to be stuck deleting relationships the console says
    Copy code
    PostToUser (Relation)
      - Deleted relation between undefined and undefined
    and its stuck applying changes. Any ideas?
    h
    • 2
    • 2
  • j

    jefe_spain

    03/11/2018, 8:34 PM
    sorry guys, I’m quite new. Any good in depth tutorial about schemas?
  • p

    pnicolaou

    03/11/2018, 8:42 PM
    Hey I am trying to create a simple followers and following logic on type User but it doesn’t work =/ This is what my model looks like
    Copy code
    type User {
      id: ID! @unique
      createdAt: DateTime!
      username: String! @unique
      following: [User!]!
      followers: [User!]!
    }
    And when I do prisma deploy I get User ✖️ The relation field
    following
    must specify a
    @relation
    directive:
    @relation(name: "MyRelation")
    ✖️ The relation field
    followers
    must specify a
    @relation
    directive:
    @relation(name: "MyRelation")
    If I edit the model to look like
    Copy code
    type User {
      id: ID! @unique
      createdAt: DateTime!
      username: String! @unique
      following: [User!]! @relation(name: "Following")
      followers: [User!]! @relation(name: "Followers")
    }
    I get UnhandledPromiseRejectionWarning: Error: Whoops. Looks like an internal server error.
    t
    • 2
    • 5
  • a

    aeblin

    03/12/2018, 1:22 AM
    Hey there, using
    grapqhl-yoga
    right now and getting errors on import, as if it’s not compiling properly into ES6. Is babel not configured for that as part of
    grapqhl-yoga
    ?
  • a

    aeblin

    03/12/2018, 1:30 AM
    Seeing as the hello-world examples fail if converted from require to import, I’m feeling like the answer is that babel isn’t configured initially.
  • a

    aeblin

    03/12/2018, 3:07 AM
    Anyone around to point out how to enable import statements in
    graphql-yoga
    and resolve the following?
    Copy code
    (function (exports, require, module, __filename, __dirname) { import { GraphQLServer } from './graphql-yoga';
                                                                  ^^^^^^
    
    SyntaxError: Unexpected token import
        at createScript (vm.js:80:10)
        at Object.runInThisContext (vm.js:139:10)
        at Module._compile (module.js:588:28)
        at Object.Module._extensions..js (module.js:635:10)
        at Module.load (module.js:545:32)
        at tryModuleLoad (module.js:508:12)
        at Function.Module._load (module.js:500:3)
        at Function.Module.runMain (module.js:665:10)
        at startup (bootstrap_node.js:187:16)
        at bootstrap_node.js:607:3
    error An unexpected error occurred: "Command failed.
    Exit code: 1
    Command: sh
    Arguments: -c node .
  • a

    aeblin

    03/12/2018, 4:46 AM
    Okay, so a follow-up - I’ve set up babel in the project, resolved the import situation. I’m now attempting to use the array syntax for typeDefs that was just added and getting
    Copy code
    TypeError: typeDefs.reduce is not a function
    Anyone experienced this and able to help?
  • j

    justinrich

    03/12/2018, 5:44 AM
    Anyone have any good pointers on testing reducers
    n
    • 2
    • 1
  • j

    justinrich

    03/12/2018, 5:44 AM
    in prisma
  • v

    Vendicto

    03/12/2018, 8:49 AM
    who can help to setup subscriptions on client side?
    j
    • 2
    • 7
  • h

    halborg

    03/12/2018, 9:07 AM
    Hey guys. Is there any way to optimize the debugging process while developing locally on docker using the GCF CLI? At the moment, to test any changes to my resolver function, I have to 1. Deploy the update to the local docker VM, 2. Go to the playground 3. Perform the query 4. Check logs for the VM in the terminal Can I attach the VSCode debugger to the VM somehow, or perhaps stream the logs to a terminal window?
  • g

    georgelovegrove

    03/12/2018, 9:28 AM
    Prisma automatically makes a subscription for each schema type in the database. For the server using this subscription what is the best way to funnel through this functionality. Should this work as expected? - user: { subscribe: async (parent, args, ctx, info) => { return ctx.db.subscription.user({}, info) } } Or should we use pubsub like the counter example? - counter: { subscribe: (parent, args, { pubsub }, info) => { const channel = Math.random().toString(36).substring(2, 15) // random channel name let count = 0 setInterval(() => pubsub.publish(channel, { counter: { count: count++ } }), 2000) return pubsub.asyncIterator(channel) }, },
    n
    • 2
    • 4
  • m

    Moritz

    03/12/2018, 9:34 AM
    Hi guys, how should I implement my resolver when I get a parameter that might be null/undefined and I would like to create a connection only if it is not so? I have the following mutation:
    Copy code
    data: {
              name,
              images: {
                connect: {
                  id: image
                }
              }
            }
    , which throws an error when the image param is null:
    Copy code
    "_data": {
        "name": "Badman",
        "images": {
          "connect": [
            {}
          ]
        }
      },
    Do I need to create different mutations with an if loop or is there a quick and dirty way? Should prisma connect ignore empty values, i.e. I though it did in the past... Any thoughts? Thanks!
  • b

    Ben

    03/12/2018, 11:17 AM
    I’m using the graphcool-framework: How can I return a model type (e.g. User) from a resolver function? Every example I’ve found only returns type that was newly defined in the
    src/functionname.graphql
    • 1
    • 1
  • b

    brunoguerra

    03/12/2018, 12:21 PM
    🙂 💯
  • h

    halborg

    03/12/2018, 1:26 PM
    Hey everyone, Any way in GCF CLI to seed data to the local Docker cluster? I’ve seen some references to it being possible in Prisma, but can’t find anything about it in documentation
    n
    • 2
    • 1
  • s

    sakhmedbayev

    03/12/2018, 3:36 PM
    Hello everyone. What does it involve to write code in ES6 in prismagraphql?
    j
    • 2
    • 115
  • s

    sakhmedbayev

    03/12/2018, 3:36 PM
    Is there any example?
  • s

    sakhmedbayev

    03/12/2018, 3:36 PM
    Please help!
  • h

    harmony

    03/12/2018, 3:44 PM
    uhh what?
  • h

    harmony

    03/12/2018, 3:44 PM
    just write it
  • t

    terion

    03/12/2018, 4:47 PM
    anyone? it's a simple yes/no question, there are developers of Prisma here, is it so hard to say yes or no? dub on forum: https://www.graph.cool/forum/t/do-prisma-resolve-n-1-problem/2792
    l
    d
    +2
    • 5
    • 10
  • a

    allpwrfulroot

    03/12/2018, 5:12 PM
    Is it still possible to upgrade Graphcool Console projects? If not, will fully hosted solutions be available again soon?
    n
    • 2
    • 10
  • l

    lawjolla

    03/12/2018, 5:29 PM
    I have a list of file groups with tags. Assume that this is my data (only one file group): https://cl.ly/1u3h1k0o3j0y I want to return that same data by selecting the tag enums "ImageHero" and "ImageVehicle", however the following query returns empty. Any ideas on my error? https://cl.ly/453H1g0C3F1w
    j
    n
    • 3
    • 25
  • m

    McArthur

    03/12/2018, 7:04 PM
    Is there a simple way to pass along the database api in prisma to the client? If that question makes sense…
    n
    l
    • 3
    • 2
  • r

    RishitKedia

    03/12/2018, 7:49 PM
    Hey there! 👋 I’ve seen some of you already use
    apollo-upload-server
    . Need some help for making it work on AWS Lambda and API Gateway. https://github.com/jaydenseric/apollo-upload-server/issues/58 Thanks for your time! 🙏
  • l

    lastmjs

    03/12/2018, 10:47 PM
    If anyone is interested, we've been experimenting a lot with GraphQL directive permissions, and here are the latest findings: https://medium.com/@lastmjs/advanced-graphql-directive-permissions-with-prisma-fdee6f846044
    💯 1
    👍 4
  • k

    Kimiiz

    03/13/2018, 7:04 AM
    can someone help me? https://gist.github.com/kimiiz55/bb6a64e454979bbe7d2815d3d7a0b908#file-createproductwithmanyimage-js-L26
    r
    • 2
    • 10
  • a

    Antonio

    03/13/2018, 7:50 AM
    Hi, not sure if I can ask here. I am setting up react native with apollo and graphcool, I want to do a simple facebook login but I get this error on the call back
1...606607608...637Latest