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

    artyom

    05/05/2017, 8:52 AM
    🙌 @thewillmundy @kkeeland @plamworapot @danm hi, welcome to our slack! graphcool
  • b

    bogdan

    05/05/2017, 12:47 PM
    is there anyway for a user different from the owner to upgrade the billing plan ?
    n
    • 2
    • 2
  • b

    bogdan

    05/05/2017, 12:48 PM
    or someway to transfer ownership ?
  • p

    pettanko

    05/05/2017, 1:06 PM
    Have anyone tried to use
    subscriptions-transport-socketio
    ?
  • a

    alexc

    05/05/2017, 1:43 PM
    i have a question
  • a

    alexc

    05/05/2017, 1:44 PM
    i have a filtered, ordered query, that returns the first 10 entities from a type after a certain cursor
  • a

    alexc

    05/05/2017, 1:44 PM
    i then take just the last id from the results, and replace the cursor id with it, and rerun the query
  • a

    alexc

    05/05/2017, 1:45 PM
    The results contain entities from that previous result
  • a

    alexc

    05/05/2017, 1:45 PM
    isn’t this a bug?
  • l

    loelsonk

    05/05/2017, 1:54 PM
    Hi! Is it possible to use new permission query system on User Model? I have custom enum field called
    testrole
    (enums ADMIN, MODERATOR, ...). I would like to allow only authenticated users with
    testrole: ADMIN
    to be able to update User model. My update permission query does not work:
    Copy code
    query ($user_id: ID!) {
      SomeUserExists(
        filter: {
          id: $user_id
          testrole: ADMIN
        }
      )
    }
    n
    • 2
    • 2
  • g

    gmuresan

    05/05/2017, 1:58 PM
    I’m having trouble with Auth0 idTokens. I’m trying to implement a manual login using username and password. I am able to retrieve the idToken from Auth0, but when I try to sign in the user to Graphcool, it tells me the token is invalid
    l
    n
    • 3
    • 11
  • a

    alexc

    05/05/2017, 2:32 PM
    it seems that cursor based pagination ignores sorting
    n
    • 2
    • 3
  • a

    akadop

    05/05/2017, 2:39 PM
    hey guys, i made a mutation callback on the site and put this in my server code. `` server.post('/', (req, res) => { // new customer webhook const newCustomer = { firstName: req.body.createdNode.firstName, lastName: req.body.createdNode.lastName, email: req.body.createdNode.email, address: req.body.createdNode.address, addressCity: req.body.createdNode.addressCity, addressState: req.body.createdNode.addressState, addressZip: req.body.createdNode.addressZip, }`` .... How do I get react to listen and display a notification that the operation was successful though?
    n
    • 2
    • 9
  • g

    gmuresan

    05/05/2017, 5:36 PM
    does anyone know if there is a way to reference the user id in a filter when you are doing the user query?
    n
    • 2
    • 1
  • v

    vacom

    05/05/2017, 5:42 PM
    Hey guys, i am having some problems, on the create user on graphcool I get a error "Error: GraphQL error: Insufficient Permissions" but is saving and creating the user on Graphcool
    âś… 1
  • d

    datwheat

    05/05/2017, 8:46 PM
    So is there a way to upload image files to my db via the console?
    n
    • 2
    • 3
  • m

    mikep

    05/05/2017, 9:15 PM
    any ember users in here? trying to figure out the best addon for integrating with graphcool. looks like ember-graphql-adapter and ember-apollo-client are the two main options
    • 1
    • 1
  • n

    nickhudkins

    05/05/2017, 10:06 PM
    oh hi @datwheat
    👋🏿 1
  • a

    artyom

    05/05/2017, 10:14 PM
    @morriq @robandrose @kilberlake @gungorkocak @mikep @asisleyyy hello, all 🖖 welcome to graphcool ! 🙌
  • a

    artyom

    05/05/2017, 11:00 PM
    @alp hi there, welcome! 🙌
  • m

    marcusstenbeck

    05/06/2017, 10:02 AM
    I’m new to GraphQL and Graphcool. I have a model called Charge, and I’d like to write a query that gets the three latest charges, and also the total of all charges.
  • m

    marcusstenbeck

    05/06/2017, 10:03 AM
    So if the charges are
    [3, 6, 4, 6, 8]
    I’d like a response kind of like this:
  • m

    marcusstenbeck

    05/06/2017, 10:04 AM
    Copy code
    totalSumOfAllCharges: 27
    latestCharges: [3, 6, 4]
  • m

    marcusstenbeck

    05/06/2017, 10:06 AM
    A mutation callback? So when a charge is created it’ll update
    totalSumOfAllCharges
    ?
  • m

    marcusstenbeck

    05/06/2017, 10:07 AM
    I’m still learning, but it seems like I’d create a resolver if I’d run graphql myself.
  • j

    jensneuse

    05/06/2017, 10:30 AM
    calculate total sum at query time doesn’t scale well I’d rather run a callback after mutations to recalc. That said you should be aware of race conditions in case of concurrent mutations alongside with tradeoffs when recalculation the total on every mutation. If you application state is critical and totalsum must be updated from within a transaction I’d wrap the whole mutation logic into one transaction block. I guess this is currently not possible with graph.cool. In this case have a look at postgraphql. It let’s you define custom mutations as database functions.
  • m

    marcusstenbeck

    05/06/2017, 11:36 AM
    @jensneuse Good point about race conditions. I’m fine with the total not being updated immediately. It’s mostly for analytics purposes (and a nice to have).
  • m

    marcusstenbeck

    05/06/2017, 11:37 AM
    I might even just set it to process reports as a job on set intervals.
  • n

    nilan

    05/06/2017, 11:38 AM
    chiming in here 🙂 You can query the last three charges using the
    last
    argument of the
    allCharges
    query. A cron job works perfectly for your situation I think
  • j

    jensneuse

    05/06/2017, 11:39 AM
    if it’s just for the purpose of reporting, run it twice a day or nightly or at whatever schedule.. or even run it at query time, why care about performance if it’s a dashboard?
    👍 1
1...175176177...637Latest