Skip to main content

Incorporate meta-fields into ExecuteCollectedFields

At a glance​

Timeline​


GraphQL.js uses a getFieldDef() helper:

https://github.com/graphql/graphql-js/blob/9032db1e4e55052bead6936359ecc5592c817f64/src/execution/execute.ts#L1047-L1079

called from executeField() to get the field definition to execute; returning meta-field definitions as appropriate.

This spec change reflects this existing behavior as best we can.

(Technically GraphQL.js' executeField() function overlaps responsibilities between the ExecuteField() and ExecuteCollectedFields() algorithms in the spec - specifically, executeField() may return undefined, resulting in executeFields() not adding the entry to the result object, whereas this conditional addition is handled in ExecuteCollectedFields() in the spec and we cannot/should not differentiate between null and undefined in this way.)