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

    lkbr

    08/04/2017, 1:51 PM
    Hi all, wondering if anyone could shed some light on this error from a graphcool function:
    Copy code
    "returnValue":{"code":500,"error":"Error resolving named webtask","details":"Error resolving named webtask: node module \"request@2.81.0@2.81.0\" is not currently available"}}
    The function is based off the cloudinary images example here: https://github.com/graphcool-examples/functions/blob/master/cloudinary-images/cloudinary.js
    n
    • 2
    • 15
  • n

    notrab

    08/04/2017, 2:24 PM
    Has anyone used Auth0 profile pictures + graphcool functions?
  • t

    Thor Even Tutturen

    08/04/2017, 2:38 PM
    Is the simple subscription api working right now?
    n
    • 2
    • 4
  • a

    andersonlf

    08/04/2017, 2:52 PM
    allMovies { title _actorsMeta { count } } is it possible to filter by aggregates (let`s say, where COUNT > 1)? I`m using graph.cool. I am new to graphql and graphcool, it maybe a recurrent question...
  • a

    andre

    08/04/2017, 3:06 PM
    Hm, I have a problem with a schema extension since yesterday. The schema extension SDL:
    Copy code
    type GravatarPayload {
      url: String!
    }
    
    extend type Query {
      gravatar(email: String!, size:Int): GravatarPayload
    }
    The function:
    Copy code
    const crypto = require('crypto');
    
    module.exports = function (event) {
      const email = event.data.email;
      const size = event.data.size || 200;
    
      const hash = crypto.createHash('md5').update(email).digest("hex");
      
      return {
        data: {
          url: `<https://www.gravatar.com/avatar/${hash}?s=${size}>`
        }
      };
    }
    When I execute the query with the following arguments:
    Copy code
    query {
      gravatar(email:"a-valid-email-address", size:500) {
        url
      }
    }
    The result looks like:
    Copy code
    {
      "data": {
        "gravatar": {
          "url": "<https://www.gravatar.com/avatar/5ee5cd89f7ed6895e80400156211fdbb?s=Some(500)>"
        }
      }
    }
    I’m wondering where the
    Some(500)
    comes from. Any ideas?
    n
    • 2
    • 6
  • c

    cball

    08/04/2017, 3:16 PM
    I think I’m missing something very obvious trying out the schema extension here: https://github.com/graphcool-examples/functions/tree/master/email-user-management/functions/signup. I followed the instructions. when I do a “Test Run” all looks good, but when I try to use it from the main “Playground” it fails. Here’s my mutation in the playground:
    Copy code
    mutation {
      signupEmailUser(email:"<mailto:chris@echobind.com|chris@echobind.com>", password:"test1234") {
        id
      }
    }
    And here’s the error:
    Copy code
    {
      "data": {
        "signupEmailUser": null
      },
      "errors": [
        {
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "functionError": "Error: Unknown argument 'email' on field 'User' of type 'Query'. (line 3, column 12):\n      User(email: \"<mailto:chris@echobind.com|chris@echobind.com>\") {\n           ^: {\"response\":{\"data\":null,\"errors\":[{\"message\":\"Unknown argument 'email' on field 'User' of type 'Query'. (line 3, column 12):\\n      User(email: \\\"<mailto:chris@echobind.com|chris@echobind.com>\\\") {\\n           ^\",\"locations\":[{\"line\":3,\"column\":12}]}],\"status\":200},\"request\":{\"query\":\"\\n    query {\\n      User(email: \\\"<mailto:chris@echobind.com|chris@echobind.com>\\\") {\\n        id\\n      }\\n    }\"}}",
          "path": [
            "signupEmailUser"
          ],
          "code": 5001,
          "message": "function execution error: Error: Unknown argument 'email' on field 'User' of type 'Query'. (line 3, column 12):\n      User(email: \"<mailto:chris@echobind.com|chris@echobind.com>\") {\n           ^: {\"response\":{\"data\":null,\"errors\":[{\"message\":\"Unknown argument 'email' on field 'User' of type 'Query'. (line 3, column 12):\\n      User(email: \\\"<mailto:chris@echobind.com|chris@echobind.com>\\\") {\\n           ^\",\"locations\":[{\"line\":3,\"column\":12}]}],\"status\":200},\"request\":{\"query\":\"\\n    query {\\n      User(email: \\\"<mailto:chris@echobind.com|chris@echobind.com>\\\") {\\n        id\\n      }\\n    }\"}}",
          "requestId": "simple:cj5y0djgn4hrm01472znstweu"
        }
      ]
    }
    n
    • 2
    • 2
  • p

    peterp

    08/04/2017, 3:40 PM
    is there something that’ll allow me to parse a .graphcool (or graphql schema) file?
    👍 1
  • p

    peterp

    08/04/2017, 3:55 PM
    i’m looking at graphcool-cli and graphql-cli and i’ve pulled down project.graphcool and schema.graphql
  • p

    peterp

    08/04/2017, 3:55 PM
    i tried running printQuery from graphql but that was erroring out b/c it can’t parse it
    n
    • 2
    • 2
  • p

    peterp

    08/04/2017, 4:25 PM
    cc @nilan & @nikolasburk - i was going to release this on its own but figured we can bake it into the graphcool ecosystem. Interested?
    💯 3
    👍 1
  • u

    user

    08/04/2017, 4:43 PM
    @nikolasburk commented on @peterp’s file

    https://prisma.slack.com/files/U5GF08HKM/F6HMC0KHN/demo-delete-models.gif▾

    : looks awesome! let’s discuss this with @schickling as he owns the CLI 🙂
  • u

    user

    08/04/2017, 5:02 PM
    @schickling commented on @peterp’s file

    https://prisma.slack.com/files/U5GF08HKM/F6HMC0KHN/demo-delete-models.gif▾

    : Hi @peterp! This looks awesome! We're definitely planning to add something like this to the
    graphcool
    toolchain in the future. However we don't want to rush this as we're planning to change the CLI quite a bit going forward. I think the easiest would be if you'd release it as a stand alone tool (or even better as a
    graphql-cli
    plugin) and we'll merge it in at some point in the future?
  • s

    spences10

    08/04/2017, 5:06 PM
    How can I update my project from a
    .graphql
    file on the
    graphcool
    CLI? Just had a thought! If I have a bootstrap which other people will be using and I have my graphcool project defined via
    project.graphcool
    how does a new user set up their own instance of the project?
  • c

    ckelley

    08/04/2017, 5:12 PM
    In the same boat as @spences10 - setting up a pipeline for deploying schema. Curious as to the progress of tooling for project settings and such (https://github.com/graphcool/feature-requests/issues/169)
    • 1
    • 2
  • s

    spences10

    08/04/2017, 5:17 PM
    I'm guessing that I can use
    graphcool init --schema schema.graphql
  • s

    spences10

    08/04/2017, 5:17 PM
    @nilan ?
  • s

    spences10

    08/04/2017, 5:30 PM
    Anyone?
  • s

    spences10

    08/04/2017, 5:33 PM
    Ok, trying to init with
    graphcool init --schema schema.graphql
    didn't work
    n
    • 2
    • 2
  • s

    spences10

    08/04/2017, 5:33 PM
  • p

    peterp

    08/04/2017, 5:40 PM
    @schickling works for me, thanks 🙂
  • c

    cj

    08/04/2017, 5:57 PM
    afternoon, is anyone else having issues with UPDATE, CREATE subscriptions? since yesterday they have stopped working. I just tried in the playground using https://gist.github.com/cj/0b9c342a88d1751b13e26d565bbae8ad and confirmed it does not work there either.
    ✅ 1
    n
    • 2
    • 9
  • m

    mwickett

    08/04/2017, 6:08 PM
    Anyone have a working example of a “user must be logged in or they get redirected to login” HOC?
    n
    • 2
    • 7
  • n

    nilan

    08/04/2017, 6:47 PM
    @mwickett
  • n

    nilan

    08/04/2017, 6:47 PM
  • z

    zach

    08/04/2017, 6:48 PM
    @schickling hey! 😄
  • h

    herdani

    08/04/2017, 6:53 PM
    Hi everyone. Is there a way to create a new node from inside a function ?
    n
    • 2
    • 5
  • j

    jcarva

    08/04/2017, 8:38 PM
    Hi everyone, I have a type Project on my graphcool schema, and I want to copy, or clone a specific project node by ID when an event happens in my front-end(React + Apollo). Is there a way like to create, delete, or update(https://www.graph.cool/docs/reference/relay-api/mutations-vah0igucil/) to copy or clone a node?
    👍 1
    n
    • 2
    • 2
  • j

    jcarva

    08/04/2017, 8:41 PM
    And yes, I already know that I can get the data by a query and create a new node project using the queried data, but clone or copy would be extremely easier than that solution.
  • p

    pcooney10

    08/04/2017, 9:07 PM
    Going to bump this but me more specific, does anyone have an example of keeping logs for CREATED, UPDATED, and DELETED, with a server side subscription, request pipeline, or something of the like?
    a
    • 2
    • 16
  • l

    leandros

    08/04/2017, 9:22 PM
    @leandros pinned a message to this channel.
1...298299300...637Latest