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

    Matt Mueller (Prisma Client PM)

    10/19/2016, 8:17 AM
    do they have to be direct children?
  • s

    sashko

    10/19/2016, 8:19 AM
    no, it uses
    context
    just like
    react-redux
  • s

    sashko

    10/19/2016, 8:19 AM
    so the
    graphql
    container has to be somewhere underneath the provider
  • m

    Matt Mueller (Prisma Client PM)

    10/19/2016, 8:20 AM
    ahh right, okay gotcha, thanks!
    👍 1
  • a

    abhisheksp

    10/19/2016, 9:13 AM
    hi
  • a

    abhisheksp

    10/19/2016, 9:13 AM
    was going through tutorial
  • a

    abhisheksp

    10/19/2016, 9:14 AM
    render () { return ( <div className={classes.root}> <div className={classes.title}> {
    There are ${this.props.viewer.allPokemons.edges.length} Pokemons in your pokedex
    } </div> <div className={classes.container}> {this.props.viewer.allPokemons.edges .map(edge => <PokemonPreview key={edge.node.dataID} pokemon={edge.node} />)} </div> </div> ) } }
  • a

    abhisheksp

    10/19/2016, 9:14 AM
    i am unable to use the id property as key
  • a

    abhisheksp

    10/19/2016, 9:15 AM
    when i use edge.node.id the relay container doesnt have a key property.. i checked this in react console
  • a

    abhisheksp

    10/19/2016, 9:16 AM
    when setting as edge.node.dataID the key property is available
  • a

    abhisheksp

    10/19/2016, 9:16 AM
    could someone tell me why this happens ?
  • r

    rene

    10/19/2016, 9:18 AM
    @abhisheksp Have you tried using
    node.id
    ?
  • a

    abhisheksp

    10/19/2016, 9:24 AM
    when i set key as
    edge.node.id
    the key property is not set , and react shows the warning that children in an array iteration require unique id ,
  • a

    abhisheksp

    10/19/2016, 9:24 AM
    i checked this using react console and the Relay(PokemonPreview) component doesnt have keys
  • a

    abhisheksp

    10/19/2016, 9:26 AM
    but when i use
    edge.node.__dataID__
    the key is set and is visible in the react console and the warning disappears
  • a

    abhisheksp

    10/19/2016, 9:26 AM
    btw by react console i mean debugging tool for react in chrome browser
  • a

    alex42

    10/20/2016, 1:43 AM
    http://stackoverflow.com/q/40143763/5623786 Does anyone can help me out, please? Thanks. 🤓
  • u

    ullrich

    10/20/2016, 8:38 AM
    @alex42 seems like in your
    getVariables
    you return
    inviteAnswer
    to always be
    true
  • u

    ullrich

    10/20/2016, 8:39 AM
    Also there’s a lot of inconsistent indentation and many superfluous semicolons 🙂 I guess you don’t have eslint set up, do you? 🙂
  • s

    sashko

    10/20/2016, 6:16 PM
    what's wrong with the semicolons?
  • s

    sashko

    10/20/2016, 6:16 PM
    they seem reasonable
  • r

    redcom

    10/20/2016, 6:17 PM
    In literal templates?
  • j

    jwaldrip

    10/20/2016, 6:49 PM
    Im doing a hackathon today, any chance I can get an invite
  • s

    sorenbs

    10/20/2016, 6:50 PM
    Hey @jwaldrip Sign up at graph.cool and send me a pm with your email 🙂
  • m

    Matt Mueller (Prisma Client PM)

    10/21/2016, 8:14 AM
    are there any server side implementations out there that support stuff like this?
  • m

    Matt Mueller (Prisma Client PM)

    10/21/2016, 8:14 AM
    https://github.com/graphql/graphql-js/issues/524
  • m

    Matt Mueller (Prisma Client PM)

    10/21/2016, 8:15 AM
    or if this is a bad idea, why? 😛
  • n

    nilan

    10/21/2016, 8:19 AM
    you can do this
    Copy code
    query getArticlesAndUsers($limit: Int!, $user: ID!) {
        articles: allArticles (first: $limit) {
        title
        slug
        text
      }
      user: User (id: $user) {
        firstName
        lastName
      }
    }
    If I remember correctly, the queries are run sequentially from top to bottom.
  • n

    nilan

    10/21/2016, 8:20 AM
    does this suit your use case?
  • n

    nilan

    10/21/2016, 8:20 AM
    ok, I stand corrected. queries like this are run parallel simple smile
1...303132...637Latest