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