Skip to main content

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​

HelperWhat it does
EnumHelperBuilds GraphQL enums from model enums or plain arrays.
PagingTypeHelperBuilds a reusable pagination type for a model's list query.
RecaptchaExtensionVerifies 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.