Sha256: e610cfd5b36381fb276fcf4e4492d5c4e50213d84865c7be8e47fc273f070a4f
Contents?: true
Size: 826 Bytes
Versions: 32
Compression:
Stored size: 826 Bytes
Contents
# frozen_string_literal: true require "graphql/query/context" module GraphQL class Query # This object can be `ctx` in places where there is no query class NullContext < Context include Singleton class NullQuery def after_lazy(value) yield(value) end end class NullSchema < GraphQL::Schema end extend Forwardable attr_reader :schema, :query, :warden, :dataloader def_delegators GraphQL::EmptyObjects::EMPTY_HASH, :[], :fetch, :dig, :key? def initialize @query = NullQuery.new @dataloader = GraphQL::Dataloader::NullDataloader.new @schema = NullSchema @warden = Schema::Warden::NullWarden.new(context: self, schema: @schema) end def interpreter? true end end end end
Version data entries
32 entries across 32 versions & 1 rubygems