activeadmin-graphql 0.3.3 → 0.4.1

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -3
  3. data/README.md +2 -2
  4. data/docs/changelogs/20260818111600_rfc-0002-problems.md +1 -1
  5. data/docs/changelogs/20260818114000_rfc-as-built-coverage.md +1 -1
  6. data/docs/changelogs/20260818114700_rfc-design-not-version.md +1 -1
  7. data/docs/changelogs/20260907141000_advisory-lockfile-refresh.md +1 -1
  8. data/docs/changelogs/20260921103000_mutation-attribute-allowlists.md +1 -1
  9. data/docs/changelogs/20260921111000_release-0-3-0.md +1 -1
  10. data/docs/changelogs/20260921112800_drop-standard-rubocop-direct.md +1 -1
  11. data/docs/changelogs/20260921120000_graphql-floor-and-activeadmin-4.md +1 -1
  12. data/docs/changelogs/20261010091415_graphql-resource-enabled-default.md +1 -1
  13. data/docs/changelogs/20261010103800_release-0-3-1.md +1 -1
  14. data/docs/changelogs/20261010110600_graphql-identity-dsl.md +4 -0
  15. data/docs/changelogs/20261010111800_release-0-3-2.md +1 -1
  16. data/docs/changelogs/20261012050051_graphql-surface-toggles.md +1 -1
  17. data/docs/changelogs/20261012064500_graphql-capabilities.md +1 -1
  18. data/docs/changelogs/20261012113500_release-0-3-3.md +1 -1
  19. data/docs/changelogs/20261012200000_host-customization-hooks.md +31 -0
  20. data/docs/changelogs/20261013080000_release-0-4-0.md +48 -0
  21. data/docs/changelogs/20261103145000_release-0-4-1.md +26 -0
  22. data/docs/graphql-api.md +154 -102
  23. data/docs/issues/20260907141000_engineering-and-dependency-audit.md +1 -1
  24. data/docs/issues/20260917123253_ci-drop-automatic-dependency-audit.md +1 -1
  25. data/docs/issues/20260921103000_mutation-attribute-allowlists.md +1 -1
  26. data/docs/issues/20260921104400_convention-alignment-audit.md +7 -7
  27. data/docs/issues/20260921114500_dependency-audit.md +13 -13
  28. data/docs/issues/20260921115500_file-length-metrics.md +1 -1
  29. data/docs/issues/20261010111159_rails-composite-primary-keys-alignment.md +13 -13
  30. data/docs/issues/20261010111300_partitions-and-shards-support.md +3 -3
  31. data/docs/issues/20261010111500_graphql-federation-support.md +3 -3
  32. data/docs/issues/20261012200000_host-customization-gaps.md +30 -0
  33. data/docs/issues/20261103145000_engineering-prose-release-audit.md +39 -0
  34. data/docs/plan/20260817201500_rfc-starter.md +1 -1
  35. data/docs/reviews/20261028_engineering-audit-release-preparation.md +24 -0
  36. data/docs/reviews/20261103145000_engineering-prose-release-audit.md +38 -0
  37. data/lib/active_admin/graphql/capability_definition_dsl.rb +9 -4
  38. data/lib/active_admin/graphql/collection_query_policy.rb +103 -0
  39. data/lib/active_admin/graphql/integration.rb +24 -0
  40. data/lib/active_admin/graphql/member_action_capability.rb +14 -0
  41. data/lib/active_admin/graphql/member_action_dry_run.rb +121 -0
  42. data/lib/active_admin/graphql/resource_capability_dsl.rb +4 -3
  43. data/lib/active_admin/graphql/resource_capability_maps.rb +20 -2
  44. data/lib/active_admin/graphql/resource_definition_dsl.rb +17 -6
  45. data/lib/active_admin/graphql/run_action_capability.rb +62 -0
  46. data/lib/active_admin/graphql/run_action_control_extension.rb +72 -0
  47. data/lib/active_admin/graphql/run_action_field.rb +103 -0
  48. data/lib/active_admin/graphql/run_action_mutation_config.rb +8 -0
  49. data/lib/active_admin/graphql/run_action_mutation_dsl.rb +18 -0
  50. data/lib/active_admin/graphql/run_action_preview.rb +20 -0
  51. data/lib/active_admin/graphql/schema_builder/mutation_batch.rb +2 -2
  52. data/lib/active_admin/graphql/schema_builder/mutation_collection.rb +4 -3
  53. data/lib/active_admin/graphql/schema_builder/mutation_create.rb +20 -20
  54. data/lib/active_admin/graphql/schema_builder/mutation_member.rb +8 -3
  55. data/lib/active_admin/graphql/schema_builder/mutation_update_destroy.rb +2 -4
  56. data/lib/active_admin/graphql/schema_builder/query_type_member.rb +1 -4
  57. data/lib/active_admin/graphql/schema_builder/query_type_registered.rb +1 -4
  58. data/lib/active_admin/graphql/schema_builder/resolvers.rb +46 -7
  59. data/lib/active_admin/graphql/schema_builder/types_object.rb +2 -1
  60. data/lib/active_admin/graphql/schema_builder/wire.rb +2 -1
  61. data/lib/active_admin/graphql/schema_field.rb +85 -10
  62. data/lib/active_admin/graphql/version.rb +1 -1
  63. data/lib/active_admin/graphql.rb +7 -0
  64. metadata +15 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36bec145bd90193ae32e34aa54b7a6ed01dff13a8b104269b771f797262b2480
