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

    zeeshanlakhani

    12/12/2016, 6:49 PM
    following those directions, I did get a graphic-config is not in the register error when attempting to npm link it
  • s

    schickling

    12/12/2016, 6:52 PM
    I'll ping you via DM 🙂
  • m

    monkeybonkey

    12/13/2016, 12:55 PM
    is the site down? I’m getting a 503 error at https://www.graph.cool/docs
  • s

    sorenbs

    12/13/2016, 12:58 PM
    Seems like our hosting provider is having challenges. We are looking into it. This doesn’t affect the api.
  • s

    sorenbs

    12/13/2016, 1:05 PM
    Homepage and docs are online again.
  • s

    sdubois

    12/13/2016, 2:39 PM
    on https://www.graph.cool/ there's a schema demo with instagram/pokemon/airbnb, where there's a selector between "visual" and "IDL", but clicking IDL does nothing
  • s

    sorenbs

    12/13/2016, 2:52 PM
    Thanks @sdubois We wanted to get the new website out there as early as possible. Now we have a list of stuff to catch up on. I’ll ad this to the list 🙂
    👍 1
  • g

    gerardsans

    12/13/2016, 3:44 PM
    Hey there! My GraphQL talk at ng-be in Ghent Belgium went great. Got great feedback from people. I covered GraphQL queries, mutations and subscriptions! This is a url to the slides http://slides.com/gerardsans/ng-be-unleashing-the-power-of-graphql ✨ 🚀
    🙌 5
    🚀 3
  • m

    monkeybonkey

    12/14/2016, 1:26 PM
    why can’t you use id as an argument in a nested query? e.g.
    { user { posts(filter:{id:$nodeId}){  id } }}
    works, but
    { user { posts(id:$nodeId){  id } }}
    does not work but
    { posts(id:$nodeId}{ id }}
    does work
  • m

    monkeybonkey

    12/14/2016, 1:29 PM
    does the id argument only work on top level objects in the query? Maybe you can point me to the page in docs that lists out the query arguments and their types? Or is that general conventions that I can look at graphql docs for
  • s

    sorenbs

    12/14/2016, 1:30 PM
    The toplevel field:value syntax is only for fields that return a single element instead of a list. So in your example I think you mean
    { Post(id:$nodeId}{ id }}
    instead of
    { posts(id:$nodeId}{ id }}
  • s

    sorenbs

    12/14/2016, 1:30 PM
    So yes, it only works on top-level, and only for unique fields, such as the id field
  • n

    nilan

    12/14/2016, 1:31 PM
    this is the relevant passage in the docs: https://www.graph.cool/docs/reference/simple-api/one-node#specifying-the-node-by-another-unique-field (Simple API) 🙂
  • m

    monkeybonkey

    12/14/2016, 1:31 PM
    ok thanks, in this case it would still be posts since I’d be looking through the relation on the user object - trying to work through the query permission examples and tinkering with it
    🛠️ 1
  • m

    monkeybonkey

    12/14/2016, 1:33 PM
    @nilan thanks! I keep forgetting that I have to click on “Simple API” for the rest of the docs
  • s

    sorenbs

    12/14/2016, 1:34 PM
    cool. Yeah, you would have to use the filter syntax in that case. Happy to help design specific Permission Queries if you get stuck at some point
  • m

    monkeybonkey

    12/14/2016, 4:22 PM
    so looking at the rules permissions beta - if I’m trying to add a rule to the user so that only they see their own private fields - I tried adding this rule:
    Copy code
    {
      user(filter:{id:$nodeId}){
        id
      }
    }
    but it doesn’t seem to save
  • m

    monkeybonkey

    12/14/2016, 4:23 PM
    and I’m getting red squigglies in the rule editor window
  • n

    nilan

    12/14/2016, 4:23 PM
    so, do you really want to use
    nodeId
    there? shouldn't it be rather
    userId
    ?
  • m

    monkeybonkey

    12/14/2016, 4:24 PM
    um yeah sorry userid
  • n

    nilan

    12/14/2016, 4:24 PM
    and if you hover over the red lines with your mouse, what is the error message?
  • m

    monkeybonkey

    12/14/2016, 4:24 PM
    no message
  • m

    monkeybonkey

    12/14/2016, 4:24 PM
    doesn’t seem to trigger a hover
  • m

    monkeybonkey

    12/14/2016, 4:25 PM
    with user I can’t use
    user(id:$userId)
    right?
  • m

    monkeybonkey

    12/14/2016, 4:25 PM
    and I have to use the filter?
  • s

    sorenbs

    12/14/2016, 4:25 PM
    you have to use the filter
  • s

    sorenbs

    12/14/2016, 4:30 PM
    Or are you referring to the top level user field? That one doesn’t support filter either as it alway returns the current user.
  • s

    sorenbs

    12/14/2016, 4:31 PM
    If your rule is that a user can only se its own fields your query would look like this:
    Copy code
    {
      allUsers(filter:{AND:[
        {id:$nodeId},
        {id:$userId}]})
      {id}
    }
  • s

    schickling

    12/15/2016, 7:30 PM
    Hey there <!channel>! We've just announced Learn Apollo. 🎉 graphql Read here for more: https://dev-blog.apollodata.com/learn-apollo-build-graphql-apps-with-react-react-native-or-exponent-4787269a4747
    neckbeard 7
    ➕ 6
    💯 13
    🚀 9
    😎 3
    graphcool 12
    🎉 13
    🎅 5
  • a

    abrax

    12/15/2016, 8:32 PM
    ^^ ok
1...626364...637Latest