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

    uzu

    06/07/2017, 3:10 PM
    hi guys, i would like to call a query inside a graphcool function, to check if a data with the same name exist before writing. what is the best to do that ? i try to use lokka, lokka-transport-http but graphcool didnt recognize lokka-transport-http
    n
    • 2
    • 5
  • t

    taylorh

    06/07/2017, 4:33 PM
    Hey folks! I was wondering how you all handle mutations that require login? For example, a guest user does an action, a login modal requires login, and then the mutation to fulfill the action is run.
    n
    • 2
    • 1
  • l

    lastmjs

    06/07/2017, 5:35 PM
    Is there documentation for updating many-to-many relations?
    h
    n
    • 3
    • 9
  • m

    mcolyer

    06/07/2017, 6:14 PM
    Are there any plans to support configuring functions from the
    .graphcool
    file?
    n
    • 2
    • 1
  • a

    aurnik

    06/07/2017, 7:20 PM
    For anyone that uses nested mutations, do you know if the nested part of a mutation works like an upsert? For example if I had mutation { createPost ( text: “blah blah” author: { name: “John” } ) { id } } Where Author has a unique field “name”, I understand that if an Author with the name John didn’t exist it would be created, but if it did exist would it attribute that already existing Author to this Post? Hope that makes sense
  • s

    spences10

    06/07/2017, 8:30 PM
    Hello GraphPham 👋
    👋🏿 1
  • f

    fourcolors

    06/07/2017, 8:32 PM
    Hey yall, I have a question about HIPPA compliancy. If I have data in graph.cool will it be hippa compliant? There is this service that is a compliant host but I’m not sure if graph.cool is out of the box https://www.aptible.com/enclave/
  • j

    jt9001

    06/07/2017, 9:20 PM
    Is it possible to orderBy a query based on a field in one of it's relations? So far it's been possible to filter like that.
    a
    • 2
    • 1
  • l

    lastmjs

    06/07/2017, 9:25 PM
    Do function logs not log console logs or errors?
  • l

    lastmjs

    06/07/2017, 9:30 PM
    Oh, I see it's in the logs property
  • l

    lastmjs

    06/07/2017, 9:53 PM
    What version of Node are the functions using? I've been battling some errors that I had no indication about, I think it's because I was using arrow functions. Maybe we need some better syntax checking for the function editor, or some kind of indication
    a
    a
    • 3
    • 6
  • f

    fourcolors

    06/07/2017, 10:05 PM
    What is the current best practice to integrate with Stripe? Subscriptions? Still creating your own server?
  • f

    fourcolors

    06/07/2017, 10:09 PM
    Seems like functions should take care of that
  • f

    fourcolors

    06/07/2017, 10:09 PM
    I think
  • l

    lastmjs

    06/07/2017, 10:10 PM
    I'm using
    isomorphic-fetch
    in a cloud function. I can't get the promise callback to get called. The following example works fine on my node on my local machine, so I'm wondering if this is a cloud function issue:
    Copy code
    console.log('fetch with arrow function');
        fetch('<http://google.com|google.com>').then((response) => {
        	console.log('response with arrow function', response);
        });
        
        console.log('fetch withot arrow function');
        fetch('<http://google.com|google.com>').then(function(response) {
        	console.log('response without arrow function', response);
        });
  • l

    lastmjs

    06/07/2017, 10:11 PM
    The response logs never run
  • l

    lastmjs

    06/07/2017, 10:13 PM
    Wait, it's the node version...I'll figure it out
  • l

    lastmjs

    06/07/2017, 10:13 PM
    @fourcolors I haven't looked into it yet, but I'm planning on using server subscriptions for Stripe. I'll just make a mutation and listen to it, then do the stripe stuff. That's my plan for now at least
  • y

    yus

    06/07/2017, 10:24 PM
    @lastmjs you need to return a promise in your cloud function
  • l

    lastmjs

    06/07/2017, 10:25 PM
    fetch does return a promise as far as I'm aware
  • y

    yus

    06/07/2017, 10:25 PM
    check this example
  • y

    yus

    06/07/2017, 10:25 PM
    https://github.com/graphcool-examples/functions/blob/master/stripe-create-customer/stripe-create-customer.js
  • y

    yus

    06/07/2017, 10:25 PM
    yes it does. i mean your function needs to return a promise
  • l

    lastmjs

    06/07/2017, 10:25 PM
    Works on my local machine with Node.js v8.0.0, but not with Node.js v4.4.5, which is the version the cloud fuctions use
  • y

    yus

    06/07/2017, 10:26 PM
    so in your code, you need to return fetch('url', ....)
  • m

    morley

    06/07/2017, 10:35 PM
    I have what might be a stupid question... Is there a mutation that increments an integer field, instead of setting it directly?
    a
    n
    • 3
    • 25
  • l

    lastmjs

    06/07/2017, 10:56 PM
    @yus Okay, I need to return a promise in the export so that the lambda function will wait...got it
    👍 1
  • l

    lastmjs

    06/07/2017, 10:56 PM
    Thanks a ton
  • s

    sajmil

    06/07/2017, 11:10 PM
    Question: so I am adding an object to a relation array, but it appears that the relation doesn't always add to the end of the array. Sometimes in the beginning, middle, etc. Is there any way to specify where the new relation will be in the array? My Example: I am adding a song object to a Playlists' songs relation
    a
    • 2
    • 1
  • l

    lastmjs

    06/07/2017, 11:19 PM
    I'll bet the assumption is that the order doesn't matter, it's just a collection of relations. Why do you need it to be ordered?
1...220221222...637Latest