fix(gatsby): correct the definition for getNode (#33259)
fix(gatsby): correct the definition for getNode (#33259)

`getNode` may return undefined if the given id is not found (could be due to wrong id or node got deleted whatsoever).

See https://github.com/gatsbyjs/gatsby/blob/302bac57037b0f294ad10c7a2068ca8f7bfe5b3f/packages/gatsby/src/datastore/index.ts#L17-L18
gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby