Module: Rails::GraphQL::Helpers::WithGlobalID

Included in:
Directive, Field::OutputField, Schema, Type
Defined in:
lib/rails/graphql/helpers/with_global_id.rb

Overview

Helper module that is a different implementation of the GlobalID::Identification, but instead of things being found by the class that they are, it uses owners and base classes.

Instance Method Summary collapse

Instance Method Details

#to_gid_param(options = nil) ⇒ Object

:nodoc:



16
17
18
# File 'lib/rails/graphql/helpers/with_global_id.rb', line 16

def to_gid_param(options = nil)  # :nodoc:
  to_global_id(options).to_param
end

#to_global_id(options = nil) ⇒ Object Also known as: to_gid

:nodoc:



10
11
12
# File 'lib/rails/graphql/helpers/with_global_id.rb', line 10

def to_global_id(options = nil)  # :nodoc:
  GlobalID.create(self, options)
end