evyos-frontend-development/node_modules/graphql/jsutils/printPathArray.mjs

11 lines
213 B
JavaScript

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