Skip to content

Instantly share code, notes, and snippets.

@akhtarja

akhtarja/1.rb Secret

Created June 1, 2020 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhtarja/7a0557614aa2de6ed1119ed82586a433 to your computer and use it in GitHub Desktop.
Save akhtarja/7a0557614aa2de6ed1119ed82586a433 to your computer and use it in GitHub Desktop.
Blog post 3 - Returning a JSON Field From Rails GraphQL
module GraphqlUtils::Types
Json = GraphQL::ScalarType.define do
name 'JSON'
description 'JSON type'
end
end
field :aJSONField,
GraphqlUtils::Types::Json,
'A field with freeform JSON data',
property: :a_json_field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment