Skip to content

visit API documentation discrepancy #4466

@janmeier

Description

@janmeier

The docs for visit, https://www.graphql-js.org/api-v16/language/#visit mentions that the API can be called in four different ways.

However, it looks like the implementation only supports three of those. Namely, this is not supported neither by the typescript interface, nor the actual implementation

visit(ast, {
  enter: {
    Kind(node) {
      // enter the "Kind" node
    },
  },
  leave: {
    Kind(node) {
      // leave the "Kind" node
    },
  },
});

I can provide a PR to fix it, but I would like to know which part to fix - The documentation, or the implementation ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions