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

    auser

    07/21/2017, 9:27 PM
    ah thanks 🙂
  • a

    auser

    07/21/2017, 9:27 PM
    just figured it out too
  • a

    auser

    07/21/2017, 9:27 PM
    but I appreciate the reply 🙂!!
  • a

    auser

    07/21/2017, 9:36 PM
    okay, is it possible to do a nested query using after on another field rather than just
    id
    ?
  • a

    auser

    07/21/2017, 10:02 PM
    so for instance, If I have a post and I’m filtering/querying that post, I want to get the previous and the next post
  • a

    auser

    07/21/2017, 10:03 PM
    but I only have the slug of the post available, vs. the ID
    t
    • 2
    • 2
  • m

    mikael

    07/21/2017, 10:14 PM
    oh so you mean like you did
    get me the first post that matches "key_word"
    and now you want
    get me the second post that matches that "key_word"
  • m

    mikael

    07/21/2017, 10:14 PM
    in that case you’d just want to do a
    skip: 1, first: 1
    or something right?
  • b

    benoit

    07/21/2017, 10:28 PM
    hi guys, first ever question here
  • b

    benoit

    07/21/2017, 10:28 PM
    more to do with how to build the schema properly
  • b

    benoit

    07/21/2017, 10:29 PM
    or how to model the data rather
  • b

    benoit

    07/21/2017, 10:30 PM
    I’m making a small app where any
    User
    can add new
    Recipe
  • b

    benoit

    07/21/2017, 10:30 PM
    then can add specific
    Recipe
    to their favourite
  • b

    benoit

    07/21/2017, 10:30 PM
    and then add
    tags
    to them
  • b

    benoit

    07/21/2017, 10:31 PM
    feels to me that the
    tags
    can’t live directly onto the
    Recipe
    type
  • b

    benoit

    07/21/2017, 10:31 PM
    as 2 users could favorite the same recipe but add different tags to it
  • b

    benoit

    07/21/2017, 10:31 PM
    what would be the best way to model that join?
  • b

    benoit

    07/21/2017, 10:32 PM
    right now, I’m thinking to create a new type:
    UserRecipe { user, recipe, tags }
    👍🏻 1
    a
    m
    • 3
    • 15
  • b

    benoit

    07/21/2017, 10:32 PM
    but not sure that’s very graphQL like
  • m

    mikael

    07/21/2017, 10:34 PM
    what about not having the tags just be a list or strings? They could be a list of objects like
    { ownerId: <id>, text: <string> }
    and then filter by
    ownerId
    or a slight variation of
    { ownerId: <id>, tags: [<string>, <string>] }
  • b

    benoit

    07/21/2017, 10:35 PM
    but that’d need a
    recipeId
    too then?
  • b

    benoit

    07/21/2017, 10:36 PM
    Like I suggested here?
  • m

    mikael

    07/21/2017, 10:55 PM
    i meant something like
    Copy code
    Recipe {
      id
      ingredients
      steps
      ...whateverElse
      tags [
        {
          ownerId
          tagList: [String!]
        }
      ]
    }
  • g

    gopidon

    07/22/2017, 2:21 AM
    Do functions work on inbuilt models? I created a simple server side subscription on the File model on the create event. However , there is no function invocation when i insert into the file model.
    a
    • 2
    • 2
  • m

    mrtannerjones

    07/22/2017, 2:23 AM
    Hi everyone, I am starting a project that I'd like to use the react/graphql/graphcool tools to build. But I'm VERY over my head. If anyone here does consulting/freelancing, I'd love to take half a day to talk about how you would go about setting up/starting my project. If you're interested, PM me with your $$ rate and if there are any times over the next 3-4 days that fit your schedule (I'm located in the MST timezone, but I'm really flexible on times (I can work evening/night time)
    d
    • 2
    • 1
  • j

    joshpitzalis

    07/22/2017, 2:47 AM
    Has anyone managed to complete the apollo-react howtographql subscriptions tutorial section? I can’t get real time subscriptions to work. In a comment under the youtube video

    https://www.youtube.com/watch?v=YW7F_scpE4wâ–ľ

    Amit Erandole says it won’t work with create-react-app unless you add a proxy field to your package.json. I have no idea what that means, can anyone help by pointing me to the relevant section of the docs or an example.
  • m

    mplis

    07/22/2017, 3:04 AM
    I'm trying to store markdown with
    \n
    for newlines in graph.cool, and then passing that data to
    react-markdown
    . Here's a simple example of what I want to: https://codesandbox.io/s/JZlXMp3Q9
  • m

    mplis

    07/22/2017, 3:05 AM
    The problem is that it seems like graph.cool is escaping my
    \n
    characters, so my markdown is coming out like this: https://codesandbox.io/s/nZpVg1XJ4
    n
    • 2
    • 2
  • m

    medelman

    07/22/2017, 3:20 AM
    Hi. I'm trying to migrate data (~28k nodes) but keep getting booted from the API. I cannot for the life of me figure out how to batch the requests and retain the ability to map new ids and old ids for edge purposes. Been through all the docs I can find, but just cannot get it to work. Anyone have advice?
    m
    n
    • 3
    • 13
  • j

    joshpitzalis

    07/22/2017, 4:27 AM
    I can confirm the new “subscriptions-transport-ws”: “^0.8.1" does work woth create-react-app without the need for a proxy. I just had a typo in my updateQuery in my subscription.
    n
    • 2
    • 1
1...281282283...637Latest