Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/utilssrcfunctionsaddPath

Function: addPath()

addPath(prev, key, typename): Path

Defined in: packages/utils/src/Path.ts:12

Given a Path and a key, return a new Path containing the new key.

Parameters

prev

Readonly<Path> | undefined

key

string | number

typename

string | undefined

Returns

Path