Sha256: 7561dbc28952f0004cf1a65738a9a448ec28dd88146728c6c2dc3788b8e66a5b
Contents?: true
Size: 457 Bytes
Versions: 20
Compression:
Stored size: 457 Bytes
Contents
module GraphQL module Introspection # A wrapper to create `__type(name: )` dynamically. class TypeByNameField def self.create(type_hash) GraphQL::Field.define do name("__type") description("A type in the GraphQL system") type(!GraphQL::Introspection::TypeType) argument :name, !types.String resolve -> (o, args, c) { type_hash[args["name"]] } end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems