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

    Dukuo

    11/19/2017, 8:33 PM
    yeah, so far evidence states that is a system-level bug or something around that
  • d

    daniele

    11/19/2017, 8:44 PM
    @Dukuo maybe I'm doing something wrong
  • d

    daniele

    11/19/2017, 8:44 PM
    also that one doesn't work for me
  • d

    daniele

    11/19/2017, 8:44 PM
    https://github.com/graphcool/framework/tree/master/examples/permissions
  • d

    daniele

    11/19/2017, 8:44 PM
    I deployed on the server
  • d

    Dukuo

    11/19/2017, 8:49 PM
    just deployed it and permissions work on the permissions tab but I haven't run any mutations
  • d

    Dukuo

    11/19/2017, 8:49 PM
    testing permission queries is not available using that project either
  • d

    Dukuo

    11/19/2017, 8:49 PM
    @nilan we really need you here
  • d

    daniele

    11/19/2017, 8:51 PM
    @Dukuo question are you able to test just a
    Authentication
    query?
  • d

    daniele

    11/19/2017, 8:51 PM
    something like:
  • d

    daniele

    11/19/2017, 8:51 PM
    Copy code
    mutation {
      createPost(
        description: "Great sunset"
        imageUrl: "<http://example.org/sunset.png>"
        authorId: "cja78afsqjqd40156aeea8prj" # replace with the `id` of the `User` you created before
      ) {
        id
      }
    }
  • d

    daniele

    11/19/2017, 8:52 PM
    and in HTTP HEADER: adding
    Authorization
    and the token
  • d

    Dukuo

    11/19/2017, 8:57 PM
    are you able to create Users @daniele? }
  • d

    daniele

    11/19/2017, 8:57 PM
    yep
  • d

    Dukuo

    11/19/2017, 8:57 PM
    from the ui ?
  • d

    Dukuo

    11/19/2017, 8:57 PM
    or from a mutation
  • d

    daniele

    11/19/2017, 8:57 PM
    mutation
  • d

    Dukuo

    11/19/2017, 8:57 PM
    that's odd
  • d

    daniele

    11/19/2017, 8:58 PM
    Copy code
    mutation {
      authenticateUser(email: "<mailto:dd@dd.com|dd@dd.com>", password: "dd"){
        token
      }
    }
  • d

    Dukuo

    11/19/2017, 8:58 PM
    cause I can't even create a user
  • d

    Dukuo

    11/19/2017, 8:58 PM
    insufficient permissions
  • d

    Dukuo

    11/19/2017, 8:58 PM
    Copy code
    mutation createUser {
      createUser(
        role:ADMIN
        email:"<mailto:asdasd@asd.com|asdasd@asd.com>"
        password:"asdad"
      ) {
        id
      }
    }
  • d

    daniele

    11/19/2017, 8:58 PM
    with the project that I share with you?
  • d

    Dukuo

    11/19/2017, 8:58 PM
    Copy code
    {
      "data": {
        "createUser": null
      },
      "errors": [
        {
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "path": [
            "createUser"
          ],
          "code": 3008,
          "message": "Insufficient permissions for this mutation",
          "requestId": "eu-west-1:simple:cja78rucwjvqq0156y72u7oh6"
        }
      ]
    }
  • d

    Dukuo

    11/19/2017, 8:58 PM
    yup
  • d

    Dukuo

    11/19/2017, 8:59 PM
    just deployed it and tested right away
  • d

    Dukuo

    11/19/2017, 8:59 PM
    apparently there's no
    create
    permission set
  • d

    daniele

    11/19/2017, 8:59 PM
    Copy code
    mutation {
      signupUser(
        email: "alice@graph.cool" 
        password: "graphql"
        admin: true
      ) {
        id
        token
      }
    }
  • d

    Dukuo

    11/19/2017, 8:59 PM
  • d

    daniele

    11/19/2017, 9:00 PM
    use what I sent to you
1...436437438...637Latest