Sha256: 36af2081a4adbf54a7022e435b5856364f5edb17470e0ee7a9598223904625f8
Contents?: true
Size: 384 Bytes
Versions: 33
Compression:
Stored size: 384 Bytes
Contents
module GraphQL module Introspection # A wrapper to create `__typename`. class TypenameField def self.create(wrapped_type) GraphQL::Field.define do name "__typename" description "The name of this type" type -> { !GraphQL::STRING_TYPE } resolve -> (obj, a, c) { wrapped_type.name } end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems