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

    visualbbasic

    06/29/2017, 12:40 AM
    I found it requires extra coding to do .map over nested data structure especially when there's edges and node layers added
  • a

    agartha

    06/29/2017, 12:44 AM
    I guess it all depends on your use case, but I would not get more data, and do your own foreign key mapping, when you can get exactly what you need in the nested one. And the
    map()
    call will no doubt be easier than processing the flat results, but again, that depends largely on your use case
  • v

    visualbbasic

    06/29/2017, 12:46 AM
    ok right
  • b

    be4r

    06/29/2017, 4:14 AM
    what is the best way to check if a user is authed in a React application? Should I do a user query in each component that requires auth or should I do a user query once in the top level component and pass down user as props?
    w
    l
    n
    • 4
    • 12
  • e

    eraldo

    06/29/2017, 8:15 AM
    How do I handle cascading updates and deletions of relationships?
  • e

    eraldo

    06/29/2017, 8:15 AM
    (using graphcool)
  • e

    eraldo

    06/29/2017, 8:16 AM
    If I delete a user, what will happen to all the connections that include that user? His files? The counters that involve this user? etc.
    n
    • 2
    • 6
  • p

    picosam

    06/29/2017, 8:36 AM
    Good morning! Are filters `AND`ed by default in permission queries?
  • p

    picosam

    06/29/2017, 8:38 AM
    Does this mean that either the
    ADMIN
    can see the user photo, or only the owner of that photo can see it? Or should I imperatively OR and AND the statements above?
    If_I_have_the_following_permission_query_.js
  • u

    user

    06/29/2017, 9:21 AM
    @nilan commented on @picosam’s file https://prisma.slack.com/files/U50GAPCFR/F61AGNAKV/if_i_have_the_following_permission_query_.js: Have a look here! 🙂 https://github.com/graphcool/api-bugs/issues/84#issuecomment-310754392
    If_I_have_the_following_permission_query_.js
  • u

    user

    06/29/2017, 9:22 AM
    @nilan commented on @picosam’s file https://prisma.slack.com/files/U50GAPCFR/F61AGNAKV/if_i_have_the_following_permission_query_.js: it's currently an
    OR
    , but that's not intended. The behaviour will be adjusted to an
    AND
    this weekend 🙂
    If_I_have_the_following_permission_query_.js
  • u

    user

    06/29/2017, 9:22 AM
    @nilan commented on @picosam’s file https://prisma.slack.com/files/U50GAPCFR/F61AGNAKV/if_i_have_the_following_permission_query_.js: in your case only using
    SomeUserExists
    is possible
    If_I_have_the_following_permission_query_.js
  • u

    user

    06/29/2017, 9:23 AM
    @nilan commented on @picosam’s file https://prisma.slack.com/files/U50GAPCFR/F61AGNAKV/if_i_have_the_following_permission_query_.js:
    Copy code
    SomeUserExists(filter: {
        id: $user_id
        role: ADMIN
        files_some: {
          id: $node_id
        }
      })
    If_I_have_the_following_permission_query_.js
  • s

    schickling

    06/29/2017, 10:35 AM
    set the channel topic: The GraphQL backend for mobile & web developers (Archive: https://graphcool.slackarchive.io)
  • r

    ragnorc

    06/29/2017, 11:08 AM
    Hello, I am using subscriptions with Apollo and sporadically getting this error: undefined is not an object (evaluating 'e.subscriptions[s].handler
  • r

    ragnorc

    06/29/2017, 11:09 AM
    any idea what the reason could be? It really doesn't happen, but when it does the app crashes.
  • q

    q666

    06/29/2017, 1:03 PM
    Hi is it possible to make a query that takes one random node from a collection ?
  • q

    q666

    06/29/2017, 1:06 PM
    something like
  • q

    q666

    06/29/2017, 1:07 PM
    -.php
  • q

    q666

    06/29/2017, 1:08 PM
    Would prefer not to do it on the client side 😞
  • j

    jjaybrown98

    06/29/2017, 1:43 PM
    @q666 orderBy is either DESC or ASC what are you hoping to achieve?
  • j

    jjaybrown98

    06/29/2017, 1:44 PM
    being able to retrieve a random user?
  • q

    q666

    06/29/2017, 1:46 PM
    @jjaybrown98 yes
  • n

    nikolasburk

    06/29/2017, 1:50 PM
    I don’t think that’s possible at the moment - a workaround could be to generate a random number between 0 and the max number of users that you can retrieve in a query beforehand. then you use
    skip
    and
    first
    to get the user at that index
    👍 3
  • q

    q666

    06/29/2017, 1:54 PM
    @nikolasburk thx thats a good enough workaround at the moment 🙂
    🙌 1
  • j

    joshjoe

    06/29/2017, 2:53 PM
    I’m planning a SAAS product which I hope to use on Graph.cool. I’d like to get your advice on the project setup before I get to far down the road in developing my schema.
  • j

    joshjoe

    06/29/2017, 2:53 PM
    The setup will be a monthly service. This monthly service is for a non-profit CRM. So each customer will be a non-profit. They may each have thousands of donor records (I work for a non-profit and we have over 3000, we are a small non-profit). Each of these non-profits can also have one or more international partners, which will almost certainly have less donors, but could still have many. So my question is, should I be deploying one project per non-profit customer, or should I be grouping them somehow (say every 100 Organizations)?
    n
    • 2
    • 2
  • i

    ilkkavesa

    06/29/2017, 2:55 PM
    Hi all! Anyone used Graphcool with Expo.io push notifications framework? Tried to Google a bit, but can’t find any examples… I have an idea how it should work, but not much of coder myself so prefer to learn from already working examples. Thanks!
    n
    • 2
    • 4
  • m

    mwickett

    06/29/2017, 3:43 PM
    Anyone have any good resources on component testing using Jest with Apollo? I’m not sure how to go about mocking etc.
  • q

    q666

    06/29/2017, 4:02 PM
    is it possible to get all defined enums with a query ?
    n
    • 2
    • 1
1...250251252...637Latest