4
- data.tar.gz: 82724e08af33a67a1a9146813965e5d836006620ff503099842addcdeaab16cb
3
+ metadata.gz: e0aa72556d0c931c7ad67f5e1ed0dea17865d0ca6ce09a0456b6f77a8b8ddf8f
4
+ data.tar.gz: 30ee1796f2fc10d7b5be67c353d049ff76608b872d4f07d00119fd8957ddd2a3
5
5
  SHA512:
6
- metadata.gz: 0b9ddc6e9d85447807e5cbbf9d1e5c9b5c87b756eaa8325cb57fe8ce291e221b40e1afd200ddb683a73cba036b83b6eac6f8f5ab3e0ff9788c1864e7f550cc16
7
- data.tar.gz: 806443d03640f31e48d893998cd9f693bafd5efce162798ff406ed2eee2ad43d7c0c588467b8fbd37fdab4a3a6049a9efcbadffbe337469cac7bc5ff958bf36f
6
+ metadata.gz: e899e659b91eaf7a9ad101b682f62c8d7d7f5f3626158c2bbbfabf92f6eeb9fffa6428c50223a7a2ce1b04d9da8c9bfe52ae3d187f4611d39cefca655f8e7ae8
7
+ data.tar.gz: 2feaf624f3bb2f3784f4256b41211ff6b2e2864b1d10d68941c2793c284ea4aacf25b64459b54858b0d57bdc1533d18b2c99462f3ab7a15c88bd35629d94f04b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,34 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.4.1 (2026-11-03)
4
+
5
+ - Return `null` for member and `registered_resource` queries when the record
6
+ exists but instance read is denied (same shape as a missing id).
7
+ - Return `not found` for update and destroy when instance authorization fails
8
+ (same message as a missing id).
9
+ - Roll back a `resolve_create` hook persist when instance create is denied
10
+ (nested transaction around the hook).
11
+ - Fail closed when release confirmation input reaches EOF.
12
+ - Require a matching `CHANGELOG.md` version heading before `gem push`.
13
+ - Run the test workflow on pull requests targeting `main`.
14
+
15
+ ## 0.4.0 (2026-10-13)
16
+
17
+ - Add field `capability_mode` (`:omit` / `:null`) and namespace hooks
18
+ `graphql_field_capability_mode_default` and `graphql_field_visible` (RFC 0009).
19
+ - Add `member_action_mutation ... dry_run: true` with `preview`, `extra_params`,
20
+ `ok` / `refuse`, and optional `graphql_run_action_audit` (RFC 0010).
21
+ - Add `graphql_collection_query_policy` and
22
+ `CollectionQueryPolicy.require_visible_fields!`, inferring filter grants from
23
+ resource field capabilities by default (RFC 0011).
24
+ - Add `graphql_member_action_capability_default`,
25
+ `graphql_batch_action_capability_default`,
26
+ `graphql_collection_action_capability_default`, and `capability:` on
27
+ `batch_action_mutation` / `member_action_mutation` /
28
+ `collection_action_mutation` (RFC 0012).
29
+ - Add `dry_run:` / `confirm:` / `preview:` on `SchemaField`, preview
30
+ short-circuit via `RunActionControlExtension`, and
31
+ `RunActionField.define` DSL sugar for custom run-action fields (RFC 0013).
4
32
 
5
33
  ## 0.3.3 (2026-10-12)
6
34
 
