| 761 | } |
| 762 | |
| 763 | const entryIndex = (error: GraphQLError, path: ReadonlyArray<string>, length: number): number | undefined => { |
| 764 | const errorPath = error.path |
| 765 | if (errorPath === undefined || errorPath.length <= path.length) return undefined |
| 766 | for (let i = 0; i < path.length; i++) { |
| 767 | if (errorPath[i] !== path[i]) return undefined |
| 768 | } |
| 769 | const index = errorPath[path.length] |
| 770 | return typeof index === "number" && Number.isInteger(index) && index >= 0 && index < length ? index : undefined |
| 771 | } |
| 772 | |
| 773 | const findList = ( |
| 774 | data: unknown, |