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

    signor_busi

    07/15/2017, 4:08 PM
    basically I would like to do a mutation like this:
    Copy code
    mutation {
      createPokemon(name: "Charmander", type: FIRE) {
        type
      }
    
      createPokemon(name: "Bulbasaur", type: GRASS) {
        type
      }
    }
  • s

    signor_busi

    07/15/2017, 4:09 PM
    instead of this:
    Copy code
    mutation {
      charmander: createPokemon(name: "Charmander", type: FIRE) {
        type
      }
    
      bulbasaur: createPokemon(name: "Bulbasaur", type: GRASS) {
        type
      }
    }
  • p

    peterp

    07/15/2017, 5:25 PM
    @signor_busi - hold that thought, looking for the example
  • a

    agartha

    07/15/2017, 6:14 PM
    Q: I tried to find the FR for queries/mutations over wss. I'm sure I've seen it, but I can't find it. Any news on that?
    n
    • 2
    • 3
  • i

    ilija_nl

    07/15/2017, 9:58 PM
    Is it possible to verify authorization token on my server without making query to user?
    n
    • 2
    • 2
  • c

    coffenbacher

    07/15/2017, 11:48 PM
    Hey all, where is the latest Graphcool roadmap? Specifically I'm trying to find the current status for this feature https://github.com/graphcool/feature-requests/issues/70 . The linked feature-requests repo seems to be deprecated
    n
    • 2
    • 2
  • k

    komondor

    07/16/2017, 12:15 AM
    is there an option to export a project permission configuration ? like export schema . Or to push new permission or function from the command line ? thank you
    👍 2
    d
    n
    • 3
    • 3
  • j

    jledbetter

    07/16/2017, 12:22 AM
    Hello, graphcool people. I am having an issue pushing changes to my graphcool.project file. Anyone have any ideas of what is going on?
  • m

    mwickett

    07/16/2017, 12:25 AM
    @jledbetter Looks like you’re trying to add a required relationship when there is already Votes entires that don’t have a connection to a User.
  • j

    jledbetter

    07/16/2017, 12:26 AM
    Ah interesting. I wonder how that happened.
  • m

    mwickett

    07/16/2017, 12:27 AM
    Check your data to see what’s in there - if there are only a handful of entries you could manually relate them to a user, or just blow away your data if you’re in dev / testing.
  • j

    jledbetter

    07/16/2017, 12:27 AM
    I do not see any mention of vote entires within the graphcool console
  • m

    mwickett

    07/16/2017, 12:27 AM
    So you haven’t added any actual data yet?
  • j

    jledbetter

    07/16/2017, 12:27 AM
    Okay, I misunderstood you.
  • j

    jledbetter

    07/16/2017, 12:28 AM
    I will update them manually
  • m

    mwickett

    07/16/2017, 12:29 AM
    @nilan I worked up a better version of my slug function that checks for existing slugs and adds a dash and an integer to the new slug. Right now it’s kind of specific to my project (because it has a query, and uses graphql-request so has a PAT. Let me know if you think it’s worth sharing and you want to take a crack at abstracting it for others to use.
    a
    n
    • 3
    • 111
  • d

    dixonbydesign

    07/16/2017, 3:23 AM
    Hey guys! I'm trying to set up some basic authentication with Auth0 but I'm getting stuck on my createUser mutation. Every time I try to create a user I get
    Error: GraphQL error: The provided idToken is invalid. Please see <https://auth0.com/docs/tokens/id_token> for how to obtain a valid idToken
  • d

    dixonbydesign

    07/16/2017, 3:24 AM
    But I'm passing along the token I get back from Auth0, and it contains all the correct user info, so I don't understand why it would be invalid. Has anyone else experienced this or have an idea of what the problem could be?
  • c

    cj

    07/16/2017, 3:25 AM
    @dixonbydesign https://graphcool.slack.com/archives/C0MQJ62NL/p1499710660457513
  • a

    auser

    07/16/2017, 3:26 AM
    yeah, are you using the jwt token? @cj
  • a

    auser

    07/16/2017, 3:26 AM
    I had that trouble too — it’s the jwt (the long one)
  • c

    cj

    07/16/2017, 3:27 AM
    Auth0 changed their default encoding, you need to switch it to HS256
  • c

    cj

    07/16/2017, 3:27 AM
    1) Open your Auth0 console 2) Clients 3) Select a client 4) At the bottom, click "Advanced settings" 5) Under Oauth, change JsonWebToken Signature Algorithm to HS256
  • d

    dixonbydesign

    07/16/2017, 3:31 AM
    @cj @auser Appreciate the responses. I have verified the signature algorithm is set to HS256. And yes I believe I'm sending the correct token (the long one). And you use the same token for the network interface header right?
    Copy code
    netIntReq.options.headers.authorization = `Bearer ${req.cookies.auth0IdToken}`
  • c

    cj

    07/16/2017, 3:31 AM
    @dixonbydesign correct
  • a

    auser

    07/16/2017, 3:35 AM
    is there a way to fake graphcool? Testing functions is really painful right now
  • d

    dixonbydesign

    07/16/2017, 3:36 AM
    Hmm When I decode the token at https://jwt.io/ it says the signature is invalid.
  • d

    dixonbydesign

    07/16/2017, 3:37 AM
    It also lists the algorithm as RS256:
    Copy code
    {
      "typ": "JWT",
      "alg": "RS256",
      "kid": "NkEzMEEwNTk0MzU5RkZCNTcxOTY4NkMwMjE2MjQ2Q0Q2QzIzNEU0OA"
    }
  • c

    cj

    07/16/2017, 3:38 AM
    you'll need to follow the instructions above and then login again to get a new token
  • d

    dixonbydesign

    07/16/2017, 4:23 AM
    For posterity's sake, my issue was with the
    Token Endpoint Authentication Method
    setting. Somehow it was set to
    None
    but should've been set to
    Post
    Thanks for the assist @cj @auser !
1...271272273...637Latest