@@ -32,7 +60,7 @@
32
60
  - Put ActiveRecord validation messages on GraphQL error `extensions.errors` when create or update fails.
33
61
  - Log GraphQL execute with namespace, operation name, and error count.
34
62
  - Test ActiveAdmin 4.0.0.beta23 on Rails 8. Keep ActiveAdmin 3.5 on Rails 7.2.
35
- - Add `rfcs/` starter pack: process (RFC 0001), positioning (RFC 0002), and Standards Track design RFCs 0003–0005 for HTTP endpoint, schema DSL, and authorization.
63
+ - Add `rfcs/` starter pack: process (RFC 0001), positioning (RFC 0002), and Standards Track design RFCs 0003-0005 for HTTP endpoint, schema DSL, and authorization.
36
64
 
37
65
  ## 0.2.1 (2026-07-14)
38
66
 
@@ -64,4 +92,4 @@
64
92
  ## 0.1.0 (2026-03-30)
65
93
 
66
94
  - Initial release: GraphQL API for ActiveAdmin extracted from the `activeadmin` fork, usable as `gem "activeadmin-graphql"` alongside `activeadmin` and `graphql`.
67
- - Docs: full guide in [`docs/graphql-api.md`](docs/graphql-api.md), including a “Migrating GraphQL clients” section (enum names, typed CRUD inputs, `ActiveAdminKeyValuePair` lists). Links from an optional ActiveAdmin fork or doc site are mainly for discovery.
95
+ - Docs: full guide in [`docs/graphql-api.md`](docs/graphql-api.md), including a "Migrating GraphQL clients" section (enum names, typed CRUD inputs, `ActiveAdminKeyValuePair` lists). Links from an optional ActiveAdmin fork or doc site are mainly for discovery.
data/README.md CHANGED
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  Bundler loads this gem as usual; that requires `graphql-ruby` and wires ActiveAdmin routing and DSL for GraphQL.
28
28
 
29
- Documentation: [docs/graphql-api.md](docs/graphql-api.md) covers the endpoint, schema, `graphql do … end`, authorization, composite PKs, visibility, and dataloaders. For an older GraphQL integration, see “Migrating GraphQL clients” in that guide (enum type names, typed mutation inputs, key/value lists vs JSON).
29
+ Documentation: [docs/graphql-api.md](docs/graphql-api.md) covers the endpoint, schema, `graphql do ... end`, authorization, composite PKs, visibility, and dataloaders. For an older GraphQL integration, see "Migrating GraphQL clients" in that guide (enum type names, typed mutation inputs, key/value lists vs JSON).
30
30
 
31
31
  ## Development
32
32
 
@@ -63,4 +63,4 @@ No local ActiveAdmin checkout is required; the dummy app depends on the publishe
63
63
 
64
64
  ## License
65
65
 
66
- MIT — see [LICENSE.md](LICENSE.md).
66
+ MIT - see [LICENSE.md](LICENSE.md).
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -1,6 +1,6 @@
1
1
  ## Participants
2
2
 
3
- - amkisko
3
+ Andrei Makarov (@amkisko)
4
4
 
5
5
  ## Decisions
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -1,6 +1,6 @@
1
1
  ## Participants
2
2
 
3
- Andrei Makarov
3
+ Andrei Makarov (@amkisko)
4
4
 
5
5
  ## Decisions
6
6
 
@@ -1,6 +1,6 @@
1
1
  ## Participants
2
2
 
3
- Andrei Makarov
3
+ Andrei Makarov (@amkisko)
4
4
 
5
5
  ## Decisions
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -1,5 +1,9 @@
1
1
  # GraphQL identity DSL (RFC 0007)
2
2
 
3
+ ## Participants
4
+
5
+ Andrei Makarov (@amkisko)
6
+
3
7
  ## Decisions
4
8
 
5
9
  Ship `graphql { identity *columns, separator:, encode:, decode: }` so resources
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Participants
4
4
 
5
- Andrei Makarov
5
+ Andrei Makarov (@amkisko)
6
6
 
7
7
  ## Decisions
8
8
 
