GraphQL v0.3.0 GraphQL.Lang.AST.CompositeVisitor

A CompositeVisitor composes two Visitor implementations into a single Visitor.

This provides the ability to chain an arbitrary number of visitors together.

The outer_visitor notionally wraps the inner_visitor. The order of operations is thus:

  1. outer_visitor.enter
  2. inner_visitor.enter
  3. inner_visitor.leave
  4. outer_visitor.leave

Summary

Functions

Composes an arbitrarily long list of Visitors into a single Visitor

Composes two Visitors, returning a new one

Functions

compose(list)

Composes an arbitrarily long list of Visitors into a single Visitor.

The order of the list is outer-to-inner. The leftmost visitor will be invoked first upon ‘enter’ and last upon ‘leave’.

compose(outer_visitor, inner_visitor)

Composes two Visitors, returning a new one.