CM GraphQL
CM GraphQL is a companion library of helper utilities for common GraphQL patterns in Rails apps: building enums, paging types and reCAPTCHA-verified fields. Pair it with rails generate cm_admin:add_graphql, which sets up the base input, enum and object types the helpers build on.
Helpersβ
| Helper | What it does |
|---|---|
| EnumHelper | Builds GraphQL enums from model enums or plain arrays. |
| PagingTypeHelper | Builds a reusable pagination type for a model's list query. |
| RecaptchaExtension | Verifies reCAPTCHA tokens on a field or mutation. |
Guideβ
- List API β the recommended setup for a list query: sort input, filter input and a paging type.