@@ -0,0 +1,31 @@
1
+ # Host customization hooks
2
+
3
+ ## Participants
4
+
5
+ Andrei Makarov (@amkisko)
6
+
7
+ ## Decisions
8
+
9
+ Ship generic namespace hooks and DSL for field capability null mode, member-action
10
+ dry-run with preview, collection query policy, default run-action capabilities,
11
+ and confirm/dry-run/preview plus RunActionField.define for custom mutations.
12
+ Product allowlists and auth grants stay in the host application.
13
+
14
+ ## Effects
15
+
16
+ RFCs 0009 through 0013 claimed and drafted. Implementation under 0.4.0 in
17
+ CHANGELOG.md. Request specs cover null-mode introspection, dry-run short-circuit,
18
+ collection filter refusal, default capability omit, and confirm_required.
19
+
20
+ ## Next
21
+
22
+ Metadata prepared in docs/changelogs/20261013080000_release-0-4-0.md. Run make
23
+ release when ready to push the gem and tag. Host apps can drop prepends that
24
+ duplicated these mechanics after upgrading.
25
+
26
+ ## Source
27
+
28
+ RFCs 0009-0013. Specs under spec/requests/graphql_capability_mode_spec.rb,
29
+ graphql_member_action_dry_run_spec.rb, graphql_collection_query_policy_spec.rb,
30
+ graphql_run_action_capability_default_spec.rb,
31
+ graphql_run_action_confirm_spec.rb.
@@ -0,0 +1,48 @@
1
+ # Release 0.4.0 metadata
2
+
3
+ ## Participants
4
+
5
+ Andrei Makarov (@amkisko)
6
+
7
+ ## Decisions
8
+
9
+ Cut 0.4.0 after published 0.3.3. User-visible work since the 0.3.3 tag:
10
+ field capability null mode and visibility hooks (RFC 0009), member-action
11
+ dry-run with preview and optional audit (RFC 0010), collection query policy
12
+ with filter grants inferred from field capabilities (RFC 0011), default
13
+ run-action capabilities and per-mutation `capability:` (RFC 0012), and
14
+ confirm / dry-run / preview plus `RunActionField.define` for custom
15
+ run-action fields (RFC 0013). Product allowlists and auth grants stay in the
16
+ host application.
17
+
18
+ CHANGELOG Unreleased bullets moved under 0.4.0 dated 2026-10-13.
19
+
20
+ Version constant is 0.4.0. Path gem pins in Gemfile.lock and appraisal
21
+ lockfiles match.
22
+
23
+ make release (usr/bin/release.rb) still owns gem build, gem push, git tag, and
24
+ GitHub release. This pass only prepares metadata.
25
+
26
+ ## Effects
27
+
28
+ lib/active_admin/graphql/version.rb VERSION is 0.4.0.
29
+
30
+ CHANGELOG host-customization bullets live under 0.4.0.
31
+
32
+ PATH specs for activeadmin-graphql in Gemfile.lock,
33
+ gemfiles/rails72.gemfile.lock, gemfiles/rails8ruby4.gemfile.lock, and
34
+ gemfiles/rails8ruby34.gemfile.lock are 0.4.0.
35
+
36
+ ## Next
37
+
38
+ Run make release from a clean tree when ready to push the gem and tag 0.4.0.
39
+
40
+ ## Source
41
+
42
+ docs/changelogs/20261012200000_host-customization-hooks.md
43
+ rfcs/0009-field-capability-mode.md
44
+ rfcs/0010-member-action-dry-run.md
45
+ rfcs/0011-collection-query-policy.md
46
+ rfcs/0012-run-action-capability-defaults.md
47
+ rfcs/0013-run-action-confirm-dry-run.md
48
+ usr/bin/release.rb
@@ -0,0 +1,26 @@
1
+ # Release 0.4.1 metadata
2
+
3
+ ## Participants
4
+
5
+ Andrei Makarov (@amkisko)
6
+
7
+ ## Decisions
8
+
9
+ Cut 0.4.1 on 2026-11-03. Ship the auth oracle alignment, resolve_create rollback, and release tooling gates in one patch. Leave make release to create the tag and publish the gem after the tree is clean.
10
+
11
+ ## Effects
12
+
13
+ lib/active_admin/graphql/version.rb VERSION is 0.4.1.
14
+
15
+ CHANGELOG.md section 0.4.1 names the auth shape, create hook transaction, EOF confirmation, changelog heading gate, and pull_request CI.
16
+
17
+ ## Next
18
+
19
+ Run make release from a clean tree when ready to push the gem and tag 0.4.1.
20
+
21
+ ## Source
22
+
23
+ docs/issues/20261103145000_engineering-prose-release-audit.md
24
+ docs/reviews/20261103145000_engineering-prose-release-audit.md
25
+ usr/bin/release.rb
26
+ usr/lib/release_version_check.rb