Gql direct execution - Improvements (#18972)

#### Direct Execution  __typename & null backfill
##### __typename filling
The direct execution path now correctly derives __typename at every
level of the GraphQL response:
Connection types — CompanyConnection, CompanyEdge, Company, PageInfo
GroupBy types — TaskGroupByConnection (was incorrectly producing
TaskConnection)
Composite fields — Links, FullName, Currency, etc. handled by a
dedicated formatter (was inheriting the parent object's typename)
Previously, __typename was derived from the object's universal
identifier (a UUID), producing broken values like
20202020B3744779A56180086Cb2E17FConnection.
##### Null backfill
Selected fields missing from the resolver result are backfilled with
null, matching the standard Yoga schema behavior.
##### Integration test
A new test runs the same findMany query (with __typename at all
structural levels) through both paths — standard Yoga schema and direct
execution — and asserts identical output via toStrictEqual.
This commit is contained in:
Etienne
2026-03-30 17:20:25 +02:00
committed by GitHub
parent 2a5aab0c44
commit 3d1c53ec9d
15 changed files with 611 additions and 63 deletions
@@ -0,0 +1,11 @@
import { RESOLVER_METHOD_NAMES } from 'src/engine/api/graphql/workspace-resolver-builder/constants/resolver-method-names';
export const CONNECTION_METHOD_NAMES = new Set<string>([
RESOLVER_METHOD_NAMES.FIND_MANY,
RESOLVER_METHOD_NAMES.FIND_DUPLICATES,
RESOLVER_METHOD_NAMES.CREATE_MANY,
RESOLVER_METHOD_NAMES.UPDATE_MANY,
RESOLVER_METHOD_NAMES.DELETE_MANY,
RESOLVER_METHOD_NAMES.DESTROY_MANY,
RESOLVER_METHOD_NAMES.RESTORE_MANY,
]);