Class: GraphQL::Relay::GlobalIdResolve
- Inherits:
-
Object
- Object
- GraphQL::Relay::GlobalIdResolve
- Defined in:
- lib/graphql/relay/global_id_resolve.rb
Instance Method Summary collapse
- #call(obj, args, ctx) ⇒ Object
-
#initialize(type:) ⇒ GlobalIdResolve
constructor
A new instance of GlobalIdResolve.
Constructor Details
#initialize(type:) ⇒ GlobalIdResolve
Returns a new instance of GlobalIdResolve.
4 5 6 |
# File 'lib/graphql/relay/global_id_resolve.rb', line 4 def initialize(type:) @type = type end |
Instance Method Details
#call(obj, args, ctx) ⇒ Object
8 9 10 |
# File 'lib/graphql/relay/global_id_resolve.rb', line 8 def call(obj, args, ctx) ctx.query.schema.id_from_object(obj, @type, ctx) end |