Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Custom Signup Mutation with Hasura Actions Error v1.2.0 when following https://www.youtube.com/watch?v=oqbxEp4FIjE&t=186s #15

Closed
scheung38 opened this issue May 21, 2020 · 2 comments

Comments

@scheung38
Copy link

scheung38 commented May 21, 2020

Create a Custom Signup Mutation with Hasura Actions in Heroku deploy v1.2.0 from following:

https://www.youtube.com/watch?v=oqbxEp4FIjE&t=186s

mutation {
  signup(name: "Seb", home: "UK", email: "xxx@gmail.com", password: "test123") {
    id
  }
}

getting:

{
  "errors": [
    {
      "extensions": {
        "internal": {
          "error": {
            "type": "http_exception",
            "message": "ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = <assumed to be undefined>, addrCanonName = <assumed to be undefined>}, host name: Just \"host.docker.internal\", service name: Just \"3000\"): does not exist (Name or service not known)"
          },
          "response": null,
          "request": {
            "body": {
              "session_variables": {
                "x-hasura-role": "admin"
              },
              "input": {
                "email": "xxx@gmail.com",
                "home": "UK",
                "name": "seb",
                "password": "test"
              },
              "action": {
                "name": "signup"
              }
            },
            "url": "http://host.docker.internal:3000/signup",
            "headers": []
          }
        },
        "path": "$",
        "code": "unexpected"
      },
      "message": "http exception when calling webhook"
    }
  ]
}

This solves it ?

Cloned this project then in auth directory

docker-compose -d
in localhost:8080

mutation {
  signup(name: "Seb", username: "seb@live.com", password: "test123"){
    id
    name
  }
}

also:
"message": "ConnectionFailure Network.Socket.connect: <socket: 33>: does not exist (Connection refused)"

@praveenweb
Copy link
Member

The webhook handler configured in the example is http://host.docker.internal:3000/signup which works for a Node server running on port 3000 on Mac.
In case you are using a different machine (linux or windows) / port, you will need to update that in the Action Modify page.

@alasim
Copy link

alasim commented Jan 29, 2022

Did you please solve it, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants