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

    user

    02/16/2017, 12:54 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Ok, so you have a one-to-many relation between User and Slide to save the last slide a user has visited?
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 12:54 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: no, one-to-one. But Lesson and Slide have one-to-many
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 12:55 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: one-to-one means that one slide cannot be stored by two different users
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 12:56 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: oh, yes I mean one-to-many
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 12:58 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Is there a reason you are storing this information of the current slide on the server rather on the client?
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 12:59 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Yes, I need other users know what he or she is looking at
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:00 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: So having the currentSlide I'm going up the schema to fetch current lesson and down again to fetch the list of slides in the current lesson.
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:01 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: I see! You can make that more efficient if you use two different queries
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:01 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: One to query the id of the current slide
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:01 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: and then one that queries the lesson of that slide and all other slides
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:02 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Or you do this:
    Copy code
    currentSlide{
    		id
    		lesson{
    			id
    			slides {
                  id
                }
    		}
    	}
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:02 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: there shouldn't be a significant performance drawback
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:04 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: So do I understand correctly that going from children to parents and going back to their children doesn't stress the DB?
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:05 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: There's a small overhead involved, but we're `JOIN`ing the DB tables so it's really only a small overhead.
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:07 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Great that's exactly what I wanted to know! Thank you! Just one more question you said I can do two queries. Can I batch them together somehow so I wouldn't wait for the response before sending the second one?
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:07 PM
    @nilan commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: No, that would be two separate queries
    Hi__How_does_this_query_affect_performance_.js
  • u

    user

    02/16/2017, 1:08 PM
    @alex_ye commented on @alex_ye’s file https://prisma.slack.com/files/U3WSHAM39/F46B1EW4A/Hi__How_does_this_query_affect_performance_.js: Got it, thank you, Nilan!
    Hi__How_does_this_query_affect_performance_.js
  • d

    dzello

    02/16/2017, 4:38 PM
    Thanks @nilan! 👋 Hello everyone, I’m Josh Dzielak, a Developer Advocate at Algolia. If you have any questions about Algolia or how to connect your graphcool apps don’t hesitate to ask.
    🙏 8
    🙌 1
    🎉 8
    d
    n
    • 3
    • 15
  • n

    nilan

    02/16/2017, 5:42 PM
    Awesome to have you here @dzello 🙌
  • n

    nilan

    02/16/2017, 5:42 PM
    Same goes for @ron @giga @eli and @flesch 🙂
  • m

    mikeroelens

    02/16/2017, 6:33 PM
    Is there a way to batch upload data? Example: Uploading a CSV list of cities. Or will I have to write a script?
    n
    • 2
    • 1
  • s

    sashko

    02/17/2017, 12:25 AM
    Subscriptions are coming to the spec soon! https://dev-blog.apollodata.com/the-next-step-for-realtime-data-in-graphql-b564b72eb07b?source=linkShare-803918030a60-1487291109
    🎉 4
    🦜 2
    👍 2
  • n

    nilan

    02/17/2017, 1:02 PM
    Welcome to our community @puls @vacom @atoumbre @jdinh @cnoter and @mphilpot 👋 Please let me know if I can help you getting up and running 🙂
  • c

    cderue

    02/17/2017, 2:28 PM
    Hi. Does someone know how to build offline first mobile or web apps with Graphcool backends?
    n
    e
    • 3
    • 3
  • s

    sunrising

    02/17/2017, 4:30 PM
    Hi! i want to update a node related to another node. it could be Address node nested into Contact node... can i update it using the updateContact mutation? i thought so but i'm having troubles
    n
    • 2
    • 20
  • z

    zebapy

    02/17/2017, 5:29 PM
    How does graphcool dynamically create the
    filter
    for a node? Or is it some secret sauce 🙂
  • t

    tim2

    02/17/2017, 6:21 PM
    @zebapy secret sauce ;)
  • a

    aryan

    02/17/2017, 6:42 PM
    Hey guys, I'm trying to use recompose as mentioned in Sashko's recent blog post. Here's my code:
    Copy code
    export default compose(
      withRouter,
      graphql(FeedQuery, feedQueryOptions),
      graphql(userQuery, { options: { forceFetch: true }}),
    )(Module)
    if you look at the two
    graphql()
    lines, those are both the
    data
    portion of my compose. It seems like only the second one gets composed on my component. I'm guessing because props.data gets overwritten? What do you do when you have multiple datas? One option I can think of is renaming the second one so it doesn't go into props.data, but not sure if that's the best/common practice
    v
    n
    • 3
    • 6
  • a

    aryan

    02/17/2017, 7:15 PM
    Hey guys, seems like a small UI inconvenience in the PlayGround. When I click on "DOCS", not everything is visible, and I'm not able to pull it any further to see the text (on a macbook retina 13"). My only way is to zoom out the browser to 50% to be able to check the docs:
  • a

    aryan

    02/17/2017, 7:15 PM
1...107108109...637Latest