Skip to content

Get User details with extra data from 3rd party Hasura #41

@choxx

Description

@choxx

Description

For querying users where some data resides at Fusion Auth DB & rest at Hasura side.

Changes

GET /admin/user/:userId
Use the existing devised generic approach; we'll add a new variable in env file JSON against the application ID with a new hasura Query, which will query & add a new fields in the response of this API. E.g.
Request body:

{
	"hasuraMutations": [
        {
            "applicationId": "f0ddb3f6-091b-45e4-8c0f-889f89d4f5da",
            "mutation": "getTeacherDetail",
            "payload": {
                "user_id": "xxxx"
            }
        }
    ]
}

Response body:

{
	...
	"hasuraMutations": [
        {
            "applicationId": "f0ddb3f6-091b-45e4-8c0f-889f89d4f5da",
            "mutation": "getTeacherDetail",
            "response": {
            	....
            	// result from Hasura query
            }
        }
    ]
}

Open Questions:

  1. Does this approach makes sense?
  2. The above is existing GET API. We can pass the request payload as JSON (not sure if it is fine or not). Or, shall we add a new API (like POST /admin/user/:userId/getDetails) with request/response payload/body as mentioned above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions