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

    joar

    09/27/2017, 1:41 PM
    @mwickett
    Copy code
    const AuthLink = (operation, forward) => {
      const token = store.getState().authToken;
    
      operation.setContext(context => ({
        ...context,
        headers: {
          ...context.headers,
          authorization: `Bearer ${token}`, // however you get your token
        },
      }));
    
      return forward(operation);
    };
  • j

    joar

    09/27/2017, 1:41 PM
    And then add that link anywhere you want in your chain
  • m

    mwickett

    09/27/2017, 1:42 PM
    Thanks. I’m just getting into 2.0, so wrapping my head around the new architecture is taking a second.
  • j

    joar

    09/27/2017, 1:42 PM
    Its super beta tho, be careful
  • j

    joar

    09/27/2017, 1:42 PM
    I had to revert my whole implementation
  • m

    mwickett

    09/27/2017, 1:42 PM
    I’m not planning to use it in production yet, but wanted to be prepared πŸ™‚
  • j

    joao.santos

    09/27/2017, 1:43 PM
    CAn you guys put the code that is working soomewhere?
  • j

    joao.santos

    09/27/2017, 1:43 PM
    i cant get it to work
  • s

    schickling

    09/27/2017, 1:43 PM
    Hey everyone <!here>! We’ve just open-sourced the GraphQL Playground! https://twitter.com/graphcool/status/913030949402800133 We’ve been using the Playground internally for many months now and wanted to share it with the community. We’re looking forward to your feedback and hope you like it 😊 P.S. The Playground is also currently on Producthunt - would be awesome if you could show some love over there! πŸ’š
    πŸ”₯ 6
    πŸ‘ 36
    πŸ’ͺ🏻 5
    🦜 41
    ❀️ 11
    πŸ‘ 12
    πŸ’― 13
    πŸŽ‰ 11
    πŸš€ 11
    metal 4
    graphcool 13
    πŸ’š 13
  • g

    gustav

    09/27/2017, 1:44 PM
    Woop! upvoted
    πŸ’― 1
    n
    • 2
    • 1
  • c

    chandlervdw

    09/27/2017, 1:47 PM
    How do I filter a subscription (or a query) by a specific relationship id? I’ve got the following inside my `subscribeToMore()`:``` document: gql` subscription { Donation( filter: { mutation_in: [CREATED, UPDATED, DELETED] node: { campaign: { id: this.props.campaignId } } } ) { mutation node { id amount email isPaid } previousValues { id } } } `,``` but
    this.props.campaignId
    is not valid inside the
    gql
    a
    d
    • 3
    • 6
  • o

    overra

    09/27/2017, 2:54 PM
    can graphql-playground be used with local graphql servers?
    n
    • 2
    • 7
  • n

    nilan

    09/27/2017, 3:03 PM
    @merott,
    previousValues
    does not return an object of type
    Place
    , but of type
    PlacePreviousValues
    .
    πŸ‘ 1
    m
    • 2
    • 5
  • a

    ahmedlhanafy

    09/27/2017, 3:07 PM
    @nilan Playground is not working with me, I have express server and I installed it following the documentation
  • a

    ahmedlhanafy

    09/27/2017, 3:08 PM
    It routes me to
    /new
    with
    Loading GraphQL Playground
    text and no errors or anything
    n
    d
    • 3
    • 2
  • v

    Vijay

    09/27/2017, 3:27 PM
    How come graphcool module add graphcool/modules/authentication/email-password doesn't work for me?
    n
    • 2
    • 4
  • v

    Vijay

    09/27/2017, 3:27 PM
    the module command is "unknown"
  • i

    iamclaytonray

    09/27/2017, 4:55 PM
    ^ If I set a name in the relation to the correct spelling, how would I go about correcting the spelling for queries?
    a
    • 2
    • 8
  • a

    agartha

    09/27/2017, 7:46 PM
    Heads up: webtask.io finally upgraded to Node 8! So for all your external webhooks: https://tomasz.janczuk.org/2017/09/auth0-webtasks-and-node-8.html That includes support for async/await etc.
    πŸŽ‰ 2
    a
    • 2
    • 2
  • j

    Jhony Reyes

    09/27/2017, 10:34 PM
    Hi everyone, is there any way to filter data by date?
  • j

    Jhony Reyes

    09/27/2017, 10:34 PM
    for example: creation date
    m
    a
    • 3
    • 9
  • m

    marceloogeda

    09/27/2017, 10:35 PM
    Anyone here used the
    email-password
    authentication module? Do you know what is the public key to verify the signature on JWT website?
  • c

    coolboyjules

    09/27/2017, 11:13 PM
    @agartha this is great. does that mean that the inline functions schema extensions will also support node 8?
    a
    j
    +2
    • 5
    • 31
  • c

    coolboyjules

    09/28/2017, 1:11 AM
    guys we should really have a warning if switching the funciton trigger after editing your code. there is no warning! your code gets completely wiped
  • c

    coolboyjules

    09/28/2017, 1:13 AM
    obviously i am currently a bit triggered as i lost code. i will post an issue lol
  • l

    lifeiscontent

    09/28/2017, 7:42 AM
    Hey, is there a way to retrieve the basic auth mutations from graphcool as functions that I can change? I’d like to modify the createUser function to fit my needs.
    a
    c
    • 3
    • 2
  • r

    rein

    09/28/2017, 12:20 PM
    hey guys, is there any tutorial/doc on using apollo with redux? Or what do you guys do?
    h
    • 2
    • 3
  • j

    joao.santos

    09/28/2017, 1:15 PM
    Anyone using Graphcool with apollo 2.0?
    d
    • 2
    • 7
  • c

    cball

    09/28/2017, 1:58 PM
    anyone else having trouble logging in to the forum? wont move past the login window after auth is complete
    n
    • 2
    • 3
  • c

    chandlervdw

    09/28/2017, 2:27 PM
    In the https://www.graph.cool/docs/tutorials/react-apollo-auth0-pheiph4ooj/ tutorial, it says this:
    >> Note: We redirect to
    /login
    to give the user the possibility to add additional required information. If your
    User
    type has no additional required fields, you can simply call the user query to check if there is already a user with the
    auth0IdToken
    generated by Auth0 as detailed above. If there is no such user, you can immediately run the
    createUser
    mutation instead of redirecting to
    /login
    . If there already is such a user, you can redirect the user to
    /
    instead.
1...352353354...637Latest