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

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

Open
choxx opened this issue Nov 29, 2022 · 0 comments
Open

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

choxx opened this issue Nov 29, 2022 · 0 comments

Comments

@choxx
Copy link
Collaborator

choxx commented Nov 29, 2022

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?
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

1 participant