> ## Documentation Index
> Fetch the complete documentation index at: https://fastql.vachagan.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation and execution

> Trace operation selection, coercion, field collection, and completion.

`execute` is async-first and follows a defined sequence:

1. Parse source into a document when needed.
2. Select the requested operation.
3. Validate the document against the schema.
4. Coerce variables using GraphQL input rules.
5. Collect fields across selections, fragments, aliases, and directives.
6. Resolve sibling fields concurrently.
7. Complete scalar, object, list, interface, and union values.
8. Capture field errors and apply non-null propagation.

Argument coercion happens before a resolver is called. Resolver injection plans
separate GraphQL arguments from context, `Info`, and registered dependencies.
Permissions run before extension wrappers and the resolver.

The result preserves partial data where GraphQL nullability allows it. Pre-execution
errors return `executed=False`; runtime errors remain attached to an executed response.

Validation runs a broad rule set — fragment cycles, known and correctly-located
directives, possible fragment spreads, lone anonymous operation, name uniqueness, and
overlapping-fields-can-be-merged — alongside the type and argument checks. Beyond
`execute`, the same engine powers [`subscribe`](/protocol/subscriptions) (an async
iterator of results per source event) and
[`execute_incremental`](/protocol/incremental-delivery) (`@defer` / `@stream`
payloads), and an optional masking policy can replace unexpected resolver errors with
a generic message.
