You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with() on the query builder names the relations a query loads, nested ones by their path
(with('assignee.company', 'label')), in place of max_depth: the relations not named only get their identifier
selected. A relation mapped with Fetch::Lazy is loaded when named, and the relations named are added to the fields
of select().
graphqlorm:query sends a raw GraphQL query to the API of a manager (--manager), with its variables
(--variables='{"id": 1}') or from the standard input, and prints the JSON response. A response holding errors fails
the command; the query is logged and profiled, its values masked there as any other.
hydrateAs() on the query builder hydrates the result as read-only DTOs, created through their constructor, rather
than entities: the query selects their fields only. A parameter maps the field of its name, or another one with #[MapFrom('assignee.name')]; one typed with a class maps a relation to a nested DTO, an array typed list<Dto> a
collection. Neither identity map nor second-level cache; pagination, indexBy() and the result cache work as with
entities. The profiler tells the queries hydrated as DTOs, with the DTO and the number created.
Type converters turn a scalar of the API into a value object (Money, Email, Siret) and back: a service
implementing TypeConverterInterface, autoconfigured, converts the properties typed with the class of its #[AsTypeConverter], or those whose #[Field(converter: ...)] names it. The values of the entities and of the DTOs
are converted, and the value objects of the filters, criteria and indexBy sent back. The "Entities" tab of the
profiler tells the converter of each field.
graphqlorm:cache:warmup [entity] loads the entities marked #[Cache] into the second-level cache, page by page
(--batch-size, 100 by default), those of an entity or every one, of a manager (--manager) or all, and tells how
many were hydrated and kept.
GraphqlCache::evictQueryResults() evicts every result of a manager, with any pool, even shared: the results get a new
key, as the entities with evictEntityRegion(). The results kept before stay valid until a first eviction.
graphqlorm:cache:clear evicts the result cache and the second-level cache: both by default, or --results, --key=..., --entities, --class=..., of a manager (--manager) or all.
graphqlorm:cache:stats describes the caches of each manager: the pool, adapter and lifetime of the result cache and
of each region, the entities marked #[Cache], and how many times they were evicted.