Sha256: 31940809e21bdcf8ce1c554ace89583a738964ac960fb8ac22ddc3e7c849ef86

Contents?: true

Size: 614 Bytes

Versions: 10

Compression:

Stored size: 614 Bytes

Contents

module GraphQL
  class Query
    class SerialExecution
      class ExecutionContext
        attr_reader :query, :schema, :strategy

        def initialize(query, strategy)
          @query = query
          @schema = query.schema
          @strategy = strategy
        end

        def get_type(type)
          @schema.types[type]
        end

        def get_fragment(name)
          @query.fragments[name]
        end

        def get_field(type, name)
          @schema.get_field(type, name)
        end

        def add_error(err)
          @query.context.errors << err
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
graphql-0.16.1 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.16.0 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.15.3 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.15.2 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.14.2 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.15.1 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.15.0 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.14.1 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.14.0 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.13.0 lib/graphql/query/serial_execution/execution_context.rb