/**
 * Apollo 4.2 declared default options augmentation.
 *
 * Apollo Client 4.2 introduced *declared default options for type safety*: the options
 * `errorPolicy` and `returnPartialData` for `watchQuery`/`query` defaults are gated behind
 * this `DeclareDefaultOptions` augmentation. Without it, those fields collapse to a string
 * sentinel type and plain string literals are rejected with a descriptive error message.
 *
 * This declaration lives at the `@aurora` framework level so every consumer of the framework
 * inherits the correct types without having to augment Apollo per-app.
 *
 * Augmentation target: `@apollo/client` — the canonical public entry point of the package,
 * following the official Apollo 4.2 documentation and changelog examples. The `DeclareDefaultOptions`
 * namespace is nested under the `ApolloClient` namespace, both exported from this module.
 *
 * Only `errorPolicy` is declared for `WatchQuery` and `Query` — the factory sets only
 * `fetchPolicy` + `errorPolicy` (`fetchPolicy` is not gated), so `returnPartialData` is NOT
 * declared (design D1: declare only what a default actually sets). `errorPolicy` accepts the
 * full union of valid values (`'none' | 'ignore' | 'all'`) so both the `'ignore'` and `'all'`
 * literals used by the factory are accepted.
 *
 * @see https://www.apollographql.com/docs/react/data/typescript#declaring-default-options-for-type-safety
 */
import type { ErrorPolicy } from '@apollo/client';

declare module '@apollo/client' {
  namespace ApolloClient {
    namespace DeclareDefaultOptions {
      interface WatchQuery {
        errorPolicy: ErrorPolicy;
      }
      interface Query {
        errorPolicy: ErrorPolicy;
      }
    }
  }
}
