unperser(generator), etc… - visitorͷAPIESLintBabel pluginͱಉ༷ͷܗ ࣜʢNode kindʹcallback͕Ԡ͢ΔλΠϓʣ - ֤callbackʹ͞ΕΔnodenodeใΛอ ͍࣋ͯ͠ͳ͍ (non-recursive, serializableʣ import { parse, visit, DocumentNode } from 'graphql'; const inputString = ` query MyQuery { viewer { id name } } `; const documentNode = parse(inputString); visit(documentNode, { // GraphQL ASTͷNodeछผ OperationDefinition: { enter: node => { // enter visitor͕nodeʹೖͬͨͱ͖ͷॲཧ if (node.operation === 'query') { console.log(node.name?.value); } }, leave: node => { // leavevisitor͕nodeΛग़Δͱ͖ͷॲཧ }, }, });