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

    lastmjs

    08/26/2017, 9:54 PM
    The PRE_WRITE hook point is now deprecated...what is the recommended way of accessing external APIs on a mutation? I want to be able to block the mutation if certain validation or API calls fail
    a
    n
    • 3
    • 2
  • j

    joao.santos

    08/27/2017, 10:11 AM
    Hi guys im using a react image compressor and it does the work i can see the image and save it to the computer with a reduced size, but when i upload to graph.cool, the image stays all black... Any ideias? thx link : https://files.graph.cool/cj1xid3i6ozp80133rpv5ur1z/cj6ulr4kj006i0180dyy65hmj
    a
    • 2
    • 4
  • h

    halborg

    08/27/2017, 12:21 PM
    Anyone know of an easy way to refetch the contents of a QueryRenderer? The use case is when something goes wrong when fetching the data, I want to show a “Something went wrong, try again” type of component, with on onPress that simply retries the query. I can’t find any way of doing this without including an unneccesary refetchcontainer.
    • 1
    • 2
  • a

    alechp

    08/27/2017, 3:32 PM
  • m

    matthewhager

    08/27/2017, 4:13 PM
    Most tutorials point to passing things like user ids from the client to graphcool which seems potentially insecure, even if using the auth system. Is there a way to get the validated session user in server side functions to ensure that this isn't tampered with client side?
    d
    a
    • 3
    • 4
  • j

    joar

    08/27/2017, 4:37 PM
    @matthewhager Not right now, no (if youre using web hooks). There is an open ticket for it
  • c

    cj

    08/27/2017, 5:29 PM
    afternoon, has anyone got the subscription functions to work? I have this one http://prntscr.com/gdoh88 but it never gets triggered on file upload
    m
    m
    n
    • 4
    • 9
  • p

    picosam

    08/27/2017, 6:14 PM
    Hello, for those experienced in Apollo:
    watchQuery
    returns an
    Observable
    . Without subscribing to that
    Observable
    , is there a way to know that fetching has been completed? I’m trying to use
    myObs$.currentResult()
    but that’s giving me a
    TypeError: this.getObservableQuery(...) is undefined
  • m

    matty

    08/28/2017, 2:12 AM
    SSS seems to be triggered when a mutation runs but the data doesn't actually change (e.g. setting a field to the same value). Any quick thoughts on best way to prevent this?
  • m

    matty

    08/28/2017, 2:51 AM
    gah, just learned of another Graphcool github repo (ui-feedback).. getting confused with where I should search for things - Slack, Forum, api-bugs, feature-requests, console, ui-feedback, ... others?)
  • e

    examp1e

    08/28/2017, 9:34 AM
    Hey guys, Have a problem with nested mutation. The UI is on screenshot. In data I have an array with
    4 objects
    . Each represents module (1..4). On
    select change
    I want to mutate one of this object/module and on
    save
    button put the whole array to the server. The problem is that
    Apollo Query
    makes the object
    frozen
    . And it contains
    __typename
    fields which I want to get rid of. Maybe someone knows how to handle that.
  • e

    examp1e

    08/28/2017, 9:36 AM
    example_of_an_array_.js
  • g

    gauravkaushik

    08/28/2017, 10:19 AM
    Hey guys, I have one question. Does graphcool provide any way for us to specify when to throttle queries based on their complexity? Or does it have it's own set of rules when it comes to throttling?
  • r

    rajit

    08/28/2017, 11:07 AM
    I keep getting
    TypeError: Cannot read property 'graphcool' of undefined
    when trying to use
    require('graphcool-lib').fromEvent
    in functions. I've created a PAT with the same name as the function, but I thought the
    event.context
    would always be added anyway
  • r

    rajit

    08/28/2017, 11:11 AM
    In the meantime I guess I'll have to hard-code the endpoint and PAT in the function, but maybe you guys could update the documentation with the right way of doing it. It's a bit unclear from this: https://www.graph.cool/docs/reference/functions/graphcool-lib-kaegh4oomu/ The example hard-codes data in the event, but surely that's supposed to be given to the function
    a
    n
    • 3
    • 7
  • m

    muphet

    08/28/2017, 11:39 AM
    what is the point of this relation thing? i am trying to follow learnapollo tutorial and it shows me to create type:
    Copy code
    type user implements Node {
    createdAt: ...
    id: ...
    posts: [Post]}
    but i get response that relation is not set blah blah
    a
    • 2
    • 1
  • u

    user

    08/28/2017, 11:59 AM
    @agartha commented on @examp1e’s file

    https://prisma.slack.com/files/U6VJ7N8P9/F6UKSHLUV/ui.png▾

    : @examp1e Could you post this question on the forum? https://www.graph.cool/forum/
  • e

    examp1e

    08/28/2017, 12:00 PM
    @agartha sure
    👍🏻 1
  • u

    user

    08/28/2017, 12:16 PM
    @examp1e commented on @examp1e’s file

    https://prisma.slack.com/files/U6VJ7N8P9/F6UKSHLUV/ui.png▾

    : formatting on forum is too weird 😞 Really hard to create something readable
  • w

    wesbos

    08/28/2017, 2:39 PM
    Hey - I’m doing pagination - Is there anyway to query how many items there are so I can make page numbers?
  • w

    wesbos

    08/28/2017, 2:43 PM
    got it
  • w

    wesbos

    08/28/2017, 2:43 PM
    Copy code
    query {
      _allItemsMeta {
        count
      }
    }
    👍 2
  • z

    zth

    08/28/2017, 2:58 PM
    How do I connect users created in the auth0 dashboard with graphcool?
  • z

    zth

    08/28/2017, 2:59 PM
    Looking at the examples, it looks like every login using auth0 is followed by a createUser mutation. Maybe I'm mistaken there?
    d
    • 2
    • 1
  • w

    wesbos

    08/28/2017, 3:16 PM
    any reason why this query would ignore the default values? http://wes.io/mCUo
    d
    • 2
    • 1
  • w

    wesbos

    08/28/2017, 3:25 PM
    I can confirm it works when explicitly passing the values via variables
    a
    d
    • 3
    • 32
  • w

    wesbos

    08/28/2017, 3:25 PM
    but if I omit the values, they are ignored
  • v

    valid

    08/28/2017, 4:58 PM
    I'm trying to implement auth0 auth with graph.cool -- when I run the userQuery with the Apollo dev extension I get the correct results, but
    console.log(this.props.data.user)
    is null -- is there something I need to/can do to 'wait' for graphql to finish the query before processing?
  • v

    valid

    08/28/2017, 4:59 PM
    ignore the auth0 bit, that part is fine -- I really just need help figuring out how to determine if the current user already has their name/email in graph.cool
  • v

    valid

    08/28/2017, 5:05 PM
    Here is a gist: https://gist.github.com/Valid/0747648144e2d3bf393ea295e9f03e25 -- 'db return' is
    undefined
1...320321322...637Latest