Sha256: ef850fc613a88760e0256d5c5eb9285c52d9f42a851dcb4410159b507999ef14

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

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

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

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

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
graphql-0.12.1 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.12.0 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.11.1 lib/graphql/query/serial_execution/execution_context.rb
graphql-0.11.0 lib/graphql/query/serial_execution/execution_context.rb