nhost / hasura-auth

Authentication for Hasura.
https://nhost.io
MIT License
377 stars 114 forks source link

Refactor: Use SQL instead of GraphQL to interact with the DB #317

Closed plmercereau closed 1 year ago

plmercereau commented 1 year ago

Run DB operations through SQL rather than GraphQL, so the user can pick any Hasura naming convention configuration they want.

As the SQL operations are simpler than the ones generated by Hasura, and as we don't use Hasura anymore to proxy DB operations, we can expect a slight performance increase. This could be benchmarked.

Finally, hasura-auth now only uses the GraphQL API to generate custom claims. We could then limit the hasura-auth metadata sync on startup to the auth.users table, and scrap the rest, so the user has even more flexibility over what they want to track, and how. This would also fasten the start of the hasura-auth service.

Closes #289

Checklist

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 9ffb459d9a1ee2609850b5e84778b3ea3e446866

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | hasura-auth | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR