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

    dankent

    07/25/2017, 3:32 PM
    I think ES2015 is required for template literals
  • m

    mikael

    07/25/2017, 3:33 PM
    Copy code
    CoffeeScript uses backticks to execute code directly as JavaScript. This conflicts with Relay's usage of backticks to write query fragments.
    ah I’ll have to look for a way around this
  • n

    nilan

    07/25/2017, 3:33 PM
    do you have to use Apollo?
  • n

    nilan

    07/25/2017, 3:33 PM
    (or is it Relay?)
  • m

    mikael

    07/25/2017, 3:33 PM
    I’m using Apollo, and no I don’t have to. I think i prefer it though
  • n

    nilan

    07/25/2017, 3:34 PM
    using a simpler GraphQL Client like
    graphql-request
    could be an option if you don't need client-side caching
  • n

    nilan

    07/25/2017, 3:34 PM
    ah ok, sounds like Apollo should be the better choice then
  • d

    dankent

    07/25/2017, 3:34 PM
    Oh, you're using coffeescript
  • d

    dankent

    07/25/2017, 3:34 PM
    https://coderwall.com/p/ocx2ia/template-literals-in-coffeescript
  • n

    nilan

    07/25/2017, 3:34 PM
    wow that looks funny 😄
  • n

    nilan

    07/25/2017, 3:34 PM
    I'm not sure this works with
    gql
    but let us know!
  • d

    dankent

    07/25/2017, 3:36 PM
    It's just about the syntax used to pass a multiline string to gqp without needing to include loads of \n control characters in a standard string. ES2015 provides template literal strings which, as well as adding the ability to inject values, can be written across multiple lines. Coffeescript has template literals too but uses " rather than ` as the syntax for them
  • m

    mikael

    07/25/2017, 3:37 PM
    now its unexpected string. hmm well good thing we’re also converting out of Coffescript with the refactor 😅 haha This is enough info to work off of though, thanks guys!
    👍 1
  • d

    dankent

    07/25/2017, 3:39 PM
    Yeah, using coffeescript makes it a lot harder to use example code that is in vanilla ES as you have to account for these syntax differences
  • m

    mike.johnson

    07/25/2017, 4:07 PM
    do _nodeMeta { count } values get pushed to Algolia integrations when a new related node is created?
    n
    • 2
    • 5
  • s

    staugaard

    07/25/2017, 6:21 PM
    How do you authenticate WS connections using apollo’s
    SubscriptionClient
    ?
  • t

    typeofgraphic

    07/25/2017, 6:27 PM
    I am unable to delete data using the GraphCool interface, though it shows no error -the data remains. When I try to delete via a mutation in the playground, I get the error:
    Copy code
    "The field 'event' on type 'Call' is required. Performing this mutation would violate the constraint"
    Events can have multiple 'calls'. So, should I assume to delete one Event means I have to delete all Calls related to that Event? If so, can anyone advise on doing this when there are multiple Calls to remove?
    d
    • 2
    • 5
  • f

    frankspin

    07/25/2017, 7:44 PM
    Would it be possible to extend a token that is sent by graph.cool after successful login?
    n
    • 2
    • 31
  • a

    auser

    07/25/2017, 11:01 PM
    Is it possible to upload non-image files?
    a
    • 2
    • 27
  • p

    paul

    07/25/2017, 11:29 PM
    This is something I'm struggling with in apollo I guess but any direction for any framework might be helpful. I'm looking to create a mutation that creates multiple types at once. The specific example I have is if there is a
    post
    and each post has
    categories
    or
    tags
    . How would I add a post as well as the related categories in a single call?
    a
    • 2
    • 3
  • c

    chrisgchambers

    07/26/2017, 2:21 AM
    I have three collections of users for one of my types (organization) - clients, staff, and admin.. my gut is telling me to just build three m-m relationships between organization and user and name them accordingly.. am I thinking of this too SQL-y? 😄
    a
    • 2
    • 1
  • m

    matty

    07/26/2017, 5:49 AM
    anyone know if RS256 is now supported?
    a
    • 2
    • 3
  • s

    sammyis

    07/26/2017, 7:28 AM
    Hello! I have a quick question. I am doing the HowToGraphQL tutorial. On the react-apollo tutorial we come across this snippet:
    Copy code
    const ALL_LINKS_QUERY = gql`
      # 2
      query AllLinksQuery {
        allLinks {
          id
          createdAt
          url
          description
        }
      }
    `;
  • s

    sammyis

    07/26/2017, 7:28 AM
    My question is, what in Javascript allows gql to work like that?
  • s

    sammyis

    07/26/2017, 7:29 AM
    It is not written like a function, but it seems to behave like one
    d
    • 2
    • 3
  • n

    nikolasburk

    07/26/2017, 7:34 AM
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals
  • n

    nikolasburk

    07/26/2017, 7:34 AM
    that’s an ES6 feature called template literals
  • d

    dankent

    07/26/2017, 7:37 AM
    There's an explanation of the syntax of calling a function without parentheses when using a template string here: https://stackoverflow.com/questions/33660518/why-can-functions-be-called-without-parentheses-when-using-template-strings
    👌 2
  • s

    sammyis

    07/26/2017, 7:40 AM
    Oooh, didn't know about tagged template literals
  • s

    sammyis

    07/26/2017, 7:40 AM
    Cool, thank you!
1...286287288...637Latest