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

    thisismissem

    11/19/2016, 9:53 PM
    Yeah, true
  • t

    thisismissem

    11/19/2016, 9:53 PM
    In other news, I'm playing around with some rather strange (albeit, not graphql) ideas: https://thisismissem.github.io/mesos-dashboard-challenge/
  • t

    thisismissem

    11/19/2016, 9:54 PM
    it's based on https://mesosphere.com/careers/challenges/frontend/
  • t

    thisismissem

    11/19/2016, 9:55 PM
    e.g., middleware that does heavy logic: https://github.com/ThisIsMissEm/mesos-dashboard-challenge/blob/master/src/middleware/api.js
  • t

    thisismissem

    11/19/2016, 9:57 PM
    (it's an odd spec though, tbh, and not something I'd probably implement in production – i.e., if I were to remove a server, I'd expect to be able to just query back for the servers and their instances directly)
  • p

    phil

    11/20/2016, 1:13 AM
    What is the
    x-graphcool-source
    header used for?
  • p

    phil

    11/20/2016, 1:18 AM
    (present with the sample repos, eg https://github.com/graphcool-examples/react-relay-todo-example)
  • n

    nilan

    11/20/2016, 7:28 AM
    hey @phil we use it to check for successful incoming requests in the Onboarding! it is not needed
    😀 2
  • p

    phil

    11/20/2016, 7:38 AM
    cool
  • p

    phil

    11/20/2016, 7:38 AM
    thanks @nilan
  • g

    gerardsans

    11/21/2016, 1:26 PM
    Yay! New talk announced: GraphQL Web Clients by @RubenOostinga incl. Lokka, Apollo and Relay at https://www.meetup.com/GraphQL-London/events/235489110
    graphql 3
  • e

    emilrmoeller

    11/22/2016, 2:13 AM
    Hey! I’m having a blast using graph.cool and have now a fully operational app, but my Urls don’t look good (using id’s), so i would like to hear if there’s any clever ideas on how to handle slugs with graph.cool ?
  • e

    emilrmoeller

    11/22/2016, 2:23 AM
    @nilan follow up on our last talk 🙂 https://github.com/graphcool/feature-requests/issues/20
    ❤️ 1
  • t

    thisismissem

    11/22/2016, 2:31 AM
    other than using a few webtasks to async generate it, nope
  • t

    thisismissem

    11/22/2016, 2:31 AM
    other option might be to try and do it on the client-side
  • t

    thisismissem

    11/22/2016, 2:32 AM
    Copy code
    query {
      post(slug: $value) {
        id
        slug
      }
    }
  • t

    thisismissem

    11/22/2016, 2:32 AM
    and just loop on that
  • e

    emilrmoeller

    11/22/2016, 2:38 AM
    Hi Em @thisismissem, thanks, alright i see, I just foresee some issues on doing it client side as it then needs to try save the post with slug, retrieve the error if already exists, bump up a string letter or number and keep trying until it’s unique, alternatively a relation slug model could be put in place, but as there’s no feature atm to filter from relations, this would cause a lot of headache atm.
  • t

    thisismissem

    11/22/2016, 2:38 AM
    yup
  • e

    emilrmoeller

    11/22/2016, 2:42 AM
    @thisismissem you think this is a valid feature request then? something along these lines: “make unique slug bump on models”: “add constraints to field that it has to be unique throughout the model, if it already exists on creation add +n to the end of string”, or shouldn’t it be the concern on graph.cool ?
  • e

    emilrmoeller

    11/22/2016, 2:50 AM
    Or maybe that won’t even work, hmm, not sure, I’ve always been working client side, so actually never made my own slug-id generation before, i’ll leave it be for now and get back to it later
  • t

    thisismissem

    11/22/2016, 2:51 AM
    Anyone know how to make Enums work with Apollo Client?
  • e

    emilrmoeller

    11/22/2016, 3:20 AM
    just saw your question in apollograph, but yeah it’s strings 🙂
  • t

    thisismissem

    11/22/2016, 4:49 AM
    hehe
  • t

    thisismissem

    11/22/2016, 11:24 PM
    @emilrmoeller I'd say slug generation is very application specific; but I definitely see the value in it
  • e

    emilrmoeller

    11/22/2016, 11:54 PM
    @thisismissem it is, also how they should be generated, i think i just have been used to others making that logic for me while working in teams, or if using things like shopify, wordpress and hexo.io. So when i can’t stand to look at id’s in the URL i’ll take it up again 🙂
  • t

    thisismissem

    11/23/2016, 12:00 AM
    hehe
  • t

    thisismissem

    11/23/2016, 12:01 AM
    @emilrmoeller I actually had a case at my last company where early on we decided not to do pretty urls, as it was a tech challenge not desired to be faced yet; a few months later a developer joint the company who forced this, so now they have a shitty slug implementation that doesn't actually work properly
  • t

    thisismissem

    11/23/2016, 12:02 AM
    (although it's better than his first proposal which was taking the ID field (a UUIDv4), calculating the SHA1 hash of it and taking the first 10 characters)
  • t

    thisismissem

    11/23/2016, 12:02 AM
    He didn't understand that that fundamentally by-passed the exact reason we chose to address content via uuids
1...505152...637Latest