Swap-Aggregator-Subgraph/node_modules/graphql/jsutils/printPathArray.js.flow
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

14 lines
283 B
Plaintext

// @flow strict
/**
* Build a string describing the path.
*/
export default function printPathArray(
path: $ReadOnlyArray<string | number>,
): string {
return path
.map((key) =>
typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key,
)
.join('');
}