rails_audit_log 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -5
- data/lib/rails_audit_log/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d3b4d1da5762600dfdf6708c7190332a28d1f4dd38061198edbee520032c0e5
|
|
4
|
+
data.tar.gz: 5eb30c1b5bac8cd6597280fea14772535236283259107c55e5f400f7b7f17b15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad86cfe01077841234ad0bbe9b0a84b3329e3ad3553b5da4ce238d3feb774cc7229a8dce5ebbb242a22180bf00def009a19965dde01199688e019f18069d48aa
|
|
7
|
+
data.tar.gz: e92ede455fc5423f1254e2e7ee15da94a843c2f54c9439d0e84111834919d68e8e79f2adf77cc319de14208e2780a95854bf8a98fa8738f624f1b7d1f96888ae
|
data/README.md
CHANGED
|
@@ -909,13 +909,40 @@ article.paper_trail.version_at(1.week.ago) # reconstructed state at a point in t
|
|
|
909
909
|
|
|
910
910
|
[↑ Table of contents](#table-of-contents)
|
|
911
911
|
|
|
912
|
-
|
|
912
|
+
Each companion gem declares `rails_audit_log` as a dependency so you only add what you use.
|
|
913
913
|
|
|
914
|
-
|
|
915
|
-
|---|---|
|
|
916
|
-
| `rails_audit_log-graphql` | Mountable GraphQL endpoint at `/audit/graphql` — queryable audit trail for API-first apps without forcing `graphql-ruby` on users who don't need it |
|
|
914
|
+
### `rails_audit_log-graphql`
|
|
917
915
|
|
|
918
|
-
|
|
916
|
+
[](https://rubygems.org/gems/rails_audit_log-graphql)
|
|
917
|
+
|
|
918
|
+
A mountable GraphQL endpoint for API-first apps. Shipped as a separate gem so `graphql-ruby` is never a transitive dependency for users who don't need it.
|
|
919
|
+
|
|
920
|
+
Add both gems to your `Gemfile`:
|
|
921
|
+
|
|
922
|
+
```ruby
|
|
923
|
+
gem "rails_audit_log"
|
|
924
|
+
gem "rails_audit_log-graphql"
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
Mount the GraphQL engine alongside the main engine:
|
|
928
|
+
|
|
929
|
+
```ruby
|
|
930
|
+
# config/routes.rb
|
|
931
|
+
mount RailsAuditLog::Engine, at: "/audit"
|
|
932
|
+
mount RailsAuditLog::GraphQL::Engine, at: "/audit/graphql"
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
Authentication re-uses `RailsAuditLog.authenticate` — nothing extra to configure.
|
|
936
|
+
|
|
937
|
+
**Queries and subscriptions:**
|
|
938
|
+
|
|
939
|
+
| Operation | Signature | Description |
|
|
940
|
+
|---|---|---|
|
|
941
|
+
| `Query.auditLogEntries` | `(event:, itemType:, itemId:, actorId:, since:, until:, page:)` | Filterable, paginated list |
|
|
942
|
+
| `Query.auditLogEntry` | `(id:)` | Single entry lookup with full diff |
|
|
943
|
+
| `Subscription.auditLogEntryCreated` | `(itemType:, itemId:)` | Real-time stream for a resource (requires Action Cable) |
|
|
944
|
+
|
|
945
|
+
All fields on `AuditLogEntry` are exposed via `AuditLogEntryType`.
|
|
919
946
|
|
|
920
947
|
## Requirements
|
|
921
948
|
|