[PR #30] [MERGED] Implement a GraphQL endpoint and use it in the client #502

Closed
opened 2026-02-27 08:17:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/30
Author: @nitnelave
Created: 8/26/2021
Status: Merged
Merged: 8/30/2021
Merged by: @nitnelave

Base: mainHead: graphql


📝 Commits (10+)

  • ea09c83 Update actix libraries
  • 4c0232c Implement basic GraphQL endpoint with auth
  • e685203 Simplify get_user_groups to take a &str
  • 9e5a857 cli: introduce the export_graphql_schema command
  • c0f564c errors: use anyhow::Context everywhere
  • 8e50506 app: Migrate list_users to use the graphql client
  • ee21c2f app: refactor API methods with empty responses
  • 0cf7b76 api: add the rest of the fields to User
  • d2d7274 Migrate datetimes to UTC
  • cc2a4b1 jwt: Harden check by hardcoding accepted algorithms

📊 Changes

28 files changed (+1057 additions, -154 deletions)

View changed files

📝 .github/workflows/rust.yml (+5 -0)
📝 Cargo.lock (+298 -0)
📝 Cargo.toml (+2 -0)
📝 app/Cargo.toml (+1 -0)
app/queries/list_users.graphql (+10 -0)
📝 app/src/api.rs (+85 -64)
📝 app/src/create_user.rs (+4 -4)
app/src/graphql.rs (+1 -0)
📝 app/src/lib.rs (+1 -0)
📝 app/src/login.rs (+3 -4)
📝 app/src/user_table.rs (+29 -15)
📝 model/src/lib.rs (+2 -2)
schema.graphql (+45 -0)
📝 src/domain/handler.rs (+2 -2)
📝 src/domain/sql_backend_handler.rs (+4 -10)
📝 src/domain/sql_tables.rs (+3 -3)
📝 src/infra/auth_service.rs (+53 -19)
📝 src/infra/cli.rs (+24 -0)
📝 src/infra/configuration.rs (+10 -13)
src/infra/graphql/api.rs (+91 -0)

...and 8 more files

📄 Description

This PR introduces a new endpoint as a GraphQL endpoint. That will help simplify introducing new REST methods (as GraphQL queries instead) and apply best practices.
Auth is still done separately using OPAQUE.

Eventually, lldap_model can be stripped to just the opaque module, since the rest of the data layout is communicated through the GraphQL schema only, simplifying documentation and client integration.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/30 **Author:** [@nitnelave](https://github.com/nitnelave) **Created:** 8/26/2021 **Status:** ✅ Merged **Merged:** 8/30/2021 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `graphql` --- ### 📝 Commits (10+) - [`ea09c83`](https://github.com/lldap/lldap/commit/ea09c83ee8b0be21875f22e3426e9028d0f4c455) Update actix libraries - [`4c0232c`](https://github.com/lldap/lldap/commit/4c0232cba2fd221a062794605969b95bcc04b485) Implement basic GraphQL endpoint with auth - [`e685203`](https://github.com/lldap/lldap/commit/e6852037ccb529015b15914aff8c6db09760cd2a) Simplify get_user_groups to take a &str - [`9e5a857`](https://github.com/lldap/lldap/commit/9e5a8572fb82e6a242b54cae3556ec7e8b1131d4) cli: introduce the export_graphql_schema command - [`c0f564c`](https://github.com/lldap/lldap/commit/c0f564cef29ccd46f95640d36fa784901d834bd7) errors: use anyhow::Context everywhere - [`8e50506`](https://github.com/lldap/lldap/commit/8e50506713e6bf0b4560f10eb3d1d0a66ab83497) app: Migrate list_users to use the graphql client - [`ee21c2f`](https://github.com/lldap/lldap/commit/ee21c2f5fcca38a9fbadf0d493155f19ef9fa9b2) app: refactor API methods with empty responses - [`0cf7b76`](https://github.com/lldap/lldap/commit/0cf7b76c1cd7c7e45940820f2fe2fb3e11bbd62b) api: add the rest of the fields to User - [`d2d7274`](https://github.com/lldap/lldap/commit/d2d7274925d12522e85d38fc448dc354fdded1b2) Migrate datetimes to UTC - [`cc2a4b1`](https://github.com/lldap/lldap/commit/cc2a4b16f7a256e6ab6bdb1ef8edc2d36c1d71cd) jwt: Harden check by hardcoding accepted algorithms ### 📊 Changes **28 files changed** (+1057 additions, -154 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/rust.yml` (+5 -0) 📝 `Cargo.lock` (+298 -0) 📝 `Cargo.toml` (+2 -0) 📝 `app/Cargo.toml` (+1 -0) ➕ `app/queries/list_users.graphql` (+10 -0) 📝 `app/src/api.rs` (+85 -64) 📝 `app/src/create_user.rs` (+4 -4) ➕ `app/src/graphql.rs` (+1 -0) 📝 `app/src/lib.rs` (+1 -0) 📝 `app/src/login.rs` (+3 -4) 📝 `app/src/user_table.rs` (+29 -15) 📝 `model/src/lib.rs` (+2 -2) ➕ `schema.graphql` (+45 -0) 📝 `src/domain/handler.rs` (+2 -2) 📝 `src/domain/sql_backend_handler.rs` (+4 -10) 📝 `src/domain/sql_tables.rs` (+3 -3) 📝 `src/infra/auth_service.rs` (+53 -19) 📝 `src/infra/cli.rs` (+24 -0) 📝 `src/infra/configuration.rs` (+10 -13) ➕ `src/infra/graphql/api.rs` (+91 -0) _...and 8 more files_ </details> ### 📄 Description This PR introduces a new endpoint as a GraphQL endpoint. That will help simplify introducing new REST methods (as GraphQL queries instead) and apply best practices. Auth is still done separately using OPAQUE. Eventually, `lldap_model` can be stripped to just the `opaque` module, since the rest of the data layout is communicated through the GraphQL schema only, simplifying documentation and client integration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 08:17:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#502
No description provided.