Repository: apollographql/apollo-client Branch: main Commit: 5eb5cac1d4bb Files: 936 Total size: 11.5 MB Directory structure: gitextract_ribxjpsg/ ├── .api-reports/ │ ├── api-report-cache.api.md │ ├── api-report-core.api.md │ ├── api-report-dev.api.md │ ├── api-report-errors.api.md │ ├── api-report-incremental.api.md │ ├── api-report-link.api.md │ ├── api-report-link_batch-http.api.md │ ├── api-report-link_batch.api.md │ ├── api-report-link_client-awareness.api.md │ ├── api-report-link_context.api.md │ ├── api-report-link_error.api.md │ ├── api-report-link_http.api.md │ ├── api-report-link_persisted-queries.api.md │ ├── api-report-link_remove-typename.api.md │ ├── api-report-link_retry.api.md │ ├── api-report-link_schema.api.md │ ├── api-report-link_subscriptions.api.md │ ├── api-report-link_utils.api.md │ ├── api-report-link_ws.api.md │ ├── api-report-local-state.api.md │ ├── api-report-masking.api.md │ ├── api-report-react.api.md │ ├── api-report-react_compiled.api.md │ ├── api-report-react_internal.api.md │ ├── api-report-react_internal_compiler-runtime.api.md │ ├── api-report-react_ssr.api.md │ ├── api-report-testing.api.md │ ├── api-report-testing_internal.api.md │ ├── api-report-testing_react.api.md │ ├── api-report-utilities.api.md │ ├── api-report-utilities_environment.api.md │ ├── api-report-utilities_internal.api.md │ ├── api-report-utilities_internal_globals.api.md │ ├── api-report-utilities_internal_ponyfills.api.md │ ├── api-report-utilities_invariant.api.md │ ├── api-report-utilities_subscriptions_relay.api.md │ ├── api-report-v4-migration.api.md │ ├── api-report-zz_removals.api.md │ └── api-report.api.md ├── .attw.json ├── .changeset/ │ ├── README.md │ └── config.json ├── .circleci/ │ └── config.yml ├── .claude/ │ ├── commands/ │ │ └── chores.md │ ├── documentation.md │ ├── hooks.md │ └── settings.json ├── .git-blame-ignore-revs ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── bug.yml │ │ ├── feature-request.md │ │ └── question-discussion.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── dependabot.yml │ ├── instructions/ │ │ └── apollo-client.instructions.md │ └── workflows/ │ ├── api-extractor.yml │ ├── arethetypeswrong.yml │ ├── change-prerelease-tag.yml │ ├── cleanup-checks.mjs │ ├── cleanup-checks.yml │ ├── close-stale-issues.yml │ ├── compare-build-output.yml │ ├── copilot-setup-steps.yml │ ├── devtools-errorcodes.yml │ ├── docmodel.yml │ ├── exit-prerelease.yml │ ├── issue-close-user-survey.yml │ ├── knip.yml │ ├── lock.yml │ ├── prerelease.yml │ ├── publish-pr-releases.yml │ ├── release.yml │ ├── scheduled-test-canary.yml │ └── size-limit.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── .semgrepignore ├── .size-limit.cjs ├── .size-limits.json ├── .vscode/ │ ├── launch.json │ └── settings.json ├── CHANGELOG.md ├── CLAUDE.md ├── COLLABORATORS.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── ROADMAP.md ├── VERSIONING_POLICY.md ├── api-extractor.json ├── codegen/ │ ├── CHANGELOG.md │ ├── local-state/ │ │ ├── config.ts │ │ ├── index.ts │ │ ├── plugin.ts │ │ └── visitor.ts │ ├── package.json │ └── tsconfig.json ├── config/ │ ├── FixJSDOMEnvironment.js │ ├── apiExtractor.ts │ ├── babel.ts │ ├── build.ts │ ├── bundlesize.ts │ ├── compare-build-output-to.sh │ ├── compileTs.ts │ ├── deprecateInternals.ts │ ├── dirname.cjs │ ├── entryPoints.ts │ ├── exports.ts │ ├── helpers.ts │ ├── inlineInheritDoc.ts │ ├── jest/ │ │ └── react-dom-17-client.js │ ├── jest.config.ts │ ├── listImports.ts │ ├── madge.ts │ ├── precheck.ts │ ├── prepareDist.ts │ ├── preserveTsIgnore.ts │ ├── prettier/ │ │ ├── format-jsdoc.js │ │ ├── format-mdx3.js │ │ └── test.ts │ ├── processInvariants.ts │ ├── react-compiler.ts │ ├── schema.package.json.ts │ ├── size-limit/ │ │ ├── index.js │ │ └── package.json │ ├── tsconfig.json │ ├── verifySourceMaps.ts │ └── version.ts ├── docs/ │ ├── README.md │ ├── shared/ │ │ └── MdxProvidedComponents.ts │ ├── source/ │ │ ├── _sidebar.yaml │ │ ├── api/ │ │ │ ├── cache/ │ │ │ │ └── InMemoryCache.mdx │ │ │ ├── core/ │ │ │ │ ├── ApolloClient.mdx │ │ │ │ └── ObservableQuery.mdx │ │ │ ├── errors/ │ │ │ │ ├── CombinedGraphQLErrors.mdx │ │ │ │ ├── CombinedProtocolErrors.mdx │ │ │ │ ├── LinkError.mdx │ │ │ │ ├── LocalStateError.mdx │ │ │ │ ├── ServerError.mdx │ │ │ │ ├── ServerParseError.mdx │ │ │ │ └── UnconventionalError.mdx │ │ │ ├── link/ │ │ │ │ ├── apollo-link-base-batch-http.mdx │ │ │ │ ├── apollo-link-base-http.mdx │ │ │ │ ├── apollo-link-batch-http.mdx │ │ │ │ ├── apollo-link-batch.mdx │ │ │ │ ├── apollo-link-client-awareness.mdx │ │ │ │ ├── apollo-link-context.mdx │ │ │ │ ├── apollo-link-error.mdx │ │ │ │ ├── apollo-link-http.mdx │ │ │ │ ├── apollo-link-persisted-queries.mdx │ │ │ │ ├── apollo-link-remove-typename.mdx │ │ │ │ ├── apollo-link-retry.mdx │ │ │ │ ├── apollo-link-schema.mdx │ │ │ │ ├── apollo-link-subscriptions.mdx │ │ │ │ ├── apollo-link-ws.mdx │ │ │ │ ├── apollo-link.mdx │ │ │ │ ├── community-links.mdx │ │ │ │ └── introduction.mdx │ │ │ └── react/ │ │ │ ├── ApolloProvider.mdx │ │ │ ├── hooks-experimental.mdx │ │ │ ├── hooks.mdx │ │ │ ├── preloading.mdx │ │ │ ├── skipToken.mdx │ │ │ ├── ssr.mdx │ │ │ ├── testing.mdx │ │ │ ├── useApolloClient.mdx │ │ │ ├── useBackgroundQuery.mdx │ │ │ ├── useFragment.mdx │ │ │ ├── useLazyQuery.mdx │ │ │ ├── useLoadableQuery.mdx │ │ │ ├── useMutation.mdx │ │ │ ├── useQuery.mdx │ │ │ ├── useQueryRefHandlers.mdx │ │ │ ├── useReactiveVar.mdx │ │ │ ├── useReadQuery.mdx │ │ │ ├── useSubscription.mdx │ │ │ └── useSuspenseQuery.mdx │ │ ├── caching/ │ │ │ ├── advanced-topics.mdx │ │ │ ├── cache-configuration.mdx │ │ │ ├── cache-field-behavior.mdx │ │ │ ├── cache-interaction.mdx │ │ │ ├── garbage-collection.mdx │ │ │ ├── memory-management.mdx │ │ │ └── overview.mdx │ │ ├── data/ │ │ │ ├── defer.mdx │ │ │ ├── directives.mdx │ │ │ ├── document-transforms.mdx │ │ │ ├── error-handling.mdx │ │ │ ├── file-uploads.mdx │ │ │ ├── fragments.mdx │ │ │ ├── mutations.mdx │ │ │ ├── operation-best-practices.mdx │ │ │ ├── persisted-queries.mdx │ │ │ ├── queries.mdx │ │ │ ├── refetching.mdx │ │ │ ├── subscriptions.mdx │ │ │ ├── suspense.mdx │ │ │ └── typescript.mdx │ │ ├── development-testing/ │ │ │ ├── client-schema-mocking.mdx │ │ │ ├── developer-tooling.mdx │ │ │ ├── graphql-codegen.mdx │ │ │ ├── reducing-bundle-size.mdx │ │ │ ├── schema-driven-testing.mdx │ │ │ └── testing.mdx │ │ ├── get-started.mdx │ │ ├── index.mdx │ │ ├── integrations/ │ │ │ ├── integrations.mdx │ │ │ ├── nextjs.mdx │ │ │ ├── react-native.mdx │ │ │ ├── react-router.mdx │ │ │ ├── tanstack-start.mdx │ │ │ └── webpack.mdx │ │ ├── local-state/ │ │ │ ├── local-resolvers.mdx │ │ │ ├── local-state-management.mdx │ │ │ ├── managing-state-with-field-policies.mdx │ │ │ └── reactive-variables.mdx │ │ ├── migrating/ │ │ │ └── apollo-client-4-migration.mdx │ │ ├── networking/ │ │ │ ├── advanced-http-networking.mdx │ │ │ ├── authentication.mdx │ │ │ └── basic-http-networking.mdx │ │ ├── pagination/ │ │ │ ├── core-api.mdx │ │ │ ├── cursor-based.mdx │ │ │ ├── key-args.mdx │ │ │ ├── offset-based.mdx │ │ │ └── overview.mdx │ │ ├── performance/ │ │ │ ├── babel.mdx │ │ │ ├── optimistic-ui.mdx │ │ │ ├── performance.mdx │ │ │ └── server-side-rendering.mdx │ │ └── why-apollo.mdx │ └── tsconfig.json ├── eslint-local-rules/ │ ├── canonical-references.ts │ ├── fixtures/ │ │ ├── file.ts │ │ ├── react.tsx │ │ └── tsconfig.json │ ├── forbid-act-in-disabled-act-environment.test.ts │ ├── forbid-act-in-disabled-act-environment.ts │ ├── generics.ts │ ├── import-from-export.test.ts │ ├── import-from-export.ts │ ├── index.mjs │ ├── package.json │ ├── require-disable-act-environment.test.ts │ ├── require-disable-act-environment.ts │ ├── require-using-disposable.test.ts │ ├── require-using-disposable.ts │ ├── testSetup.ts │ └── tsconfig.json ├── eslint.config.mjs ├── integration-tests/ │ ├── .gitignore │ ├── .npmrc │ ├── api.har │ ├── browser-esm/ │ │ ├── html/ │ │ │ ├── jsdeliver-esm.html │ │ │ ├── jspm-prepared.html │ │ │ └── unpkg-unmangled.html │ │ ├── package.json │ │ ├── playwright.config.ts │ │ └── tests/ │ │ └── playwright/ │ │ ├── jsdeliver-esm.test.ts │ │ ├── jspm-prepared.test.ts │ │ └── unpkg-unmangled.test.ts │ ├── cra5/ │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── public/ │ │ │ └── index.html │ │ ├── src/ │ │ │ ├── App.tsx │ │ │ └── index.tsx │ │ ├── tests/ │ │ │ └── playwright/ │ │ │ └── apollo-client.test.ts │ │ └── tsconfig.json │ ├── empty.har │ ├── next/ │ │ ├── next-env.d.ts │ │ ├── next.config.js │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── cc/ │ │ │ │ │ ├── ApolloWrapper.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── client.ts │ │ │ │ ├── layout.tsx │ │ │ │ └── page.tsx │ │ │ ├── libs/ │ │ │ │ ├── apolloClient.ts │ │ │ │ └── schemaLink.ts │ │ │ └── pages/ │ │ │ ├── _app.tsx │ │ │ ├── pages-no-ssr.tsx │ │ │ └── pages.tsx │ │ ├── tests/ │ │ │ └── playwright/ │ │ │ └── apollo-client.test.ts │ │ └── tsconfig.json │ ├── node/ │ │ ├── package.json │ │ ├── test-cjs.cjs │ │ ├── test-esm.mjs │ │ └── test-require-esm.cjs │ ├── package.json │ ├── peerdeps-tsc/ │ │ ├── .gitignore │ │ ├── package.json │ │ ├── src/ │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── pnpm-workspace.yaml │ ├── shared/ │ │ ├── fixture.ts │ │ ├── package.json │ │ └── playwright.config.ts │ ├── vite/ │ │ ├── index.html │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── src/ │ │ │ ├── ApolloLinkResultType.ts │ │ │ ├── App.tsx │ │ │ ├── enhanceDataStates.ts │ │ │ ├── enhanceMaskingTypes.ts │ │ │ └── main.tsx │ │ ├── tests/ │ │ │ └── playwright/ │ │ │ └── apollo-client.test.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── vite-swc/ │ │ ├── index.html │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── src/ │ │ │ ├── App.tsx │ │ │ └── main.tsx │ │ ├── tests/ │ │ │ └── playwright/ │ │ │ └── apollo-client.test.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ └── wrapping-library/ │ ├── package.json │ ├── src/ │ │ └── index.ts │ └── tsconfig.json ├── jsconfig.json ├── knip.config.js ├── package.json ├── patches/ │ ├── @changesets+parse+0.4.0.patch │ ├── @microsoft+api-extractor+7.49.1.patch │ ├── @testing-library+react+16.1.0.patch │ ├── eslint-plugin-testing-library+7.1.1.patch │ ├── graphql-17-alpha9+17.0.0-alpha.9.patch │ ├── optimism+0.18.0.patch │ ├── pretty-format+29.7.0.patch │ └── react-dom-17+17.0.2.patch ├── renovate.json ├── scripts/ │ ├── changesets/ │ │ └── categorized/ │ │ ├── categorize.js │ │ ├── categorized.yaml │ │ └── package.json │ ├── codemods/ │ │ ├── ac2-to-ac3/ │ │ │ ├── README.md │ │ │ ├── examples/ │ │ │ │ ├── client-and-cache.ts │ │ │ │ ├── link-packages.js │ │ │ │ └── react-packages.tsx │ │ │ ├── imports.js │ │ │ └── package.json │ │ ├── ac3-to-ac4/ │ │ │ ├── CHANGELOG.md │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── runLocally.sh │ │ │ ├── src/ │ │ │ │ ├── @types/ │ │ │ │ │ └── jscodeshift.d.ts │ │ │ │ ├── __testfixtures__/ │ │ │ │ │ ├── imports.input.ts │ │ │ │ │ └── imports.output.ts │ │ │ │ ├── __tests__/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ ├── exports.test.ts.snap │ │ │ │ │ │ └── removals.test.ts.snap │ │ │ │ │ ├── apolloClientInitialization.test.ts │ │ │ │ │ ├── diffTransform.ts │ │ │ │ │ ├── exports.json │ │ │ │ │ ├── exports.new.json │ │ │ │ │ ├── exports.removed.json │ │ │ │ │ ├── exports.removed.local.json │ │ │ │ │ ├── exports.test.ts │ │ │ │ │ ├── fixtures.test.ts │ │ │ │ │ ├── handleIdentifierRename.test.ts │ │ │ │ │ ├── imports.test.ts │ │ │ │ │ ├── legacyEntryPoints.test.ts │ │ │ │ │ ├── links.test.ts │ │ │ │ │ └── removals.test.ts │ │ │ │ ├── apolloClientInitialization.ts │ │ │ │ ├── cli.ts │ │ │ │ ├── devLoader.js │ │ │ │ ├── imports.ts │ │ │ │ ├── index.ts │ │ │ │ ├── legacyEntrypoints.ts │ │ │ │ ├── links.ts │ │ │ │ ├── removals.ts │ │ │ │ ├── renames.ts │ │ │ │ ├── types.ts │ │ │ │ └── util/ │ │ │ │ ├── callExpressionToNewExpression.ts │ │ │ │ ├── entryPointAliases.ts │ │ │ │ ├── findImportDeclarationFor.ts │ │ │ │ ├── findImportSpecifiersFor.ts │ │ │ │ ├── findOrInsertImport.ts │ │ │ │ ├── findReferences.ts │ │ │ │ ├── getAllExports.ts │ │ │ │ ├── getProperty.ts │ │ │ │ ├── getUnusedIdentifier.ts │ │ │ │ ├── handleIdentiferRename.ts │ │ │ │ ├── handleModuleRename.ts │ │ │ │ ├── monkeyPatchAstTypes.ts │ │ │ │ ├── moveGlobalIdentifierToNamespaceAccess.ts │ │ │ │ ├── pick.ts │ │ │ │ ├── renameGlobalIdentifier.ts │ │ │ │ └── reorderGenericArguments.ts │ │ │ ├── tsconfig.build.json │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.tests.json │ │ │ └── vitest.config.ts │ │ ├── data-masking/ │ │ │ ├── examples/ │ │ │ │ ├── queries-codegen.ts │ │ │ │ ├── queries-react.tsx │ │ │ │ ├── queries.graphql │ │ │ │ └── queries.ts │ │ │ ├── package.json │ │ │ ├── tsconfig.json │ │ │ └── unmask.ts │ │ └── misc/ │ │ └── mockLinkRejection.ts │ └── memory/ │ ├── README.md │ ├── package.json │ ├── tests.cts │ └── tsconfig.json ├── src/ │ ├── __tests__/ │ │ ├── ApolloClient.ts │ │ ├── __snapshots__/ │ │ │ ├── ApolloClient.ts.snap │ │ │ ├── client.ts.snap │ │ │ ├── exports.ts.snap │ │ │ └── mutationResults.ts.snap │ │ ├── client.ts │ │ ├── dataMasking.ts │ │ ├── exports.ts │ │ ├── fetchMore.ts │ │ ├── graphqlSubscriptions.ts │ │ ├── local-state/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── export.ts.snap │ │ │ │ └── general.ts.snap │ │ │ ├── export.ts │ │ │ ├── general.ts │ │ │ ├── resolvers.ts │ │ │ └── subscriptions.ts │ │ ├── mutationResults.ts │ │ ├── optimistic.ts │ │ ├── refetchQueries.ts │ │ ├── resultCacheCleaning.ts │ │ └── subscribeToMore.ts │ ├── cache/ │ │ ├── core/ │ │ │ ├── __tests__/ │ │ │ │ ├── cache.ts │ │ │ │ └── cache.watchFragment/ │ │ │ │ └── types.test.ts │ │ │ ├── cache.ts │ │ │ └── types/ │ │ │ ├── Cache.ts │ │ │ └── common.ts │ │ ├── deprecated.ts │ │ ├── index.ts │ │ └── inmemory/ │ │ ├── __tests__/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── cache.ts.snap │ │ │ │ ├── entityStore.ts.snap │ │ │ │ ├── fragmentMatcher.ts.snap │ │ │ │ ├── policies.ts.snap │ │ │ │ ├── roundtrip.ts.snap │ │ │ │ └── writeToStore.ts.snap │ │ │ ├── cache.ts │ │ │ ├── cache.writeQuery/ │ │ │ │ └── extensions.test.ts │ │ │ ├── diffAgainstStore.ts │ │ │ ├── entityStore.ts │ │ │ ├── fragmentMatcher.ts │ │ │ ├── fragmentRegistry.ts │ │ │ ├── helpers.ts │ │ │ ├── key-extractor.ts │ │ │ ├── optimistic.ts │ │ │ ├── policies.ts │ │ │ ├── readFromStore.ts │ │ │ ├── recordingCache.ts │ │ │ ├── roundtrip.ts │ │ │ └── writeToStore.ts │ │ ├── entityStore.ts │ │ ├── fragmentRegistry.ts │ │ ├── helpers.ts │ │ ├── inMemoryCache.ts │ │ ├── key-extractor.ts │ │ ├── policies.ts │ │ ├── reactiveVars.ts │ │ ├── readFromStore.ts │ │ ├── types.ts │ │ └── writeToStore.ts │ ├── config/ │ │ └── jest/ │ │ ├── areCombinedGraphQLErrorsEqual.ts │ │ ├── areCombinedProtocolErrorsEqual.ts │ │ ├── areGraphQlErrorsEqual.ts │ │ ├── areLocalStateErrorsEqual.ts │ │ ├── areMissingFieldErrorsEqual.ts │ │ ├── areServerErrorsEqual.ts │ │ ├── areWeakRefsEqual.ts │ │ ├── resolver.ts │ │ └── setup.ts │ ├── core/ │ │ ├── ApolloClient.ts │ │ ├── ObservableQuery.ts │ │ ├── QueryInfo.ts │ │ ├── QueryManager.ts │ │ ├── __tests__/ │ │ │ ├── ApolloClient/ │ │ │ │ ├── general.test.ts │ │ │ │ ├── links.test.ts │ │ │ │ └── multiple-results.test.ts │ │ │ ├── ObservableQuery.ts │ │ │ ├── client.mutate/ │ │ │ │ └── refetchQueries.test.ts │ │ │ ├── client.query/ │ │ │ │ ├── context.ts │ │ │ │ └── defaultOptions.test.ts │ │ │ ├── client.readFragment/ │ │ │ │ └── general.test.ts │ │ │ ├── client.watchFragment/ │ │ │ │ ├── arrays.test.ts │ │ │ │ ├── general.test.ts │ │ │ │ ├── getCurrentResult.test.ts │ │ │ │ └── types.test.ts │ │ │ ├── client.watchQuery/ │ │ │ │ ├── defer20220824.test.ts │ │ │ │ ├── deferGraphQL17Alpha9.test.ts │ │ │ │ ├── streamDefer20220824.test.ts │ │ │ │ └── streamGraphQL17Alpha9.test.ts │ │ │ ├── client.writeFragment/ │ │ │ │ └── general.test.ts │ │ │ ├── client.writeQuery/ │ │ │ │ └── extensions.test.ts │ │ │ └── fetchPolicies.ts │ │ ├── deprecated.ts │ │ ├── index.ts │ │ ├── networkStatus.ts │ │ ├── types.ts │ │ └── watchQueryOptions.ts │ ├── dev/ │ │ ├── index.ts │ │ ├── loadDevMessages.ts │ │ ├── loadErrorMessageHandler.ts │ │ ├── loadErrorMessages.ts │ │ ├── setErrorMessageHandler.ts │ │ └── symbol.ts │ ├── errors/ │ │ ├── CombinedGraphQLErrors.ts │ │ ├── CombinedProtocolErrors.ts │ │ ├── LinkError.ts │ │ ├── LocalStateError.ts │ │ ├── ServerError.ts │ │ ├── ServerParseError.ts │ │ ├── UnconventionalError.ts │ │ ├── __tests__/ │ │ │ ├── CombinedGraphQLErrors.test.ts │ │ │ ├── CombinedProtocolErrors.test.ts │ │ │ ├── LinkError.test.ts │ │ │ └── is.test.ts │ │ ├── index.ts │ │ ├── isErrorLike.ts │ │ └── utils.ts │ ├── incremental/ │ │ ├── handlers/ │ │ │ ├── __tests__/ │ │ │ │ ├── defer20220824/ │ │ │ │ │ ├── defer.test.ts │ │ │ │ │ └── stream.test.ts │ │ │ │ └── graphql17Alpha9/ │ │ │ │ ├── defer.test.ts │ │ │ │ └── stream.test.ts │ │ │ ├── defer20220824.ts │ │ │ ├── graphql17Alpha9.ts │ │ │ └── notImplemented.ts │ │ ├── index.ts │ │ └── types.ts │ ├── invariantErrorCodes.ts │ ├── link/ │ │ ├── batch/ │ │ │ ├── __tests__/ │ │ │ │ └── batchLink.ts │ │ │ ├── batchLink.ts │ │ │ ├── batching.ts │ │ │ └── index.ts │ │ ├── batch-http/ │ │ │ ├── BaseBatchHttpLink.ts │ │ │ ├── __tests__/ │ │ │ │ └── batchHttpLink.ts │ │ │ ├── batchHttpLink.ts │ │ │ └── index.ts │ │ ├── client-awareness/ │ │ │ ├── ClientAwarenessLink.ts │ │ │ ├── __tests__/ │ │ │ │ └── ClientAwarenessLink.test.ts │ │ │ └── index.ts │ │ ├── context/ │ │ │ ├── __tests__/ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── core/ │ │ │ ├── ApolloLink.ts │ │ │ ├── __tests__/ │ │ │ │ └── ApolloLink.ts │ │ │ ├── concat.ts │ │ │ ├── deprecated.ts │ │ │ ├── empty.ts │ │ │ ├── execute.ts │ │ │ ├── from.ts │ │ │ ├── split.ts │ │ │ └── types.ts │ │ ├── error/ │ │ │ ├── __tests__/ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── http/ │ │ │ ├── BaseHttpLink.ts │ │ │ ├── HttpLink.ts │ │ │ ├── __tests__/ │ │ │ │ ├── HttpLink.ts │ │ │ │ ├── checkFetcher.ts │ │ │ │ ├── headerNormalization.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── parseAndCheckHttpResponse.ts │ │ │ │ ├── responseIterator.ts │ │ │ │ ├── responseIteratorNoAsyncIterator.ts │ │ │ │ ├── selectHttpOptionsAndBody.ts │ │ │ │ └── selectURI.ts │ │ │ ├── checkFetcher.ts │ │ │ ├── createSignalIfSupported.ts │ │ │ ├── index.ts │ │ │ ├── parseAndCheckHttpResponse.ts │ │ │ ├── rewriteURIForGET.ts │ │ │ ├── selectHttpOptionsAndBody.ts │ │ │ └── selectURI.ts │ │ ├── index.ts │ │ ├── persisted-queries/ │ │ │ ├── __tests__/ │ │ │ │ ├── persisted-queries.test.ts │ │ │ │ └── react.test.tsx │ │ │ └── index.ts │ │ ├── remove-typename/ │ │ │ ├── __tests__/ │ │ │ │ └── removeTypenameFromVariables.ts │ │ │ ├── index.ts │ │ │ └── removeTypenameFromVariables.ts │ │ ├── retry/ │ │ │ ├── __tests__/ │ │ │ │ ├── delayFunction.ts │ │ │ │ ├── retryFunction.ts │ │ │ │ └── retryLink.ts │ │ │ ├── delayFunction.ts │ │ │ ├── index.ts │ │ │ ├── retryFunction.ts │ │ │ └── retryLink.ts │ │ ├── schema/ │ │ │ ├── __tests__/ │ │ │ │ └── schemaLink.ts │ │ │ └── index.ts │ │ ├── subscriptions/ │ │ │ ├── __tests__/ │ │ │ │ └── graphqlWsLink.ts │ │ │ └── index.ts │ │ ├── utils/ │ │ │ ├── __tests__/ │ │ │ │ └── filterOperationVariables.ts │ │ │ ├── createOperation.ts │ │ │ ├── filterOperationVariables.ts │ │ │ └── index.ts │ │ └── ws/ │ │ ├── __tests__/ │ │ │ └── webSocketLink.ts │ │ └── index.ts │ ├── local-state/ │ │ ├── LocalState.ts │ │ ├── __tests__/ │ │ │ └── LocalState/ │ │ │ ├── aliases.test.ts │ │ │ ├── async.test.ts │ │ │ ├── base.test.ts │ │ │ ├── cache.test.ts │ │ │ ├── context.test.ts │ │ │ ├── errors.test.ts │ │ │ ├── exports.test.ts │ │ │ ├── fixtures/ │ │ │ │ ├── base-types.ts │ │ │ │ ├── context-value.ts │ │ │ │ ├── local-resolvers-without-context-value.ts │ │ │ │ ├── local-resolvers.ts │ │ │ │ └── localSchema.graphql │ │ │ ├── forcedResolvers.test.ts │ │ │ ├── fragments.test.ts │ │ │ ├── partialData.test.ts │ │ │ ├── rootValue.test.ts │ │ │ ├── subscriptions.test.ts │ │ │ ├── testUtils.ts │ │ │ └── types.test.ts │ │ └── index.ts │ ├── masking/ │ │ ├── GraphQLCodegenDataMasking.ts │ │ ├── PreserveTypes.ts │ │ ├── __benches__/ │ │ │ └── types.bench.ts │ │ ├── __tests__/ │ │ │ ├── maskFragment.test.ts │ │ │ ├── maskOperation.test.ts │ │ │ └── utils.test.ts │ │ ├── index.ts │ │ ├── internal/ │ │ │ └── types.ts │ │ ├── maskDefinition.ts │ │ ├── maskFragment.ts │ │ ├── maskOperation.ts │ │ ├── types.ts │ │ └── utils.ts │ ├── react/ │ │ ├── context/ │ │ │ ├── ApolloContext.ts │ │ │ ├── ApolloProvider.tsx │ │ │ └── __tests__/ │ │ │ └── ApolloProvider.test.tsx │ │ ├── hooks/ │ │ │ ├── __tests__/ │ │ │ │ ├── bundle.test.tsx │ │ │ │ ├── useApolloClient.test.tsx │ │ │ │ ├── useBackgroundQuery/ │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ ├── deferGraphQL17Alpha9.test.tsx │ │ │ │ │ ├── skipToken.test.tsx │ │ │ │ │ ├── streamDefer20220824.test.tsx │ │ │ │ │ ├── streamGraphQL17Alpha9.test.tsx │ │ │ │ │ └── testUtils.tsx │ │ │ │ ├── useBackgroundQuery.test.tsx │ │ │ │ ├── useFragment/ │ │ │ │ │ └── arrays.test.tsx │ │ │ │ ├── useFragment.test.tsx │ │ │ │ ├── useLazyQuery.test.tsx │ │ │ │ ├── useLoadableQuery/ │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ └── deferGraphQL17Alpha9.test.tsx │ │ │ │ ├── useLoadableQuery.test.tsx │ │ │ │ ├── useMutation/ │ │ │ │ │ ├── context.test.tsx │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ └── deferGraphQL17Alpha9.test.tsx │ │ │ │ ├── useMutation.test.tsx │ │ │ │ ├── useQuery/ │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ ├── deferGraphQL17Alpha9.test.tsx │ │ │ │ │ ├── streamDefer20220824.test.tsx │ │ │ │ │ └── streamGraphQL17Alpha9.test.tsx │ │ │ │ ├── useQuery.test.tsx │ │ │ │ ├── useQueryRefHandlers.test.tsx │ │ │ │ ├── useReactiveVar.test.tsx │ │ │ │ ├── useSubscription.test.tsx │ │ │ │ ├── useSuspenseFragment/ │ │ │ │ │ └── arrays.test.tsx │ │ │ │ ├── useSuspenseFragment.test.tsx │ │ │ │ ├── useSuspenseQuery/ │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ ├── deferGraphQL17Alpha9.test.tsx │ │ │ │ │ ├── skipToken.test.tsx │ │ │ │ │ ├── streamDefer20220824.test.tsx │ │ │ │ │ ├── streamGraphQL17Alpha9.test.tsx │ │ │ │ │ └── testUtils.tsx │ │ │ │ └── useSuspenseQuery.test.tsx │ │ │ ├── constants.ts │ │ │ ├── internal/ │ │ │ │ ├── __tests__/ │ │ │ │ │ ├── useDeepMemo.test.ts │ │ │ │ │ └── useRenderGuard.test.tsx │ │ │ │ ├── __use.ts │ │ │ │ ├── index.ts │ │ │ │ ├── useDeepMemo.ts │ │ │ │ ├── useIsomorphicLayoutEffect.ts │ │ │ │ ├── useRenderGuard.ts │ │ │ │ ├── useSuspenseHookCacheKey.ts │ │ │ │ ├── validateSuspenseHookOptions.ts │ │ │ │ └── wrapHook.ts │ │ │ ├── useApolloClient.ts │ │ │ ├── useBackgroundQuery.ts │ │ │ ├── useFragment.ts │ │ │ ├── useLazyQuery.ts │ │ │ ├── useLoadableQuery.ts │ │ │ ├── useMutation.ts │ │ │ ├── useQuery.ts │ │ │ ├── useQueryRefHandlers.ts │ │ │ ├── useReactiveVar.ts │ │ │ ├── useReadQuery.ts │ │ │ ├── useSubscription.ts │ │ │ ├── useSuspenseFragment.ts │ │ │ ├── useSuspenseQuery.ts │ │ │ └── useSyncExternalStore.ts │ │ ├── index.react-server.ts │ │ ├── index.ts │ │ ├── internal/ │ │ │ ├── cache/ │ │ │ │ ├── FragmentReference.ts │ │ │ │ ├── QueryReference.ts │ │ │ │ ├── SuspenseCache.ts │ │ │ │ ├── __tests__/ │ │ │ │ │ ├── QueryReference.test.tsx │ │ │ │ │ └── SuspenseCache.ts │ │ │ │ ├── getSuspenseCache.ts │ │ │ │ └── types.ts │ │ │ ├── compiler-runtime/ │ │ │ │ ├── LICENSE │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── query-preloader/ │ │ │ ├── __tests__/ │ │ │ │ ├── createQueryPreloader/ │ │ │ │ │ ├── defer20220824.test.tsx │ │ │ │ │ └── deferGraphQL17Alpha9.test.tsx │ │ │ │ └── createQueryPreloader.test.tsx │ │ │ └── createQueryPreloader.ts │ │ ├── ssr/ │ │ │ ├── __tests__/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ ├── prerenderStatic.test.tsx.snap │ │ │ │ │ └── useQuery.test.tsx.snap │ │ │ │ ├── getDataFromTree.test.tsx │ │ │ │ ├── polyfillReactDomTypes.d.ts │ │ │ │ ├── prerenderStatic.test.tsx │ │ │ │ ├── useQuery.test.tsx │ │ │ │ ├── useQueryEndToEnd.test.tsx │ │ │ │ └── useReactiveVar.test.tsx │ │ │ ├── getDataFromTree.ts │ │ │ ├── index.ts │ │ │ ├── prerenderStatic.tsx │ │ │ ├── renderToStringWithData.ts │ │ │ └── useSSRQuery.ts │ │ └── types/ │ │ ├── deprecated.ts │ │ └── types.documentation.ts │ ├── testing/ │ │ ├── core/ │ │ │ ├── mocking/ │ │ │ │ ├── __tests__/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── mockLink.ts.snap │ │ │ │ │ └── mockLink.ts │ │ │ │ ├── mockLink.ts │ │ │ │ └── mockSubscriptionLink.ts │ │ │ └── types/ │ │ │ └── deprecated.ts │ │ ├── index.ts │ │ ├── internal/ │ │ │ ├── ObservableStream.ts │ │ │ ├── __tests__/ │ │ │ │ └── ObservableStream.test.ts │ │ │ ├── asyncIterableSubject.ts │ │ │ ├── declarations.d.ts │ │ │ ├── disposables/ │ │ │ │ ├── __tests__/ │ │ │ │ │ ├── spyOnConsole.test.ts │ │ │ │ │ └── withCleanup.test.ts │ │ │ │ ├── enableFakeTimers.ts │ │ │ │ ├── index.ts │ │ │ │ ├── spyOnConsole.ts │ │ │ │ ├── withCleanup.ts │ │ │ │ └── withProdMode.ts │ │ │ ├── incremental/ │ │ │ │ ├── executeSchemaGraphQL17Alpha2.ts │ │ │ │ └── executeSchemaGraphQL17Alpha9.ts │ │ │ ├── index.ts │ │ │ ├── link.ts │ │ │ ├── markAsStreaming.ts │ │ │ ├── messageChannelPolyfill.ts │ │ │ ├── multipart/ │ │ │ │ ├── mockDefer20220824.ts │ │ │ │ ├── mockDeferStreamGraphql17Alpha9.ts │ │ │ │ ├── mockMultipartSubscriptionStream.ts │ │ │ │ └── utils.ts │ │ │ ├── promiseWithResolvers.ts │ │ │ ├── renderHelpers.tsx │ │ │ ├── resetApolloContext.ts │ │ │ ├── rtl/ │ │ │ │ ├── actAsync.ts │ │ │ │ ├── renderAsync.ts │ │ │ │ └── renderHookAsync.tsx │ │ │ ├── scenarios/ │ │ │ │ └── index.ts │ │ │ ├── schemas/ │ │ │ │ ├── friendList.graphql17Alpha2.ts │ │ │ │ └── friendList.graphql17Alpha9.ts │ │ │ └── wait.ts │ │ ├── matchers/ │ │ │ ├── arrayWithLength.ts │ │ │ ├── index.d.ts │ │ │ ├── index.ts │ │ │ ├── isSameClient.ts │ │ │ ├── isSameObservableQuery.ts │ │ │ ├── toBeDisposed.ts │ │ │ ├── toBeGarbageCollected.ts │ │ │ ├── toComplete.ts │ │ │ ├── toEmitAnything.ts │ │ │ ├── toEmitError.ts │ │ │ ├── toEmitNext.ts │ │ │ ├── toEmitTypedValue.ts │ │ │ ├── toHaveFragmentWatchesOn.ts │ │ │ ├── toHaveNumWatches.ts │ │ │ ├── toHaveSuspenseCacheEntryUsing.ts │ │ │ ├── toMatchDocument.ts │ │ │ ├── toRerenderWithSimilarSnapshot.ts │ │ │ ├── toStrictEqualTyped.ts │ │ │ └── utils/ │ │ │ └── getSerializableProperties.ts │ │ └── react/ │ │ ├── MockedProvider.tsx │ │ ├── __tests__/ │ │ │ ├── MockedProvider.test.tsx │ │ │ ├── __snapshots__/ │ │ │ │ └── MockedProvider.test.tsx.snap │ │ │ └── mockSubscriptionLink.test.tsx │ │ └── index.ts │ ├── utilities/ │ │ ├── DeepPartial.ts │ │ ├── HKT.ts │ │ ├── caching/ │ │ │ ├── __tests__/ │ │ │ │ ├── getMemoryInternals.ts │ │ │ │ └── sizes.test.ts │ │ │ ├── index.ts │ │ │ └── sizes.ts │ │ ├── common/ │ │ │ ├── __tests__/ │ │ │ │ ├── canonicalStringify.ts │ │ │ │ └── stripTypename.ts │ │ │ └── stripTypename.ts │ │ ├── environment/ │ │ │ ├── index.development.ts │ │ │ ├── index.production.ts │ │ │ └── index.ts │ │ ├── graphql/ │ │ │ ├── DocumentTransform.ts │ │ │ ├── __tests__/ │ │ │ │ ├── DocumentTransform.ts │ │ │ │ └── transform.ts │ │ │ ├── isFormattedExecutionResult.ts │ │ │ ├── operations.ts │ │ │ ├── print.ts │ │ │ ├── storeUtils.ts │ │ │ └── transform.ts │ │ ├── index.ts │ │ ├── internal/ │ │ │ ├── DeepMerger.ts │ │ │ ├── __tests__/ │ │ │ │ ├── DeepMerger.test.ts │ │ │ │ ├── canUseDOM.test.ts │ │ │ │ ├── checkDocument.test.ts │ │ │ │ ├── cloneDeep.test.ts │ │ │ │ ├── compact.test.ts │ │ │ │ ├── createFragmentMap.test.ts │ │ │ │ ├── equalByQuery.ts │ │ │ │ ├── getDefaultValues.test.ts │ │ │ │ ├── getFragmentDefinitions.test.ts │ │ │ │ ├── getFragmentQueryDocument.test.ts │ │ │ │ ├── getOperationName.test.ts │ │ │ │ ├── getQueryDefinition.test.ts │ │ │ │ ├── getStoreKeyName.test.ts │ │ │ │ ├── hasDirectives.test.ts │ │ │ │ ├── maybeDeepFreeze.test.ts │ │ │ │ ├── mergeDeep.test.ts │ │ │ │ ├── mergeDeepArray.test.ts │ │ │ │ ├── omitDeep.test.ts │ │ │ │ ├── removeDirectivesFromDocument.test.ts │ │ │ │ └── shouldInclude.test.ts │ │ │ ├── argumentsObjectFromField.ts │ │ │ ├── bindCacheKey.ts │ │ │ ├── caches.ts │ │ │ ├── canUseDOM.ts │ │ │ ├── canonicalStringify.ts │ │ │ ├── checkDocument.ts │ │ │ ├── cloneDeep.ts │ │ │ ├── combineLatestBatched.ts │ │ │ ├── compact.ts │ │ │ ├── constants.ts │ │ │ ├── createFragmentMap.ts │ │ │ ├── createFulfilledPromise.ts │ │ │ ├── createRejectedPromise.ts │ │ │ ├── dealias.ts │ │ │ ├── decoratePromise.ts │ │ │ ├── deepFreeze.ts │ │ │ ├── equalByQuery.ts │ │ │ ├── filterMap.ts │ │ │ ├── getDefaultValues.ts │ │ │ ├── getFragmentDefinition.ts │ │ │ ├── getFragmentDefinitions.ts │ │ │ ├── getFragmentFromSelection.ts │ │ │ ├── getFragmentQueryDocument.ts │ │ │ ├── getGraphQLErrorsFromResult.ts │ │ │ ├── getMainDefinition.ts │ │ │ ├── getMemoryInternals.ts │ │ │ ├── getOperationDefinition.ts │ │ │ ├── getOperationName.ts │ │ │ ├── getQueryDefinition.ts │ │ │ ├── getStoreKeyName.ts │ │ │ ├── globals/ │ │ │ │ ├── global.ts │ │ │ │ ├── index.ts │ │ │ │ └── maybe.ts │ │ │ ├── graphQLResultHasError.ts │ │ │ ├── hasDirectives.ts │ │ │ ├── hasForcedResolvers.ts │ │ │ ├── index.production.ts │ │ │ ├── index.ts │ │ │ ├── isArray.ts │ │ │ ├── isDocumentNode.ts │ │ │ ├── isField.ts │ │ │ ├── isNonEmptyArray.ts │ │ │ ├── isNonNullObject.ts │ │ │ ├── isPlainObject.ts │ │ │ ├── makeReference.ts │ │ │ ├── makeUniqueId.ts │ │ │ ├── mapObservableFragment.ts │ │ │ ├── maybeDeepFreeze.ts │ │ │ ├── memoize.ts │ │ │ ├── mergeDeep.ts │ │ │ ├── mergeDeepArray.ts │ │ │ ├── mergeOptions.ts │ │ │ ├── omitDeep.ts │ │ │ ├── ponyfills/ │ │ │ │ ├── FinalizationRegistry.ts │ │ │ │ ├── __tests__/ │ │ │ │ │ └── FinalizationRegistry.test.ts │ │ │ │ ├── index.react-native.ts │ │ │ │ └── index.ts │ │ │ ├── preventUnhandledRejection.ts │ │ │ ├── removeDirectivesFromDocument.ts │ │ │ ├── removeFragmentSpreads.ts │ │ │ ├── resultKeyNameFromField.ts │ │ │ ├── shouldInclude.ts │ │ │ ├── storeKeyNameFromField.ts │ │ │ ├── stringifyForDisplay.ts │ │ │ ├── toQueryResult.ts │ │ │ ├── types/ │ │ │ │ ├── ApplyHKT.ts │ │ │ │ ├── ApplyHKTImplementationWithDefault.ts │ │ │ │ ├── DecoratedPromise.ts │ │ │ │ ├── DeepOmit.ts │ │ │ │ ├── DocumentationTypes.ts │ │ │ │ ├── ExtensionsWithStreamDetails.ts │ │ │ │ ├── FragmentMap.ts │ │ │ │ ├── FragmentMapFunction.ts │ │ │ │ ├── FulfilledPromise.ts │ │ │ │ ├── IsAny.ts │ │ │ │ ├── NoInfer.ts │ │ │ │ ├── PendingPromise.ts │ │ │ │ ├── Prettify.ts │ │ │ │ ├── Primitive.ts │ │ │ │ ├── RejectedPromise.ts │ │ │ │ ├── RemoveIndexSignature.ts │ │ │ │ ├── StreamInfoTrie.ts │ │ │ │ ├── TupleToIntersection.ts │ │ │ │ ├── VariablesOption.ts │ │ │ │ └── __tests__/ │ │ │ │ └── HTK.test.ts │ │ │ └── valueToObjectRepresentation.ts │ │ ├── invariant/ │ │ │ ├── __tests__/ │ │ │ │ └── invariant.test.ts │ │ │ ├── index.development.ts │ │ │ └── index.ts │ │ ├── isNetworkRequestInFlight.ts │ │ ├── isNetworkRequestSettled.ts │ │ ├── policies/ │ │ │ ├── __tests__/ │ │ │ │ └── relayStylePagination.test.ts │ │ │ └── pagination.ts │ │ └── subscriptions/ │ │ └── relay/ │ │ ├── __tests__/ │ │ │ └── createFetchMultipartSubscription.test.ts │ │ └── index.ts │ ├── v4-migration.ts │ └── version.ts ├── tests.codegen.ts ├── tsconfig.build.json ├── tsconfig.json ├── tsconfig.tests.json └── tsdoc.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .api-reports/api-report-cache.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache as ApolloCache_2 } from '@apollo/client'; import type { AsStoreObject } from '@apollo/client/utilities'; import { canonicalStringify } from '@apollo/client/utilities'; import type { DataValue } from '@apollo/client'; import type { DeepPartial } from '@apollo/client/utilities'; import type { DocumentNode } from 'graphql'; import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import type { ExtensionsWithStreamInfo } from '@apollo/client/utilities/internal'; import type { FieldNode } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; import type { FragmentMap } from '@apollo/client/utilities/internal'; import type { FragmentMapFunction } from '@apollo/client/utilities/internal'; import type { FragmentType } from '@apollo/client/masking'; import { getApolloCacheMemoryInternals } from '@apollo/client/utilities/internal'; import type { GetDataState } from '@apollo/client'; import { getInMemoryCacheMemoryInternals } from '@apollo/client/utilities/internal'; import type { Incremental } from '@apollo/client/incremental'; import type { InlineFragmentNode } from 'graphql'; import type { IsAny } from '@apollo/client/utilities/internal'; import { isReference } from '@apollo/client/utilities'; import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; import { Observable } from 'rxjs'; import type { OperationVariables } from '@apollo/client'; import type { Prettify } from '@apollo/client/utilities/internal'; import { Reference } from '@apollo/client/utilities'; import type { SelectionSetNode } from 'graphql'; import type { StoreObject } from '@apollo/client/utilities'; import type { StoreValue } from '@apollo/client/utilities'; import { Trie } from '@wry/trie'; import type { TypedDocumentNode } from '@apollo/client'; import type { Unmasked } from '@apollo/client/masking'; // Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts // // @public (undocumented) type AllFieldsModifier> = Modifier> : never>; // @public (undocumented) export namespace ApolloCache { export type FromOptionValue = StoreObject | Reference | FragmentType> | string; // (undocumented) export interface ObservableFragment extends Observable> { getCurrentResult: () => ApolloCache.WatchFragmentResult; } export interface WatchFragmentOptions { fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; from: ApolloCache.FromOptionValue | Array | null> | null; optimistic?: boolean; variables?: TVariables; } export type WatchFragmentResult = true extends IsAny ? ({ complete: true; missing?: never; } & GetDataState) | ({ complete: false; missing?: MissingTree; } & GetDataState) : TData extends null | null[] ? Prettify<{ complete: true; missing?: never; } & GetDataState> : Prettify<{ complete: true; missing?: never; } & GetDataState> | { complete: false; missing?: MissingTree; data: TData extends Array ? Array | null> : DataValue.Partial; dataState: "partial"; }; } // @public (undocumented) export abstract class ApolloCache { // (undocumented) readonly assumeImmutableResults: boolean; batch(options: Cache_2.BatchOptions): U; abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; abstract extract(optimistic?: boolean): unknown; // (undocumented) abstract fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(): string[]; // @internal @deprecated getMemoryInternals?: typeof getApolloCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; // (undocumented) lookupFragment(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; protected onAfterBroadcast: (cb: () => void) => void; // (undocumented) abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; // (undocumented) abstract read(query: Cache_2.ReadOptions): Unmasked | null; readFragment({ fragment, variables, fragmentName, id, from, optimistic, returnPartialData, }: Cache_2.ReadFragmentOptions): Unmasked | null; // (undocumented) readFragment(options: Cache_2.ReadFragmentOptions, optimistic: boolean): Unmasked | null; readQuery({ query, variables, id, optimistic, returnPartialData, }: Cache_2.ReadQueryOptions): Unmasked | null; readQuery(options: Cache_2.ReadQueryOptions, optimistic: boolean): Unmasked | null; // (undocumented) recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; // (undocumented) abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; resolvesClientField?(typename: string, fieldName: string): boolean; abstract restore(serializedState: unknown): this; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) transformForLink(document: DocumentNode): DocumentNode; // (undocumented) updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) abstract watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array>; }): ApolloCache.ObservableFragment>>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array; }): ApolloCache.ObservableFragment>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array | null>; }): ApolloCache.ObservableFragment | null>>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: null; }): ApolloCache.ObservableFragment; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: ApolloCache.FromOptionValue; }): ApolloCache.ObservableFragment>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions): ApolloCache.ObservableFragment | null>; // (undocumented) abstract write(write: Cache_2.WriteOptions): Reference | undefined; writeFragment({ data, fragment, fragmentName, variables, overwrite, id, from, broadcast, }: Cache_2.WriteFragmentOptions): Reference | undefined; writeQuery({ data, query, variables, overwrite, id, broadcast, }: Cache_2.WriteQueryOptions): Reference | undefined; } // @public (undocumented) export type ApolloReducerConfig = { dataIdFromObject?: KeyFieldsFunction; }; // @public (undocumented) type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; // @public (undocumented) namespace Cache_2 { // (undocumented) interface BatchOptions { onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; optimistic?: string | boolean; removeOptimistic?: string; update(cache: TCache): TUpdateResult; } // (undocumented) type CacheIdentifierOption = { id?: string; from?: never; } | { id?: never; from?: ApolloCache.FromOptionValue; }; // (undocumented) interface DiffOptions extends Omit, "rootId"> { } // (undocumented) type DiffResult = { result: DataValue.Complete; complete: true; missing?: never; fromOptimisticTransaction?: boolean; } | { result: DataValue.Partial | null; complete: false; missing?: MissingFieldError; fromOptimisticTransaction?: boolean; }; // (undocumented) interface EvictOptions { // (undocumented) args?: Record; // (undocumented) broadcast?: boolean; // (undocumented) fieldName?: string; // (undocumented) id?: string; } // (undocumented) interface ModifyOptions = Record> { // (undocumented) broadcast?: boolean; // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts // // (undocumented) fields: Modifiers | AllFieldsModifier; // (undocumented) id?: string; // (undocumented) optimistic?: boolean; } // (undocumented) type ReadFragmentOptions = { fragment: DocumentNode_2 | TypedDocumentNode; fragmentName?: string; variables?: TVariables; returnPartialData?: boolean; optimistic?: boolean; } & Cache_2.CacheIdentifierOption; // (undocumented) interface ReadOptions { id?: string; // (undocumented) optimistic: boolean; // (undocumented) previousResult?: any; query: DocumentNode_2 | TypedDocumentNode; // (undocumented) returnPartialData?: boolean; // (undocumented) rootId?: string; variables?: TVariables; } // (undocumented) interface ReadQueryOptions { id?: string; optimistic?: boolean; query: DocumentNode_2 | TypedDocumentNode; returnPartialData?: boolean; variables?: TVariables; } // (undocumented) interface ResetOptions { // (undocumented) discardWatches?: boolean; } // (undocumented) type UpdateFragmentOptions = Omit & WriteFragmentOptions, "data" | "id" | "from"> & Cache_2.CacheIdentifierOption; // (undocumented) interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { } // (undocumented) type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; // (undocumented) interface WatchOptions extends DiffOptions { // (undocumented) callback: WatchCallback; // (undocumented) immediate?: boolean; // (undocumented) lastDiff?: DiffResult; // (undocumented) watcher?: object; } // (undocumented) type WriteFragmentOptions = { fragment: DocumentNode_2 | TypedDocumentNode; fragmentName?: string; variables?: TVariables; data: Unmasked; broadcast?: boolean; overwrite?: boolean; } & Cache_2.CacheIdentifierOption; // (undocumented) interface WriteOptions { broadcast?: boolean; // (undocumented) dataId?: string; extensions?: ExtensionsWithStreamInfo; overwrite?: boolean; query: DocumentNode_2 | TypedDocumentNode; // (undocumented) result: Unmasked; variables?: TVariables; } // (undocumented) interface WriteQueryOptions { broadcast?: boolean; data: Unmasked; extensions?: ExtensionsWithStreamInfo; id?: string; overwrite?: boolean; query: DocumentNode_2 | TypedDocumentNode; variables?: TVariables; } } export { Cache_2 as Cache } // @public (undocumented) class CacheGroup { constructor(caching: boolean, parent?: CacheGroup | null); // (undocumented) readonly caching: boolean; // (undocumented) depend(dataId: string, storeFieldName: string): void; // (undocumented) dirty(dataId: string, storeFieldName: string): void; // (undocumented) keyMaker: Trie; // (undocumented) resetCaching(): void; } // @public (undocumented) export const cacheSlot: { readonly id: string; hasValue(): boolean; getValue(): ApolloCache_2 | undefined; withValue(value: ApolloCache_2, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult; }; export { canonicalStringify } // @public (undocumented) type CanReadFunction = (value: StoreValue) => boolean; // @public (undocumented) export function createFragmentRegistry(...fragments: DocumentNode[]): FragmentRegistryAPI; // Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function defaultDataIdFromObject({ __typename, id, _id }: Readonly, context?: KeyFieldsContext): string | undefined; // @public (undocumented) interface DeleteModifier { // (undocumented) [_deleteModifier]: true; } // @public (undocumented) const _deleteModifier: unique symbol; // @public (undocumented) export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { returnPartialData?: boolean; }; // @public (undocumented) export abstract class EntityStore implements NormalizedCache { constructor(policies: Policies, group: CacheGroup); // Warning: (ae-forgotten-export) The symbol "Layer" needs to be exported by the entry point index.d.ts // // (undocumented) abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // Warning: (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts // // (undocumented) canRead: CanReadFunction; // (undocumented) clear(): void; // (undocumented) protected data: NormalizedCacheObject; // (undocumented) delete(dataId: string, fieldName?: string, args?: Record): boolean; // (undocumented) evict(options: Cache_2.EvictOptions, limit: EntityStore): boolean; // (undocumented) extract(): NormalizedCacheObject; // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) gc(): string[]; // (undocumented) get(dataId: string, fieldName: string): StoreValue; // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts // // (undocumented) getFieldValue: (objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly; // (undocumented) getRootIdSet(ids?: Set): Set; // Warning: (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts // // (undocumented) abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; // Warning: (ae-forgotten-export) The symbol "CacheGroup" needs to be exported by the entry point index.d.ts // // (undocumented) readonly group: CacheGroup; // (undocumented) has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined): object; makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; // (undocumented) modify(dataId: string, fields: Modifier | Modifiers>, exact: boolean): boolean; // (undocumented) readonly policies: Policies; // (undocumented) release(rootId: string): number; // (undocumented) abstract removeLayer(layerId: string): EntityStore; // (undocumented) replace(newData: NormalizedCacheObject | null): void; // (undocumented) retain(rootId: string): number; // Warning: (ae-forgotten-export) The symbol "Root" needs to be exported by the entry point index.d.ts // // (undocumented) static Root: typeof Root; // (undocumented) get supportsResultCaching(): boolean; // (undocumented) toObject(): NormalizedCacheObject; // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // // (undocumented) toReference: ToReferenceFunction; } // @public (undocumented) export interface FieldFunctionOptions, TVariables extends OperationVariables = Record> { // (undocumented) args: TArgs | null; // (undocumented) cache: InMemoryCache; // (undocumented) canRead: CanReadFunction; // (undocumented) field: FieldNode | null; // (undocumented) fieldName: string; // (undocumented) isReference: typeof isReference; // Warning: (ae-forgotten-export) The symbol "MergeObjectsFunction" needs to be exported by the entry point index.d.ts // // (undocumented) mergeObjects: MergeObjectsFunction; // Warning: (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts // // (undocumented) readField: ReadFieldFunction; // (undocumented) storage: StorageType; // (undocumented) storeFieldName: string; // (undocumented) toReference: ToReferenceFunction; // (undocumented) variables?: TVariables; } // @public (undocumented) export type FieldMergeFunction = (existing: SafeReadonly | undefined, incoming: SafeReadonly, options: TOptions) => SafeReadonly; // @public (undocumented) export interface FieldMergeFunctionOptions, TVariables extends OperationVariables = Record> extends FieldFunctionOptions { existingData: unknown; extensions: Record | undefined; streamFieldInfo?: Incremental.StreamFieldInfo; } // @public (undocumented) export function fieldNameFromStoreName(storeFieldName: string): string; // @public (undocumented) export type FieldPolicy = { keyArgs?: KeySpecifier | KeyArgsFunction | false; read?: FieldReadFunction; merge?: FieldMergeFunction | boolean; }; // @public (undocumented) export type FieldReadFunction = (existing: SafeReadonly | undefined, options: TOptions) => TReadResult | undefined; // @public (undocumented) export interface FieldReadFunctionOptions, TVariables extends OperationVariables = Record> extends FieldFunctionOptions { } // @public (undocumented) interface FieldSpecifier { // (undocumented) args?: Record; // (undocumented) field?: FieldNode; // (undocumented) fieldName: string; // (undocumented) typename?: string; // (undocumented) variables?: Record; } // @public (undocumented) type FieldValueGetter = EntityStore["getFieldValue"]; // Warning: (ae-forgotten-export) The symbol "WriteContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) type FlavorableWriteContext = Pick; // @public (undocumented) export interface FragmentRegistryAPI { // (undocumented) lookup(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) register(...fragments: DocumentNode[]): this; // (undocumented) resetCaches(): void; // (undocumented) transform(document: D): D; } // @public (undocumented) export type IdGetter = (value: IdGetterObj) => string | undefined; // @public (undocumented) export interface IdGetterObj extends Object { // (undocumented) __typename?: string; // (undocumented) id?: string; // (undocumented) _id?: string; } // @public (undocumented) export interface IgnoreModifier { // (undocumented) [_ignoreModifier]: true; } // @public (undocumented) const _ignoreModifier: unique symbol; // @public (undocumented) export class InMemoryCache extends ApolloCache { constructor(config?: InMemoryCacheConfig); // (undocumented) readonly assumeImmutableResults = true; batch(options: Cache_2.BatchOptions): TUpdateResult; // Warning: (ae-forgotten-export) The symbol "BroadcastOptions" needs to be exported by the entry point index.d.ts // // (undocumented) protected broadcastWatches(options?: BroadcastOptions): void; // (undocumented) protected config: InMemoryCacheConfig; // (undocumented) diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) evict(options: Cache_2.EvictOptions): boolean; // (undocumented) extract(optimistic?: boolean): NormalizedCacheObject; // (undocumented) fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(options?: { resetResultCache?: boolean; }): string[]; // @internal @deprecated getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; // (undocumented) lookupFragment(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) readonly makeVar: typeof makeVar; // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; // (undocumented) performTransaction(update: (cache: InMemoryCache) => any, optimisticId?: string | null): any; // (undocumented) readonly policies: Policies; // (undocumented) read(options: Cache_2.ReadOptions & { returnPartialData: true; }): TData | DeepPartial | null; // (undocumented) read(options: Cache_2.ReadOptions): TData | null; // (undocumented) release(rootId: string, optimistic?: boolean): number; // (undocumented) removeOptimistic(idToRemove: string): void; // (undocumented) reset(options?: Cache_2.ResetOptions): Promise; // (undocumented) resolvesClientField(typename: string, fieldName: string): boolean; // (undocumented) restore(data: NormalizedCacheObject): this; // (undocumented) retain(rootId: string, optimistic?: boolean): number; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) write(options: Cache_2.WriteOptions): Reference | undefined; } // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { // (undocumented) fragments?: FragmentRegistryAPI; // (undocumented) possibleTypes?: PossibleTypesMap; // (undocumented) resultCaching?: boolean; // (undocumented) typePolicies?: TypePolicies; } // @public (undocumented) interface InvalidateModifier { // (undocumented) [_invalidateModifier]: true; } // @public (undocumented) const _invalidateModifier: unique symbol; export { isReference } // @public (undocumented) type KeyArgsFunction = (args: Record | null, context: { typename: string; fieldName: string; field: FieldNode | null; variables?: Record; }) => KeySpecifier | false | ReturnType; // @public (undocumented) type KeyFieldsContext = { typename: string | undefined; storeObject: StoreObject; readField: ReadFieldFunction; selectionSet?: SelectionSetNode; fragmentMap?: FragmentMap; keyObject?: Record; }; // @public (undocumented) type KeyFieldsFunction = (object: Readonly, context: KeyFieldsContext) => KeySpecifier | false | ReturnType; // @public (undocumented) type KeySpecifier = ReadonlyArray; // @public (undocumented) class Layer extends EntityStore { constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup); // (undocumented) addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) getStorage(...args: Parameters): StorageType; // (undocumented) readonly group: CacheGroup; // (undocumented) readonly id: string; // (undocumented) readonly parent: EntityStore; // (undocumented) removeLayer(layerId: string): EntityStore; // (undocumented) readonly replay: (layer: EntityStore) => any; // (undocumented) toObject(): NormalizedCacheObject; } // @public (undocumented) export function makeVar(value: T): ReactiveVar; // @public (undocumented) export interface MergeInfo { // (undocumented) field: FieldNode; // (undocumented) merge: FieldMergeFunction; // (undocumented) path: Array; // (undocumented) typename: string | undefined; } // @public (undocumented) type MergeObjectsFunction = (existing: T, incoming: T) => T; // @public (undocumented) export interface MergeTree { // (undocumented) info?: MergeInfo; // (undocumented) map: Map; } // @public (undocumented) export class MissingFieldError extends Error { constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); // (undocumented) readonly message: string; // (undocumented) readonly missing: MissingTree; // (undocumented) readonly path: MissingTree | Array; // (undocumented) readonly query: DocumentNode; // (undocumented) readonly variables?: Record | undefined; } // @public (undocumented) export type MissingTree = string | { readonly [key: string]: MissingTree; }; // Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; // @public (undocumented) export type ModifierDetails = { DELETE: DeleteModifier; INVALIDATE: InvalidateModifier; fieldName: string; storeFieldName: string; readField: ReadFieldFunction; canRead: CanReadFunction; isReference: typeof isReference; toReference: ToReferenceFunction; storage: StorageType; }; // @public (undocumented) export type Modifiers = Record> = Partial<{ [FieldName in keyof T]: Modifier>>; }>; // @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; // (undocumented) clear(): void; // (undocumented) delete(dataId: string, fieldName?: string): boolean; // (undocumented) get(dataId: string, fieldName: string): StoreValue; // Warning: (ae-forgotten-export) The symbol "FieldValueGetter" needs to be exported by the entry point index.d.ts // // (undocumented) getFieldValue: FieldValueGetter; // (undocumented) getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; // (undocumented) has(dataId: string): boolean; // (undocumented) merge(olderId: string, newerObject: StoreObject): void; // (undocumented) merge(olderObject: StoreObject, newerId: string): void; // (undocumented) modify>(dataId: string, fields: Modifiers | AllFieldsModifier, exact: boolean): boolean; // (undocumented) release(rootId: string): number; replace(newData: NormalizedCacheObject): void; retain(rootId: string): number; toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } // @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; // (undocumented) __META?: { extraRootIds: string[]; }; } // @public (undocumented) export type OptimisticStoreItem = { id: string; data: NormalizedCacheObject; transaction: Transaction; }; // @public (undocumented) export class Policies { constructor(config: { cache: InMemoryCache; dataIdFromObject?: KeyFieldsFunction; possibleTypes?: PossibleTypesMap; typePolicies?: TypePolicies; }); // (undocumented) addPossibleTypes(possibleTypes: PossibleTypesMap): void; // (undocumented) addTypePolicies(typePolicies: TypePolicies): void; // (undocumented) readonly cache: InMemoryCache; // (undocumented) fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record, variables?: Record): boolean; // (undocumented) getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction | undefined; // (undocumented) getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction | undefined; // Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts // // (undocumented) getStoreFieldName(fieldSpec: FieldSpecifier): string; // (undocumented) hasKeyArgs(typename: string | undefined, fieldName: string): boolean; // (undocumented) identify(object: StoreObject, partialContext?: Partial): [string?, StoreObject?]; // (undocumented) readField(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly | undefined; // (undocumented) readonly rootIdsByTypename: Record; // (undocumented) readonly rootTypenamesById: Record; // (undocumented) runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge, path }: MergeInfo, context: WriteContext, storage?: StorageType): any; // (undocumented) readonly usingPossibleTypes = false; } // @public (undocumented) export type PossibleTypesMap = { [supertype: string]: string[]; }; // @public (undocumented) type ReactiveListener = (value: T) => any; // @public (undocumented) export interface ReactiveVar { // (undocumented) (newValue?: T): T; // (undocumented) attachCache(cache: ApolloCache_2): this; // (undocumented) forgetCache(cache: ApolloCache_2): boolean; // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts // // (undocumented) onNextChange(listener: ReactiveListener): () => void; } // @public (undocumented) interface ReadFieldFunction { // (undocumented) (options: ReadFieldOptions): SafeReadonly | undefined; // (undocumented) (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; } // @public (undocumented) export interface ReadFieldOptions extends FieldSpecifier { // (undocumented) from?: StoreObject | Reference; } // @public (undocumented) export interface ReadMergeModifyContext { // (undocumented) extensions?: ExtensionsWithStreamInfo; // (undocumented) store: NormalizedCache; // (undocumented) variables?: OperationVariables; // (undocumented) varString?: string; } // @public (undocumented) export type ReadQueryOptions = { store: NormalizedCache; query: DocumentNode; variables?: Object; previousResult?: any; rootId?: string; config?: ApolloReducerConfig; }; export { Reference } // @public (undocumented) class Root extends EntityStore { constructor({ policies, resultCaching, seed, }: { policies: Policies; resultCaching?: boolean; seed?: NormalizedCacheObject; }); // (undocumented) addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // (undocumented) getStorage(): StorageType; // (undocumented) removeLayer(): Root; // (undocumented) readonly storageTrie: Trie; // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts // // (undocumented) readonly stump: Stump; } // @public (undocumented) type SafeReadonly = T extends object ? Readonly : T; // @public (undocumented) type StorageType = Record; export { StoreObject } // @public (undocumented) type StoreObjectValueMaybeReference = StoreVal extends ReadonlyArray> ? StoreVal extends ReadonlyArray ? [ Item ] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; export { StoreValue } // @public (undocumented) class Stump extends Layer { constructor(root: Root); // (undocumented) merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } // @public (undocumented) type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; // @public (undocumented) export type Transaction = (c: ApolloCache) => void; // @public (undocumented) export type TypePolicies = { [__typename: string]: TypePolicy; }; // @public (undocumented) export type TypePolicy = { keyFields?: KeySpecifier | KeyFieldsFunction | false; merge?: FieldMergeFunction | boolean; queryType?: true; mutationType?: true; subscriptionType?: true; fields?: { [fieldName: string]: FieldPolicy | FieldReadFunction; }; }; // @public @deprecated (undocumented) export type WatchFragmentOptions = ApolloCache_2.WatchFragmentOptions; // @public @deprecated (undocumented) export type WatchFragmentResult = ApolloCache_2.WatchFragmentResult; // @public (undocumented) interface WriteContext extends ReadMergeModifyContext { // (undocumented) clientOnly: boolean; // (undocumented) deferred: boolean; // Warning: (ae-forgotten-export) The symbol "FlavorableWriteContext" needs to be exported by the entry point index.d.ts // // (undocumented) flavors: Map; // (undocumented) readonly fragmentMap: FragmentMap; // (undocumented) incomingById: Map; }>; // (undocumented) lookupFragment: FragmentMapFunction; // (undocumented) merge(existing: T, incoming: T): T; // (undocumented) overwrite: boolean; // (undocumented) readonly written: { [dataId: string]: SelectionSetNode[]; }; } // Warnings were encountered during analysis: // // src/cache/inmemory/policies.ts:173:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:173:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/types.ts:135:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-core.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloCache } from '@apollo/client/cache'; import { ApolloLink } from '@apollo/client/link'; import { ApolloPayloadResult } from '@apollo/client/link'; import { ApolloReducerConfig } from '@apollo/client/cache'; import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; import { Cache as Cache_2 } from '@apollo/client/cache'; import { checkFetcher } from '@apollo/client/link/http'; import type { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; import { CombinedGraphQLErrors } from '@apollo/client/errors'; import { CombinedProtocolErrors } from '@apollo/client/errors'; import { concat } from '@apollo/client/link'; import { createHttpLink } from '@apollo/client/link/http'; import { createSignalIfSupported } from '@apollo/client/link/http'; import type { DeepPartial } from '@apollo/client/utilities'; import { defaultDataIdFromObject } from '@apollo/client/cache'; import { defaultPrinter } from '@apollo/client/link/http'; import { DiffQueryAgainstStoreOptions } from '@apollo/client/cache'; import { disableExperimentalFragmentVariables } from 'graphql-tag'; import { disableFragmentWarnings } from 'graphql-tag'; import { DocumentNode } from '@apollo/client/link'; import type { DocumentNode as DocumentNode_2 } from 'graphql'; import { DocumentTransform } from '@apollo/client/utilities'; import { DocumentTransformCacheKey } from '@apollo/client/utilities'; import { empty } from '@apollo/client/link'; import { enableExperimentalFragmentVariables } from 'graphql-tag'; import { execute } from '@apollo/client/link'; import { extensionsSymbol } from '@apollo/client/utilities/internal'; import type { ExtensionsWithStreamInfo } from '@apollo/client/utilities/internal'; import { fallbackHttpConfig } from '@apollo/client/link/http'; import { FetchResult } from '@apollo/client/link'; import { FieldFunctionOptions } from '@apollo/client/cache'; import { FieldMergeFunction } from '@apollo/client/cache'; import { FieldPolicy } from '@apollo/client/cache'; import { FieldReadFunction } from '@apollo/client/cache'; import type { FormattedExecutionResult } from 'graphql'; import { FragmentType } from '@apollo/client/masking'; import { from } from '@apollo/client/link'; import { getApolloClientMemoryInternals } from '@apollo/client/utilities/internal'; import { gql } from 'graphql-tag'; import { GraphQLRequest } from '@apollo/client/link'; import type { HKT } from '@apollo/client/utilities'; import { HttpLink } from '@apollo/client/link/http'; import { IdGetter } from '@apollo/client/cache'; import { IdGetterObj } from '@apollo/client/cache'; import type { IgnoreModifier } from '@apollo/client/cache'; import type { Incremental } from '@apollo/client/incremental'; import { InMemoryCache } from '@apollo/client/cache'; import { InMemoryCacheConfig } from '@apollo/client/cache'; import type { InteropObservable } from 'rxjs'; import type { IsAny } from '@apollo/client/utilities/internal'; import { isNetworkRequestSettled } from '@apollo/client/utilities'; import { isReference } from '@apollo/client/utilities'; import { LinkError } from '@apollo/client/errors'; import type { LocalState } from '@apollo/client/local-state'; import { LocalStateError } from '@apollo/client/errors'; import { makeVar } from '@apollo/client/cache'; import { MaybeMasked } from '@apollo/client/masking'; import { MergeInfo } from '@apollo/client/cache'; import { MergeTree } from '@apollo/client/cache'; import { MissingFieldError } from '@apollo/client/cache'; import type { NextNotification } from 'rxjs'; import { NormalizedCache } from '@apollo/client/cache'; import { NormalizedCacheObject } from '@apollo/client/cache'; import { Observable } from '@apollo/client/utilities'; import { Observable as Observable_2 } from 'rxjs'; import type { ObservableNotification } from 'rxjs'; import type { Observer } from 'rxjs'; import { Operation } from '@apollo/client/link'; import { OperationTypeNode } from 'graphql'; import { OptimisticStoreItem } from '@apollo/client/cache'; import { parseAndCheckHttpResponse } from '@apollo/client/link/http'; import { PossibleTypesMap } from '@apollo/client/cache'; import { ReactiveVar } from '@apollo/client/cache'; import { ReadMergeModifyContext } from '@apollo/client/cache'; import { ReadQueryOptions } from '@apollo/client/cache'; import { Reference } from '@apollo/client/utilities'; import type { Reference as Reference_2 } from '@apollo/client/cache'; import { RequestHandler } from '@apollo/client/link'; import { resetCaches } from 'graphql-tag'; import { rewriteURIForGET } from '@apollo/client/link/http'; import { selectHttpOptionsAndBody } from '@apollo/client/link/http'; import { selectHttpOptionsAndBodyInternal } from '@apollo/client/link/http'; import { selectURI } from '@apollo/client/link/http'; import { ServerError } from '@apollo/client/errors'; import { ServerParseError } from '@apollo/client/errors'; import { setVerbosity as setLogVerbosity } from '@apollo/client/utilities/invariant'; import { split } from '@apollo/client/link'; import { StoreObject } from '@apollo/client/utilities'; import { StoreValue } from '@apollo/client/cache'; import type { Subscribable } from 'rxjs'; import type { Subscription } from 'rxjs'; import { Transaction } from '@apollo/client/cache'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { TypePolicies } from '@apollo/client/cache'; import { TypePolicy } from '@apollo/client/cache'; import { UnconventionalError } from '@apollo/client/errors'; import { Unmasked } from '@apollo/client/masking'; import type { VariablesOption } from '@apollo/client/utilities/internal'; import type { variablesUnknownSymbol } from '@apollo/client/utilities/internal'; import { WatchFragmentOptions } from '@apollo/client/cache'; import { WatchFragmentResult } from '@apollo/client/cache'; export { ApolloCache } // @public (undocumented) export namespace ApolloClient { // (undocumented) export namespace Base { // (undocumented) export interface ReadQueryOptions { id?: string; optimistic?: boolean; query: DocumentNode_2 | TypedDocumentNode; returnPartialData?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface ReadFragmentOptions { fragment: DocumentNode_2 | TypedDocumentNode; fragmentName?: string; optimistic?: boolean; returnPartialData?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface WriteQueryOptions { broadcast?: boolean; data: Unmasked; extensions?: Record; id?: string; overwrite?: boolean; query: DocumentNode_2 | TypedDocumentNode; } } // (undocumented) export namespace Base { // (undocumented) export interface WriteFragmentOptions { broadcast?: boolean; data: Unmasked; fragment: DocumentNode_2 | TypedDocumentNode; fragmentName?: string; overwrite?: boolean; } } // (undocumented) export interface DefaultOptions { // (undocumented) mutate?: Partial>; // (undocumented) query?: Partial>; // (undocumented) watchQuery?: Partial>; } // (undocumented) export interface DevtoolsOptions { enabled?: boolean; name?: string; } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ReadQueryOptions extends Base.ReadQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ReadFragmentOptions extends Base.ReadFragmentOptions { from?: ApolloCache.FromOptionValue; id?: string; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteQueryOptions extends Base.WriteQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteQueryOptions extends Base.WriteQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteFragmentOptions extends Base.WriteFragmentOptions { from?: ApolloCache.FromOptionValue; id?: string; variables?: TVariables; } } // (undocumented) export interface Experiment { // (undocumented) (this: ApolloClient, options: ApolloClient.Options): void; // (undocumented) v: 1; } // (undocumented) export type MutateOptions = { optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked> | IgnoreModifier); updateQueries?: MutationQueryReducersMap; refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; awaitRefetchQueries?: boolean; update?: MutationUpdaterFunction; onQueryUpdated?: OnQueryUpdated; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: MutationFetchPolicy; keepRootFields?: boolean; mutation: DocumentNode_2 | TypedDocumentNode; } & VariablesOption>; // (undocumented) export interface MutateResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // (undocumented) export interface ObservableFragment extends Observable_2> { getCurrentResult: () => ApolloClient.WatchFragmentResult; } // (undocumented) export interface Options { assumeImmutableResults?: boolean; cache: ApolloCache; // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; dataMasking?: boolean; // (undocumented) defaultContext?: Partial; defaultOptions?: ApolloClient.DefaultOptions; devtools?: ApolloClient.DevtoolsOptions; // (undocumented) documentTransform?: DocumentTransform; // (undocumented) enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; experiments?: ApolloClient.Experiment[]; incrementalHandler?: Incremental.Handler; link: ApolloLink; // (undocumented) localState?: LocalState; queryDeduplication?: boolean; ssrForceFetchDelay?: number; ssrMode?: boolean; } export type QueryOptions = { query: DocumentNode_2 | TypedDocumentNode; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: FetchPolicy; } & VariablesOption>; // (undocumented) export interface QueryResult { data: TData | undefined; error?: ErrorLike; } // (undocumented) export type ReadFragmentOptions = Base.ReadFragmentOptions & VariablesOption & Cache_2.CacheIdentifierOption; // (undocumented) export type ReadQueryOptions = Base.ReadQueryOptions & VariablesOption; export interface RefetchQueriesOptions { include?: RefetchQueriesInclude; onQueryUpdated?: OnQueryUpdated | null; optimistic?: boolean; updateCache?: (cache: TCache) => void; } export interface RefetchQueriesResult extends Promise>, RefetchQueriesResult.AdditionalProperties { } // (undocumented) export namespace RefetchQueriesResult { // (undocumented) export interface AdditionalProperties { queries: ObservableQuery[]; results: InternalRefetchQueriesResult[]; } } // (undocumented) export type SubscribeOptions = { query: DocumentNode_2 | TypedDocumentNode; fetchPolicy?: FetchPolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; extensions?: Record; } & VariablesOption>; // (undocumented) export interface SubscribeResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // (undocumented) export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; // (undocumented) export type WatchFragmentResult = ApolloCache.WatchFragmentResult>; export type WatchQueryOptions = { fetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); initialFetchPolicy?: WatchQueryFetchPolicy; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode_2 | TypedDocumentNode; [variablesUnknownSymbol]?: boolean; } & VariablesOption>; // (undocumented) export type WriteFragmentOptions = Base.WriteFragmentOptions & VariablesOption & Cache_2.CacheIdentifierOption; // (undocumented) export type WriteQueryOptions = Base.WriteQueryOptions & VariablesOption; } // @public export class ApolloClient { // (undocumented) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClient.Options); // (undocumented) __requestRaw(request: ApolloLink.Request): Observable_2>; // (undocumented) cache: ApolloCache; clearStore(): Promise; // (undocumented) get defaultContext(): Partial; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly devtoolsConfig: ApolloClient.DevtoolsOptions; // @deprecated (undocumented) disableNetworkFetches: never; get documentTransform(): DocumentTransform; extract(optimistic?: boolean): unknown; getMemoryInternals?: typeof getApolloClientMemoryInternals; getObservableQueries(include?: RefetchQueriesInclude): Set>; // (undocumented) link: ApolloLink; get localState(): LocalState | undefined; set localState(localState: LocalState); mutate(options: ApolloClient.MutateOptions): Promise>>; onClearStore(cb: () => Promise): () => void; onResetStore(cb: () => Promise): () => void; set prioritizeCacheValues(value: boolean); get prioritizeCacheValues(): boolean; query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) queryDeduplication: boolean; readFragment(options: ApolloClient.ReadFragmentOptions): Unmasked | null; // @deprecated readFragment(options: ApolloClient.ReadFragmentOptions, optimistic: boolean): Unmasked | null; readQuery(options: ApolloClient.ReadQueryOptions): Unmasked | null; // @deprecated readQuery(options: ApolloClient.ReadQueryOptions, optimistic: boolean): Unmasked | null; // @deprecated reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; refetchObservableQueries(includeStandby?: boolean): Promise[]>; refetchQueries>>(options: ApolloClient.RefetchQueriesOptions): ApolloClient.RefetchQueriesResult; resetStore(): Promise[] | null>; restore(serializedState: unknown): ApolloCache; setLink(newLink: ApolloLink): void; stop(): void; subscribe(options: ApolloClient.SubscribeOptions): SubscriptionObservable>>; // (undocumented) version: string; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array>; }): ApolloClient.ObservableFragment>; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array; }): ApolloClient.ObservableFragment>; // (undocumented) watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array | null>; }): ApolloClient.ObservableFragment>; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: null; }): ApolloClient.ObservableFragment; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: ApolloCache.FromOptionValue; }): ApolloClient.ObservableFragment; watchFragment(options: ApolloClient.WatchFragmentOptions): ApolloClient.ObservableFragment; watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; writeFragment(options: ApolloClient.WriteFragmentOptions): Reference_2 | undefined; writeQuery(options: ApolloClient.WriteQueryOptions): Reference_2 | undefined; } // @public @deprecated (undocumented) export type ApolloClientOptions = ApolloClient.Options; export { ApolloLink } export { ApolloPayloadResult } // @public @deprecated (undocumented) export type ApolloQueryResult["dataState"] = DataState["dataState"]> = ObservableQuery.Result; export { ApolloReducerConfig } // @public (undocumented) export const build: "source" | "esm" | "cjs"; export { Cache_2 as Cache } export { checkFetcher } export { CombinedGraphQLErrors } export { CombinedProtocolErrors } export { concat } export { createHttpLink } export { createSignalIfSupported } // @public (undocumented) export type DataState = { data: DataValue.Complete; dataState: "complete"; } | { data: DataValue.Streaming; dataState: "streaming"; } | { data: DataValue.Partial; dataState: "partial"; } | { data: undefined; dataState: "empty"; }; // @public (undocumented) export namespace DataValue { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts export type Complete = ApplyHKTImplementationWithDefault; export type Partial = ApplyHKTImplementationWithDefault; export type Streaming = ApplyHKTImplementationWithDefault; } // @public (undocumented) export interface DefaultContext extends Record { // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; queryDeduplication?: boolean; } export { defaultDataIdFromObject } // @public @deprecated (undocumented) export type DefaultOptions = ApolloClient.DefaultOptions; export { defaultPrinter } // @public @deprecated (undocumented) export type DevtoolsOptions = ApolloClient.DevtoolsOptions; export { DiffQueryAgainstStoreOptions } export { disableExperimentalFragmentVariables } export { disableFragmentWarnings } export { DocumentNode } export { DocumentTransform } export { DocumentTransformCacheKey } export { empty } export { enableExperimentalFragmentVariables } // @public export interface ErrorLike { // (undocumented) message: string; // (undocumented) name: string; // (undocumented) stack?: string; } // @public export type ErrorPolicy = "none" | "ignore" | "all"; export { execute } export { fallbackHttpConfig } // @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; export { FetchResult } export { FieldFunctionOptions } export { FieldMergeFunction } export { FieldPolicy } export { FieldReadFunction } export { FragmentType } export { from } // @public (undocumented) export type GetDataState["dataState"]> = Extract, { dataState: TState; }>; export { gql } export { GraphQLRequest } export { HttpLink } export { IdGetter } export { IdGetterObj } export { InMemoryCache } export { InMemoryCacheConfig } // Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) export type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; // @public (undocumented) export interface InternalRefetchQueriesOptions extends Omit, "include"> { // (undocumented) include?: InternalRefetchQueriesInclude; // (undocumented) removeOptimistic?: string; } // @public (undocumented) export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; // @public (undocumented) export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | ApolloClient.QueryOptions; // @internal @deprecated (undocumented) export namespace InternalTypes { export type { NextFetchPolicyContext, QueryManager }; } export { isNetworkRequestSettled } export { isReference } export { LinkError } export { LocalStateError } export { makeVar } // @public (undocumented) interface MaskFragmentOptions { // (undocumented) data: TData; // (undocumented) fragment: DocumentNode_2; // (undocumented) fragmentName?: string; } // @public (undocumented) interface MaskOperationOptions { cause?: object; // (undocumented) data: TData; // (undocumented) document: DocumentNode_2; // (undocumented) fetchPolicy?: WatchQueryFetchPolicy; } export { MaybeMasked } export { MergeInfo } export { MergeTree } export { MissingFieldError } // @public @deprecated (undocumented) export type MutateResult = ApolloClient.MutateResult; // @public (undocumented) export type MutationFetchPolicy = Extract; // @public @deprecated (undocumented) export type MutationOptions = ApolloClient.MutateOptions; // @public (undocumented) export type MutationQueryReducer = (previousResult: Record, options: { mutationResult: NormalizedExecutionResult>; queryName: string | undefined; queryVariables: Record; }) => Record; // @public (undocumented) export type MutationQueryReducersMap = { [queryName: string]: MutationQueryReducer; }; // @public (undocumented) interface MutationStoreValue { // (undocumented) error: Error | null; // (undocumented) loading: boolean; // (undocumented) mutation: DocumentNode_2; // (undocumented) variables: Record; } // @public (undocumented) export type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { context?: DefaultContext; variables?: TVariables; }) => void; // @public export enum NetworkStatus { error = 8, fetchMore = 3, loading = 1, poll = 6, ready = 7, refetch = 4, setVariables = 2, streaming = 9 } // @public (undocumented) interface NextFetchPolicyContext { // (undocumented) initialFetchPolicy: WatchQueryFetchPolicy; // (undocumented) observable: ObservableQuery; // (undocumented) options: ApolloClient.WatchQueryOptions; // (undocumented) reason: "after-fetch" | "variables-changed"; } export { NormalizedCache } export { NormalizedCacheObject } // @public export type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; export { Observable } // @public (undocumented) interface ObservableAndInfo { // (undocumented) fromLink: boolean; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) observable: Observable_2>; } // @public (undocumented) export namespace ObservableQuery { // @internal @deprecated export interface CacheWatchOptions extends Cache_2.WatchOptions { // @deprecated lastOwnDiff?: Cache_2.DiffResult; } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ObservableMethods { pipe(...operators: OperatorFunctionChain, OperatorResult>): Observable_2; subscribe(observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)): Subscription; } // (undocumented) export type OperatorFunctionChain = []; } // (undocumented) export type FetchMoreOptions = { query?: DocumentNode_2 | TypedDocumentNode; variables?: Partial>; errorPolicy?: ErrorPolicy; context?: DefaultContext; updateQuery?: (previousQueryResult: Unmasked, options: { fetchMoreResult: Unmasked; variables: TFetchVars; }) => Unmasked; }; // (undocumented) export type Options = { fetchPolicy: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); initialFetchPolicy: WatchQueryFetchPolicy; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode_2 | TypedDocumentNode; variables: TVariables; }; // (undocumented) export type Result["dataState"] = DataState["dataState"]> = { error?: ErrorLike; loading: boolean; networkStatus: NetworkStatus; partial: boolean; } & GetDataState; export interface ResultPromise extends Promise { retain(): this; } // (undocumented) export interface SubscribeToMoreOptions { // (undocumented) context?: DefaultContext; // (undocumented) document: DocumentNode_2 | TypedDocumentNode; // (undocumented) onError?: (error: ErrorLike) => void; // (undocumented) updateQuery?: SubscribeToMoreUpdateQueryFn; // (undocumented) variables?: TSubscriptionVariables; } } // @public (undocumented) export class ObservableQuery implements Subscribable>>, InteropObservable>> { // (undocumented) ["@@observable"]: () => Subscribable>>; // (undocumented) [Symbol.observable]: () => Subscribable>>; constructor({ queryManager, options, transformedQuery, }: { queryManager: QueryManager; options: ApolloClient.WatchQueryOptions; transformedQuery?: DocumentNode_2 | TypedDocumentNode; queryId?: string; }); // @internal @deprecated (undocumented) applyOptions(newOptions: Partial>): void; fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; // @internal @deprecated (undocumented) getCacheDiff({ optimistic }?: { optimistic?: boolean | undefined; }): Cache_2.DiffResult; // (undocumented) getCurrentResult(): ObservableQuery.Result>; // (undocumented) hasObservers(): boolean; // @internal @deprecated _lastWrite?: unknown; // @internal @deprecated (undocumented) notify(scheduled?: boolean): void; // (undocumented) readonly options: ObservableQuery.Options; pipe: Observable_2>>["pipe"]; // (undocumented) get query(): TypedDocumentNode; // (undocumented) readonly queryName?: string; refetch(variables?: Partial): ObservableQuery.ResultPromise>; reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; // @internal @deprecated reset(): void; setVariables(variables: TVariables): Promise>; startPolling(pollInterval: number): void; stop(): void; stopPolling(): void; subscribe: (observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)) => Subscription; subscribeToMore(options: ObservableQuery.SubscribeToMoreOptions): () => void; updateQuery(mapFn: UpdateQueryMapFn): void; get variables(): TVariables; } // @public (undocumented) export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; export { Operation } // @public (undocumented) export type OperationVariables = Record; export { OptimisticStoreItem } // @public (undocumented) namespace OverridableTypes { // (undocumented) interface Complete extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } // (undocumented) interface Defaults { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Complete: Complete; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Partial: Partial; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Streaming: Streaming; } // (undocumented) interface Partial extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: DeepPartial; } // (undocumented) interface Streaming extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } } export { parseAndCheckHttpResponse } export { PossibleTypesMap } // @public (undocumented) namespace QueryManager { // (undocumented) type Result["dataState"] = DataState["dataState"]> = ObservableQuery.Result & { [extensionsSymbol]?: ExtensionsWithStreamInfo; }; } // @public (undocumented) class QueryManager { // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts constructor(options: QueryManagerOptions); // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) broadcastQueries(): void; // (undocumented) get cache(): ApolloCache; // (undocumented) clearStore(options?: Cache_2.ResetOptions): Promise; // (undocumented) readonly client: ApolloClient; readonly clientOptions: ApolloClient.Options; // (undocumented) readonly dataMasking: boolean; // (undocumented) readonly defaultContext: Partial; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly documentTransform: DocumentTransform; // (undocumented) protected fetchCancelFns: Map any>; // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.d.ts // // (undocumented) fetchObservableWithInfo(options: ApolloClient.WatchQueryOptions, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, exposeExtensions, }: { networkStatus?: NetworkStatus; query?: DocumentNode_2; fetchQueryOperator?: (source: Observable_2) => Observable_2; onCacheHit?: () => void; observableQuery?: ObservableQuery | undefined; exposeExtensions?: boolean; }): ObservableAndInfo; // (undocumented) fetchQuery(options: ApolloClient.WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; // (undocumented) generateRequestId(): number; // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts // // (undocumented) getDocumentInfo(document: DocumentNode_2): TransformCacheEntry; // (undocumented) getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; // (undocumented) getVariables(document: DocumentNode_2, variables?: TVariables): TVariables; // (undocumented) readonly incrementalHandler: Incremental.Handler; // (undocumented) protected inFlightLinkObservables: Trie<{ observable?: Observable_2>; restart?: () => void; }>; // (undocumented) get link(): ApolloLink; // (undocumented) localState: LocalState | undefined; // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts // // (undocumented) maskFragment(options: MaskFragmentOptions): TData; // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts // // (undocumented) maskOperation(options: MaskOperationOptions): MaybeMasked; // (undocumented) mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: ApolloClient.MutateOptions & { errorPolicy: ErrorPolicy; fetchPolicy: MutationFetchPolicy; }): Promise>>; // (undocumented) mutationStore?: { [mutationId: string]: MutationStoreValue; }; obsQueries: Set>; prioritizeCacheValues: boolean; // (undocumented) query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) refetchObservableQueries(includeStandby?: boolean): Promise[]>; // (undocumented) refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; // (undocumented) readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription(options: ApolloClient.SubscribeOptions): SubscriptionObservable>; stop(): void; // (undocumented) transform(document: DocumentNode_2): DocumentNode_2; // (undocumented) watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; } // @public (undocumented) interface QueryManagerOptions { // (undocumented) assumeImmutableResults: boolean; // (undocumented) client: ApolloClient; // (undocumented) clientOptions: ApolloClient.Options; // (undocumented) dataMasking: boolean; // (undocumented) defaultContext: Partial | undefined; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) documentTransform: DocumentTransform | null | undefined; // (undocumented) incrementalHandler: Incremental.Handler; // (undocumented) localState: LocalState | undefined; // (undocumented) onBroadcast: undefined | (() => void); // (undocumented) queryDeduplication: boolean; // (undocumented) ssrMode: boolean; } // @public (undocumented) namespace QueryNotification { // (undocumented) type FromCache = NextNotification> & { source: "cache"; }; // (undocumented) type FromNetwork = ObservableNotification> & { source: "network"; }; // (undocumented) type NewNetworkStatus = NextNotification<{ resetError?: boolean; }> & { source: "newNetworkStatus"; }; // (undocumented) type SetResult = NextNotification> & { source: "setResult"; }; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; } // @public @deprecated (undocumented) export type QueryOptions = ApolloClient.QueryOptions; export { ReactiveVar } export { ReadMergeModifyContext } export { ReadQueryOptions } export { Reference } // @public (undocumented) export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) type RefetchQueriesIncludeShorthand = "all" | "active"; // @public @deprecated (undocumented) export type RefetchQueriesOptions = ApolloClient.RefetchQueriesOptions; // @public (undocumented) export type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? ApolloClient.QueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; // @public @deprecated (undocumented) export type RefetchQueriesResult = ApolloClient.RefetchQueriesResult; // @public (undocumented) export type RefetchQueryDescriptor = string | DocumentNode_2; // @public (undocumented) export type RefetchWritePolicy = "merge" | "overwrite"; export { RequestHandler } export { resetCaches } export { rewriteURIForGET } export { selectHttpOptionsAndBody } export { selectHttpOptionsAndBodyInternal } export { selectURI } export { ServerError } export { ServerParseError } export { setLogVerbosity } export { split } export { StoreObject } export { StoreValue } // @public (undocumented) export interface SubscribeToMoreFunction { // (undocumented) (options: ObservableQuery.SubscribeToMoreOptions): () => void; } // @public @deprecated (undocumented) export type SubscribeToMoreOptions = ObservableQuery.SubscribeToMoreOptions; // @public (undocumented) export type SubscribeToMoreUpdateQueryFn = { ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { subscriptionData: { data: Unmasked; }; }): Unmasked | void; }; // @public export interface SubscriptionObservable extends Observable_2 { restart: () => void; } // @public @deprecated (undocumented) export type SubscriptionOptions = ApolloClient.SubscribeOptions; export { Transaction } // @public (undocumented) interface TransformCacheEntry { // (undocumented) asQuery: DocumentNode_2; // (undocumented) clientQuery: DocumentNode_2 | null; // (undocumented) defaultVars: OperationVariables; // (undocumented) hasClientExports: boolean; // (undocumented) hasForcedResolvers: boolean; // (undocumented) hasIncrementalDirective: boolean; // (undocumented) hasNonreactiveDirective: boolean; // (undocumented) nonReactiveQuery: DocumentNode_2; // (undocumented) operationType: OperationTypeNode | undefined; // (undocumented) serverQuery: DocumentNode_2 | null; // (undocumented) violation?: Error | undefined; } export { TypedDocumentNode } // @public (undocumented) export interface TypeOverrides { } export { TypePolicies } export { TypePolicy } export { UnconventionalError } export { Unmasked } // @public (undocumented) export interface UpdateQueryMapFn { // (undocumented) ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; } // @public (undocumented) export type UpdateQueryOptions = { variables?: TVariables; } & ({ complete: true; previousData: Unmasked; } | { complete: false; previousData: DeepPartial> | undefined; }); // @public (undocumented) export const version: string; export { WatchFragmentOptions } export { WatchFragmentResult } // @public (undocumented) export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network" | "standby"; // @public @deprecated (undocumented) export type WatchQueryOptions = ApolloClient.WatchQueryOptions; // Warnings were encountered during analysis: // // src/core/ApolloClient.ts:375:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:371:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:195:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-dev.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public (undocumented) interface ErrorCodes { // (undocumented) [key: number]: { file: string; condition?: string; message?: string; }; } // @public export type ErrorMessageHandler = { (message: string | number, args: string[]): string | undefined; }; // @public (undocumented) export function loadDevMessages(): void; // Warning: (ae-forgotten-export) The symbol "ErrorCodes" needs to be exported by the entry point index.d.ts // // @public export function loadErrorMessageHandler(...errorCodes: ErrorCodes[]): ErrorMessageHandler & ErrorCodes; // @public (undocumented) export function loadErrorMessages(): void; // @public export function setErrorMessageHandler(handler: ErrorMessageHandler): void; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-errors.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloLink } from '@apollo/client/link'; import { ErrorLike } from '@apollo/client'; import type { FormattedExecutionResult } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; // @public (undocumented) export namespace CombinedGraphQLErrors { // (undocumented) export namespace DocumentationTypes { export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; // (undocumented) export interface InstanceProperties { readonly data: Record | null | undefined; readonly errors: ReadonlyArray; readonly extensions: Record | undefined; } export function is(error: unknown): boolean; } export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; // (undocumented) export interface MessageFormatterOptions { defaultFormatMessage: (errors: ReadonlyArray) => string; result: ApolloLink.Result; } } // @public export class CombinedGraphQLErrors extends Error { constructor(result: FormattedExecutionResult); constructor(result: ApolloLink.Result, errors: ReadonlyArray); readonly data: Record | null | undefined; readonly errors: ReadonlyArray; readonly extensions: Record | undefined; static formatMessage: CombinedGraphQLErrors.MessageFormatter; static is(error: unknown): error is CombinedGraphQLErrors; } // @public (undocumented) export namespace CombinedProtocolErrors { // (undocumented) export namespace DocumentationTypes { export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; // (undocumented) export interface InstanceProperties { readonly errors: ReadonlyArray; } } export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; // (undocumented) export interface MessageFormatterOptions { defaultFormatMessage: (errors: ReadonlyArray) => string; } } // @public export class CombinedProtocolErrors extends Error { constructor(protocolErrors: Array | ReadonlyArray); readonly errors: ReadonlyArray; static formatMessage: CombinedProtocolErrors.MessageFormatter; static is(error: unknown): error is CombinedProtocolErrors; } // @public (undocumented) export function graphQLResultHasProtocolErrors(result: T): result is T & { extensions: Record; }; // @public (undocumented) export function isErrorLike(error: unknown): error is ErrorLike; // @public export const LinkError: { is: (error: unknown) => boolean; }; // @public (undocumented) export namespace LocalStateError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly path?: Array; } } // (undocumented) export interface Options { // (undocumented) path?: Array; // (undocumented) sourceError?: unknown; } } // @public export class LocalStateError extends Error { constructor(message: string, options?: LocalStateError.Options); static is(error: unknown): error is LocalStateError; readonly path?: Array; } // @public (undocumented) export const PROTOCOL_ERRORS_SYMBOL: unique symbol; // @internal @deprecated export function registerLinkError(error: ErrorLike): void; // @public (undocumented) export namespace ServerError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly bodyText: string; readonly response: Response; readonly statusCode: number; } } // (undocumented) export interface Options { // (undocumented) bodyText: string; // (undocumented) response: Response; } } // @public export class ServerError extends Error { constructor(message: string, options: ServerError.Options); readonly bodyText: string; static is(error: unknown): error is ServerError; readonly response: Response; readonly statusCode: number; } // @public (undocumented) export namespace ServerParseError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly bodyText: string; readonly response: Response; readonly statusCode: number; } } // (undocumented) export interface Options { // (undocumented) bodyText: string; // (undocumented) response: Response; } } // @public export class ServerParseError extends Error { constructor(originalParseError: unknown, options: ServerParseError.Options); readonly bodyText: string; static is(error: unknown): error is ServerParseError; readonly response: Response; readonly statusCode: number; } // @public (undocumented) export function toErrorLike(error: unknown): ErrorLike; // @public export class UnconventionalError extends Error { constructor(errorType: unknown); static is(error: unknown): error is UnconventionalError; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-incremental.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloLink } from '@apollo/client/link'; import type { DeepPartial } from '@apollo/client/utilities'; import type { DocumentNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; import type { HKT } from '@apollo/client/utilities'; // @public (undocumented) namespace Defer20220824Handler { // (undocumented) type Chunk> = InitialResult | SubsequentResult; // (undocumented) interface Defer20220824Result extends HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) return: Defer20220824Handler.Chunk>; } // (undocumented) type IncrementalDeferResult> = { data?: TData | null; errors?: ReadonlyArray; extensions?: Record; path?: Incremental.Path; label?: string; }; // (undocumented) type IncrementalResult> = IncrementalDeferResult | IncrementalStreamResult; // (undocumented) type IncrementalStreamResult> = { errors?: ReadonlyArray; items?: TData; path?: Incremental.Path; label?: string; extensions?: Record; }; // (undocumented) type InitialResult> = { data?: TData | null | undefined; errors?: ReadonlyArray; extensions?: Record; hasNext: boolean; incremental?: ReadonlyArray>; }; // (undocumented) type SubsequentResult> = { extensions?: Record; hasNext: boolean; incremental?: Array>; }; // (undocumented) interface TypeOverrides { // (undocumented) AdditionalApolloLinkResultTypes: Defer20220824Result; } } // @public class Defer20220824Handler implements Incremental.Handler> { // (undocumented) extractErrors(result: ApolloLink.Result): GraphQLFormattedError[] | undefined; // (undocumented) isIncrementalResult(result: Record): result is Defer20220824Handler.SubsequentResult | Defer20220824Handler.InitialResult; // (undocumented) prepareRequest(request: ApolloLink.Request): ApolloLink.Request; // Warning: (ae-forgotten-export) The symbol "DeferRequest" needs to be exported by the entry point index.d.ts // // (undocumented) startRequest>(_: { query: DocumentNode; }): DeferRequest; } export { Defer20220824Handler } export { Defer20220824Handler as GraphQL17Alpha2Handler } // @public (undocumented) class DeferRequest> implements Incremental.IncrementalRequest, TData> { // (undocumented) handle(cacheData: TData | DeepPartial | null | undefined, chunk: Defer20220824Handler.Chunk): FormattedExecutionResult; // (undocumented) hasNext: boolean; } // @public (undocumented) export namespace GraphQL17Alpha9Handler { // (undocumented) export type Chunk = InitialResult | SubsequentResult; // (undocumented) export interface CompletedResult { // (undocumented) errors?: ReadonlyArray; // (undocumented) id: string; } // (undocumented) export interface GraphQL17Alpha9Result extends HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) return: GraphQL17Alpha9Handler.Chunk>; } // (undocumented) export interface IncrementalDeferResult> { // (undocumented) data: TData; // (undocumented) errors?: ReadonlyArray; // (undocumented) extensions?: Record; // (undocumented) id: string; // (undocumented) subPath?: Incremental.Path; } // (undocumented) export type IncrementalResult = IncrementalDeferResult | IncrementalStreamResult; // (undocumented) export interface IncrementalStreamResult> { // (undocumented) errors?: ReadonlyArray; // (undocumented) extensions?: Record; // (undocumented) id: string; // (undocumented) items: TData; // (undocumented) subPath?: Incremental.Path; } // (undocumented) export type InitialResult> = { data: TData; errors?: ReadonlyArray; pending: ReadonlyArray; hasNext: boolean; extensions?: Record; }; // (undocumented) export interface PendingResult { // (undocumented) id: string; // (undocumented) label?: string; // (undocumented) path: Incremental.Path; } // (undocumented) export type SubsequentResult = { hasNext: boolean; pending?: ReadonlyArray; incremental?: ReadonlyArray>; completed?: ReadonlyArray; extensions?: Record; }; // (undocumented) export interface TypeOverrides { // (undocumented) AdditionalApolloLinkResultTypes: GraphQL17Alpha9Result; } } // @public export class GraphQL17Alpha9Handler implements Incremental.Handler> { // @internal @deprecated (undocumented) extractErrors(result: ApolloLink.Result): GraphQLFormattedError[] | undefined; // @internal @deprecated (undocumented) isIncrementalResult(result: ApolloLink.Result): result is GraphQL17Alpha9Handler.InitialResult | GraphQL17Alpha9Handler.SubsequentResult; // @internal @deprecated (undocumented) prepareRequest(request: ApolloLink.Request): ApolloLink.Request; // Warning: (ae-forgotten-export) The symbol "IncrementalRequest" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) startRequest(_: { query: DocumentNode; }): IncrementalRequest; } // @public (undocumented) export namespace Incremental { // @internal @deprecated (undocumented) export interface Handler = Record> { // (undocumented) extractErrors: (result: ApolloLink.Result) => readonly GraphQLFormattedError[] | undefined | void; // (undocumented) isIncrementalResult: (result: ApolloLink.Result) => result is Chunk; // (undocumented) prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request; // (undocumented) startRequest: >(request: { query: DocumentNode; }) => IncrementalRequest; } // (undocumented) export interface IncrementalRequest, TData> { // (undocumented) handle: (cacheData: TData | DeepPartial | undefined | null, chunk: Chunk) => FormattedExecutionResult; // (undocumented) hasNext: boolean; } // (undocumented) export type Path = ReadonlyArray; // @internal @deprecated (undocumented) export interface StreamFieldInfo { // (undocumented) isFirstChunk: boolean; // (undocumented) isLastChunk: boolean; } } // @public (undocumented) class IncrementalRequest implements Incremental.IncrementalRequest, TData> { // (undocumented) handle(cacheData: TData | DeepPartial | null | undefined, chunk: GraphQL17Alpha9Handler.Chunk): FormattedExecutionResult; // (undocumented) hasNext: boolean; } // @public (undocumented) export namespace NotImplementedHandler { // (undocumented) export interface NotImplementedResult extends HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) return: never; } // (undocumented) export interface TypeOverrides { // (undocumented) AdditionalApolloLinkResultTypes: NotImplementedResult; } } // @public (undocumented) export class NotImplementedHandler implements Incremental.Handler { // (undocumented) extractErrors(): void; // (undocumented) isIncrementalResult(_: any): _ is never; // (undocumented) prepareRequest(request: ApolloLink.Request): ApolloLink.Request; // (undocumented) startRequest: any; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloClient } from '@apollo/client'; import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; import type { DefaultContext } from '@apollo/client'; import { DocumentNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; import type { NotImplementedHandler } from '@apollo/client/incremental'; import type { Observable } from 'rxjs'; import type { OperationTypeNode } from 'graphql'; import type { OperationVariables } from '@apollo/client'; import type { TypeOverrides } from '@apollo/client'; // @public (undocumented) export namespace ApolloLink { // (undocumented) export type AdditionalResultTypes, TExtensions = Record> = ApplyHKTImplementationWithDefault; // (undocumented) export namespace DocumentationTypes { export function ForwardFunction(operation: ApolloLink.Operation): Observable; export function RequestHandler(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } export interface ExecuteContext { client: ApolloClient; } export type ForwardFunction = (operation: ApolloLink.Operation) => Observable; export interface Operation { readonly client: ApolloClient; extensions: Record; getContext: () => Readonly; operationName: string | undefined; operationType: OperationTypeNode; query: DocumentNode; setContext: { (context: Partial): void; (updateContext: (previousContext: Readonly) => Partial): void; }; variables: OperationVariables; } export interface OperationContext extends DefaultContext { } export interface Request { context?: DefaultContext; extensions?: Record; query: DocumentNode; variables?: OperationVariables; } export type RequestHandler = (operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction) => Observable; // (undocumented) export type Result, TExtensions = Record> = FormattedExecutionResult | AdditionalResultTypes; } // @public export class ApolloLink { constructor(request?: ApolloLink.RequestHandler); // @deprecated static concat(...links: ApolloLink[]): ApolloLink; concat(...links: ApolloLink[]): ApolloLink; static empty(): ApolloLink; static execute(link: ApolloLink, request: ApolloLink.Request, context: ApolloLink.ExecuteContext): Observable; static from(links: ApolloLink[]): ApolloLink; // @internal @deprecated getMemoryInternals?: () => unknown; // @internal @deprecated readonly left?: ApolloLink; request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; // @internal @deprecated readonly right?: ApolloLink; static split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; } // @public (undocumented) export interface ApolloPayloadResult, TExtensions = Record> { // (undocumented) errors?: ReadonlyArray; // (undocumented) payload: FormattedExecutionResult | null; } // @public @deprecated (undocumented) export const concat: typeof ApolloLink.concat; export { DocumentNode } // @public @deprecated (undocumented) export const empty: typeof ApolloLink.empty; // @public (undocumented) export const execute: typeof ApolloLink.execute; // @public @deprecated (undocumented) export type FetchResult, TExtensions = Record> = ApolloLink.Result; // @public @deprecated (undocumented) export const from: typeof ApolloLink.from; // @public @deprecated (undocumented) export type GraphQLRequest = ApolloLink.Request; // @public @deprecated (undocumented) export type Operation = ApolloLink.Operation; // @public @deprecated (undocumented) export type RequestHandler = ApolloLink.RequestHandler; // @public @deprecated (undocumented) export const split: typeof ApolloLink.split; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_batch-http.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { BaseHttpLink } from '@apollo/client/link/http'; import { BatchLink } from '@apollo/client/link/batch'; import { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; import { Observable } from 'rxjs'; // @public (undocumented) export namespace BaseBatchHttpLink { export interface ContextOptions extends BaseHttpLink.ContextOptions { } export interface Options extends BatchLink.Shared.Options, BaseHttpLink.Shared.Options { batchMax?: number; } } // @public export class BaseBatchHttpLink extends ApolloLink { constructor(options?: BaseBatchHttpLink.Options); // (undocumented) request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // @public (undocumented) export namespace BatchHttpLink { export interface ContextOptions extends BaseBatchHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { } export interface Options extends BaseBatchHttpLink.Options, ClientAwarenessLink.Options { } } // @public export class BatchHttpLink extends ApolloLink { constructor(options?: BatchHttpLink.Options); } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_batch.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { Observable } from 'rxjs'; // @public (undocumented) export namespace BatchLink { export type BatchHandler = (operations: ApolloLink.Operation[], forward: ApolloLink.ForwardFunction[]) => Observable; export interface Options extends Shared.Options { batchHandler?: BatchLink.BatchHandler; batchMax?: number; } // (undocumented) export namespace Shared { export interface Options { batchDebounce?: boolean; batchInterval?: number; batchKey?: (operation: ApolloLink.Operation) => string; batchMax?: number; } } } // @public export class BatchLink extends ApolloLink { constructor(options?: BatchLink.Options); // (undocumented) request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_client-awareness.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; // @public (undocumented) export namespace ClientAwarenessLink { // (undocumented) export interface ClientAwarenessOptions { name?: string; transport?: "headers" | false; version?: string; } export interface ContextOptions { clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; } // (undocumented) export interface EnhancedClientAwarenessOptions { transport?: "headers" | "extensions" | false; } // (undocumented) export interface Options { clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; } } // @public export class ClientAwarenessLink extends ApolloLink { constructor(options?: ClientAwarenessLink.Options); } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_context.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; // @public @deprecated (undocumented) export function setContext(setter: SetContextLink.LegacyContextSetter): SetContextLink; // @public (undocumented) export namespace SetContextLink { export type ContextSetter = (prevContext: Readonly, operation: SetContextLink.SetContextOperation) => Promise> | Partial; // @deprecated (undocumented) export type LegacyContextSetter = (operation: SetContextLink.SetContextOperation, prevContext: Readonly) => Promise> | Partial; // (undocumented) export namespace SetContextLinkDocumentationTypes { export function ContextSetter(prevContext: Readonly, operation: SetContextLink.SetContextOperation): Promise> | Partial; } export type SetContextOperation = Omit; } // @public export class SetContextLink extends ApolloLink { constructor(setter: SetContextLink.ContextSetter); } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_error.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { ErrorLike } from '@apollo/client'; import { Observable } from 'rxjs'; // @public (undocumented) export namespace ErrorLink { export interface ErrorHandler { // (undocumented) (options: ErrorHandlerOptions): Observable | void; } export interface ErrorHandlerOptions { error: ErrorLike; forward: ApolloLink.ForwardFunction; operation: ApolloLink.Operation; result?: ApolloLink.Result; } // (undocumented) export namespace ErrorLinkDocumentationTypes { export function ErrorHandler(options: ErrorHandlerOptions): Observable | void; } } // @public export class ErrorLink extends ApolloLink { constructor(errorHandler: ErrorLink.ErrorHandler); } // @public @deprecated (undocumented) export function onError(errorHandler: ErrorLink.ErrorHandler): ErrorLink; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_http.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { ASTNode } from 'graphql'; import { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; import type { print as print_2 } from 'graphql'; // @public (undocumented) export namespace BaseHttpLink { // (undocumented) export interface Body { // (undocumented) extensions?: Record; // (undocumented) operationName?: string; // (undocumented) query?: string; // (undocumented) variables?: Record; } export interface ContextOptions { credentials?: RequestCredentials; fetchOptions?: RequestInit; headers?: Record; http?: BaseHttpLink.HttpOptions; uri?: string | BaseHttpLink.UriFunction; } export interface HttpOptions { accept?: string[]; includeExtensions?: boolean; includeQuery?: boolean; preserveHeaderCase?: boolean; } export interface Options extends Shared.Options { useGETForQueries?: boolean; } // (undocumented) export type Printer = (node: ASTNode, originalPrint: typeof print_2) => string; // (undocumented) export namespace Shared { export interface Options { credentials?: RequestCredentials; fetch?: typeof fetch; fetchOptions?: RequestInit; headers?: Record; includeExtensions?: boolean; includeUnusedVariables?: boolean; preserveHeaderCase?: boolean; print?: BaseHttpLink.Printer; uri?: string | BaseHttpLink.UriFunction; } } // (undocumented) export type UriFunction = (operation: ApolloLink.Operation) => string; } // @public export class BaseHttpLink extends ApolloLink { constructor(options?: BaseHttpLink.Options); } // @public (undocumented) export const checkFetcher: (fetcher: typeof fetch | undefined) => void; // @public @deprecated (undocumented) export const createHttpLink: (options?: HttpLink.Options) => HttpLink; // @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; } | { controller: AbortController; signal: AbortSignal; }; // @public (undocumented) export const defaultPrinter: BaseHttpLink.Printer; // @public (undocumented) export const fallbackHttpConfig: { http: BaseHttpLink.HttpOptions; headers: { accept: string; "content-type": string; }; options: { method: string; }; }; // @public (undocumented) interface HttpConfig { // (undocumented) credentials?: any; // (undocumented) headers?: Record; // (undocumented) http?: BaseHttpLink.HttpOptions; // (undocumented) options?: any; } // @public (undocumented) export namespace HttpLink { export interface ContextOptions extends BaseHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { } export interface Options extends BaseHttpLink.Options, ClientAwarenessLink.Options { } } // @public export class HttpLink extends ApolloLink { constructor(options?: HttpLink.Options); } // @public (undocumented) export function parseAndCheckHttpResponse(operations: ApolloLink.Operation | ApolloLink.Operation[]): (response: Response) => Promise; // @public (undocumented) export function rewriteURIForGET(chosenURI: string, body: BaseHttpLink.Body): { parseError: unknown; newURI?: undefined; } | { newURI: string; parseError?: undefined; }; // Warning: (ae-forgotten-export) The symbol "HttpConfig" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function selectHttpOptionsAndBody(operation: ApolloLink.Operation, fallbackConfig: HttpConfig, ...configs: Array): { options: HttpConfig & Record; body: BaseHttpLink.Body; }; // @public (undocumented) export function selectHttpOptionsAndBodyInternal(operation: ApolloLink.Operation, printer: BaseHttpLink.Printer, ...configs: HttpConfig[]): { options: HttpConfig & Record; body: BaseHttpLink.Body; }; // @public (undocumented) export const selectURI: (operation: ApolloLink.Operation, fallbackURI?: string | ((operation: ApolloLink.Operation) => string)) => any; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_persisted-queries.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; import type { ErrorLike } from '@apollo/client'; import type { FormattedExecutionResult } from 'graphql'; // @public @deprecated (undocumented) export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => PersistedQueryLink; // @public (undocumented) export namespace PersistedQueryLink { // (undocumented) export namespace Base { export interface Options { disable?: (options: PersistedQueryLink.DisableFunctionOptions) => boolean; retry?: (options: PersistedQueryLink.RetryFunctionOptions) => boolean; useGETForHashedQueries?: boolean; } } export interface DisableFunctionOptions extends PersistedQueryLink.RetryFunctionOptions { } export interface ErrorMeta { persistedQueryNotFound: boolean; persistedQueryNotSupported: boolean; } export type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike; export interface GenerateHashOptions extends Base.Options { generateHash: PersistedQueryLink.GenerateHashFunction; // (undocumented) sha256?: never; } export type Options = PersistedQueryLink.SHA256Options | PersistedQueryLink.GenerateHashOptions; // (undocumented) export namespace PersistedQueryLinkDocumentationTypes { export function GenerateHashFunction(document: DocumentNode): string | PromiseLike; export function SHA256Function(queryString: string): string | PromiseLike; } export interface RetryFunctionOptions { error: ErrorLike; meta: PersistedQueryLink.ErrorMeta; operation: ApolloLink.Operation; result?: FormattedExecutionResult; } export type SHA256Function = (queryString: string) => string | PromiseLike; export interface SHA256Options extends Base.Options { // (undocumented) generateHash?: never; sha256: PersistedQueryLink.SHA256Function; } } // @public export class PersistedQueryLink extends ApolloLink { constructor(options: PersistedQueryLink.Options); // (undocumented) resetHashCache: () => void; } // @public (undocumented) export const VERSION = 1; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_remove-typename.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; // @public export const KEEP = "__KEEP"; // @public @deprecated (undocumented) export function removeTypenameFromVariables(options?: RemoveTypenameFromVariablesLink.Options): RemoveTypenameFromVariablesLink; // @public (undocumented) export namespace RemoveTypenameFromVariablesLink { export interface KeepTypenameConfig { // (undocumented) [key: string]: typeof KEEP | RemoveTypenameFromVariablesLink.KeepTypenameConfig; } export interface Options { except?: RemoveTypenameFromVariablesLink.KeepTypenameConfig; } } // @public export class RemoveTypenameFromVariablesLink extends ApolloLink { constructor(options?: RemoveTypenameFromVariablesLink.Options); } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_retry.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { ErrorLike } from '@apollo/client'; import { Observable } from 'rxjs'; // @public (undocumented) export namespace RetryLink { export type AttemptsFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => boolean | Promise; export interface AttemptsOptions { max?: number; retryIf?: (error: ErrorLike, operation: ApolloLink.Operation) => boolean | Promise; } export type DelayFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => number; export interface DelayOptions { initial?: number; jitter?: boolean; max?: number; } export interface Options { attempts?: RetryLink.AttemptsOptions | RetryLink.AttemptsFunction; delay?: RetryLink.DelayOptions | RetryLink.DelayFunction; } // (undocumented) export namespace RetryLinkDocumentationTypes { export function AttemptsFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): boolean | Promise; export function DelayFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): number; } } // @public export class RetryLink extends ApolloLink { constructor(options?: RetryLink.Options); // (undocumented) request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_schema.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { GraphQLSchema } from 'graphql'; import { Observable } from 'rxjs'; // @public (undocumented) export namespace SchemaLink { export interface Options { context?: SchemaLink.ResolverContext | SchemaLink.ResolverContextFunction; rootValue?: any; schema: GraphQLSchema; validate?: boolean; } export type ResolverContext = Record; export type ResolverContextFunction = (operation: ApolloLink.Operation) => SchemaLink.ResolverContext | PromiseLike; // (undocumented) export namespace SchemaLinkDocumentationTypes { export function ResolverContextFunction(operation: ApolloLink.Operation): SchemaLink.ResolverContext | PromiseLike; } } // @public export class SchemaLink extends ApolloLink { constructor(options: SchemaLink.Options); // (undocumented) context: SchemaLink.Options["context"]; // (undocumented) request(operation: ApolloLink.Operation): Observable; // (undocumented) rootValue: SchemaLink.Options["rootValue"]; // (undocumented) schema: SchemaLink.Options["schema"]; // (undocumented) validate: boolean; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_subscriptions.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { Client } from 'graphql-ws'; import { Observable } from 'rxjs'; // @public export class GraphQLWsLink extends ApolloLink { constructor(client: Client); // (undocumented) readonly client: Client; // (undocumented) request(operation: ApolloLink.Operation): Observable; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_utils.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; // @public (undocumented) export function createOperation(request: ApolloLink.Request, { client }: ApolloLink.ExecuteContext): ApolloLink.Operation; // @public (undocumented) export function filterOperationVariables(variables: Record, query: DocumentNode): { [x: string]: any; }; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-link_ws.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { ClientOptions } from 'subscriptions-transport-ws'; import type { Observable } from 'rxjs'; import { SubscriptionClient } from 'subscriptions-transport-ws'; // @public (undocumented) export namespace WebSocketLink { export interface Configuration { options?: ClientOptions; uri: string; webSocketImpl?: any; } } // @public @deprecated export class WebSocketLink extends ApolloLink { constructor(paramsOrClient: WebSocketLink.Configuration | SubscriptionClient); // (undocumented) request(operation: ApolloLink.Operation): Observable; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-local-state.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloClient } from '@apollo/client'; import type { DefaultContext } from '@apollo/client'; import type { DocumentNode } from 'graphql'; import type { FieldNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { FragmentMap } from '@apollo/client/utilities/internal'; import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; import type { OperationVariables } from '@apollo/client'; import type { RemoveIndexSignature } from '@apollo/client/utilities/internal'; import type { TypedDocumentNode } from '@apollo/client'; import type { WatchQueryFetchPolicy } from '@apollo/client'; // @public (undocumented) type InferContextValueFromResolvers = TResolvers extends { [typename: string]: infer TFieldResolvers; } ? TFieldResolvers extends ({ [field: string]: LocalState.Resolver; }) ? unknown extends TContext ? DefaultContext : TContext : DefaultContext : DefaultContext; // @public (undocumented) export namespace LocalState { // (undocumented) export type ContextFunction = (options: ContextFunctionOptions) => TContext; // (undocumented) export interface ContextFunctionOptions { // (undocumented) client: ApolloClient; // (undocumented) document: DocumentNode; // (undocumented) phase: "exports" | "resolve"; // (undocumented) requestContext: DefaultContext; // (undocumented) variables: OperationVariables; } // Warning: (ae-forgotten-export) The symbol "MaybeRequireContextFunction" needs to be exported by the entry point index.d.ts export type Options = { context?: ContextFunction; resolvers?: TResolvers; } & MaybeRequireContextFunction; // (undocumented) export type Path = Array; export type Resolver> = (rootValue: TParent, args: TArgs, context: { requestContext: TContext; client: ApolloClient; phase: "exports" | "resolve"; }, info: { field: FieldNode; fragmentMap: FragmentMap; path: Path; }) => TResult | Promise; export interface Resolvers { // (undocumented) [typename: string]: { [field: string]: Resolver; }; } // (undocumented) export type RootValueFunction = (context: RootValueFunctionContext) => TRootValue; // (undocumented) export interface RootValueFunctionContext { // (undocumented) client: ApolloClient; // (undocumented) context: DefaultContext; // (undocumented) document: DocumentNode; // (undocumented) phase: "exports" | "resolve"; // (undocumented) variables: OperationVariables; } } // Warning: (ae-forgotten-export) The symbol "InferContextValueFromResolvers" needs to be exported by the entry point index.d.ts // // @public export class LocalState, TContext = InferContextValueFromResolvers> { constructor(...[options]: {} extends TResolvers ? [ options?: LocalState.Options> ] : [ options: LocalState.Options> & { resolvers: TResolvers; } ]); addResolvers(resolvers: TResolvers): void; // (undocumented) execute({ document, client, context, remoteResult, variables, onlyRunForcedResolvers, returnPartialData, fetchPolicy, }: { document: DocumentNode | TypedDocumentNode; client: ApolloClient; context: DefaultContext | undefined; remoteResult: FormattedExecutionResult | undefined; variables: TVariables | undefined; onlyRunForcedResolvers?: boolean; returnPartialData?: boolean; fetchPolicy: WatchQueryFetchPolicy; }): Promise>; // (undocumented) getExportedVariables({ document, client, context, variables, }: { document: DocumentNode | TypedDocumentNode; client: ApolloClient; context: DefaultContext | undefined; variables: Partial>; }): Promise; } // @public (undocumented) type MaybeRequireContextFunction = {} extends RemoveIndexSignature ? {} : { context: LocalState.ContextFunction; }; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-masking.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache } from '@apollo/client'; import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; import type { DocumentNode } from '@apollo/client'; import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; import type { HKT } from '@apollo/client/utilities'; import type { IsAny } from '@apollo/client/utilities/internal'; import type { Prettify } from '@apollo/client/utilities/internal'; import type { Primitive } from '@apollo/client/utilities/internal'; import type { RemoveIndexSignature } from '@apollo/client/utilities/internal'; import type { TypedDocumentNode } from '@apollo/client'; import type { TypeOverrides } from '@apollo/client'; // Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts // // @public type CombineByTypeName = { [TypeName in NonNullable]: Prettify>>; }[NonNullable]; // Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts // // @public type CombineIntersection = Exclude | CombineByTypeName>; // Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts // // @public (undocumented) type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; // @internal @deprecated (undocumented) export const disableWarningsSlot: { readonly id: string; hasValue(): boolean; getValue(): boolean | undefined; withValue(value: boolean, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult; }; // @public (undocumented) type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; // @public (undocumented) type Exact = (x: T) => T; // @public type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { [K in keyof Union as K extends "__typename" ? K : never]: TypeName; } : never : never; // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts // // @public export type FragmentType = ApplyHKTImplementationWithDefault) ? TFragmentData : TFragmentDataOrTypedDocumentNode>; // @public (undocumented) export namespace GraphQLCodegenDataMasking { // (undocumented) export type FragmentType = [ TData ] extends [{ " $fragmentName"?: infer TKey; }] ? TKey extends string ? { " $fragmentRefs"?: { [key in TKey]: TData; }; } : never : never; // (undocumented) export namespace HKTImplementation { // (undocumented) export interface FragmentType extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: GraphQLCodegenDataMasking.FragmentType; } // (undocumented) export interface MaybeMasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: GraphQLCodegenDataMasking.MaybeMasked; } // (undocumented) export interface Unmasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: GraphQLCodegenDataMasking.Unmasked; } } export type MaybeMasked = TData; // (undocumented) export interface TypeOverrides { // (undocumented) FragmentType: HKTImplementation.FragmentType; // (undocumented) MaybeMasked: HKTImplementation.MaybeMasked; // (undocumented) Unmasked: HKTImplementation.Unmasked; } // Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts export type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs> : TData : TData; } // @internal @deprecated (undocumented) export function maskFragment(data: TData, document: TypedDocumentNode | DocumentNode, cache: ApolloCache, fragmentName?: string): TData; // @internal @deprecated (undocumented) export function maskOperation(data: TData, document: DocumentNode | TypedDocumentNode, cache: ApolloCache): TData; // @public export type MaybeMasked = ApplyHKTImplementationWithDefault; // Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts // // @public (undocumented) type MergeObjects = Prettify<{ [k in keyof T]: k extends keyof U ? [ NonNullable, NonNullable ] extends ([ infer TK extends object, infer UK extends object ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; } & Pick>>; // Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts // // @public (undocumented) type MergeUnions = MergeUnionsAcc, never>; // Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts // // @public (undocumented) type MergeUnionsAcc = [ Curr ] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ Merged ] extends [never] ? Curr : MergeObjects>; // @public (undocumented) namespace PreserveTypes { // (undocumented) type FragmentType<_TData> = never; // (undocumented) namespace HKTImplementation { // (undocumented) interface FragmentType extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: never; } // (undocumented) interface MaybeMasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } // (undocumented) interface Unmasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } } // (undocumented) type MaybeMasked = TData; // (undocumented) interface TypeOverrides { // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts // // (undocumented) FragmentType: HKTImplementation.FragmentType; // (undocumented) MaybeMasked: HKTImplementation.MaybeMasked; // (undocumented) Unmasked: HKTImplementation.Unmasked; } // (undocumented) type Unmasked = TData; } // @public (undocumented) type RemoveFragmentName = T extends any ? Omit : T; // Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts // // @public (undocumented) type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; // @public (undocumented) type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; // @public export type Unmasked = ApplyHKTImplementationWithDefault; // @public (undocumented) type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { " $fragmentRefs"?: infer FragmentRefs; } ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { [K in keyof TData]: UnwrapFragmentRefs; } : TData : never; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-react.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache } from '@apollo/client'; import type { ApolloCache as ApolloCache_2 } from '@apollo/client/cache'; import type { ApolloClient } from '@apollo/client'; import type { DataState } from '@apollo/client'; import type { DataValue } from '@apollo/client'; import type { DefaultContext } from '@apollo/client'; import type { DocumentationTypes } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import type { ErrorLike } from '@apollo/client'; import type { ErrorPolicy } from '@apollo/client'; import type { FetchMoreFunction } from '@apollo/client/react/internal'; import type { FetchPolicy } from '@apollo/client'; import type { GetDataState } from '@apollo/client'; import type { HookWrappers } from '@apollo/client/react/internal'; import type { IgnoreModifier } from '@apollo/client/cache'; import type { InternalRefetchQueriesInclude } from '@apollo/client'; import type { InternalTypes as InternalTypes_2 } from '@apollo/client'; import type { MaybeMasked } from '@apollo/client'; import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client/masking'; import type { MissingTree } from '@apollo/client/cache'; import type { MutationFetchPolicy } from '@apollo/client'; import type { MutationQueryReducersMap } from '@apollo/client'; import type { MutationUpdaterFunction } from '@apollo/client'; import { NetworkStatus } from '@apollo/client'; import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; import type { NormalizedExecutionResult } from '@apollo/client'; import type { ObservableQuery } from '@apollo/client'; import type { OnQueryUpdated } from '@apollo/client'; import type { OperationVariables } from '@apollo/client'; import { PreloadedQueryRef } from '@apollo/client/react/internal'; import type { PreloadedQueryRef as PreloadedQueryRef_2 } from '@apollo/client/react'; import type { Prettify } from '@apollo/client/utilities/internal'; import { QueryRef } from '@apollo/client/react/internal'; import type { QueryRef as QueryRef_2 } from '@apollo/client/react'; import type { ReactiveVar } from '@apollo/client'; import type * as ReactTypes from 'react'; import type { RefetchFunction } from '@apollo/client/react/internal'; import type { RefetchWritePolicy } from '@apollo/client'; import type { SubscribeToMoreFunction } from '@apollo/client'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import type { TypedDocumentNode as TypedDocumentNode_2 } from '@apollo/client'; import type { Unmasked } from '@apollo/client'; import type { UpdateQueryMapFn } from '@apollo/client'; import type { VariablesOption } from '@apollo/client/utilities/internal'; import type { WatchQueryFetchPolicy } from '@apollo/client'; import type { wrapperSymbol } from '@apollo/client/react/internal'; // @public (undocumented) export interface ApolloContextValue { // (undocumented) [wrapperSymbol]?: HookWrappers; // (undocumented) client?: ApolloClient; } // @public (undocumented) export namespace ApolloProvider { // (undocumented) export interface Props { // (undocumented) children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; // (undocumented) client: ApolloClient; } } // @public (undocumented) export const ApolloProvider: ReactTypes.FC; // @public @deprecated (undocumented) export type BackgroundQueryHookFetchPolicy = useBackgroundQuery.FetchPolicy; // @public @deprecated (undocumented) export type BackgroundQueryHookOptions = useBackgroundQuery.Options; // @public export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; // @public (undocumented) export function getApolloContext(): ReactTypes.Context; // @internal @deprecated (undocumented) export namespace InternalTypes { export type { HookWrappers }; } // @public @deprecated (undocumented) export type LazyQueryExecFunction = useLazyQuery.ExecFunction; // @public @deprecated (undocumented) export type LazyQueryHookExecOptions = useLazyQuery.ExecOptions; // @public @deprecated (undocumented) export type LazyQueryHookOptions = useLazyQuery.Options; // @public @deprecated (undocumented) export type LazyQueryResult = useLazyQuery.Result; // @public @deprecated (undocumented) export type LazyQueryResultTuple = useLazyQuery.ResultTuple; // @public @deprecated (undocumented) export type LoadableQueryFetchPolicy = useLoadableQuery.FetchPolicy; // @public @deprecated (undocumented) export type LoadableQueryHookOptions = useLoadableQuery.Options; // @public @deprecated (undocumented) export type LoadQueryFunction = useLoadableQuery.LoadQueryFunction; // @public (undocumented) type MakeRequiredVariablesOptional> = Prettify<{ [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; } & Omit>; // @public @deprecated (undocumented) export type MutationFunctionOptions = useMutation.MutationFunctionOptions; // @public @deprecated (undocumented) export type MutationHookOptions = useMutation.Options; // @public @deprecated (undocumented) export type MutationResult = useMutation.Result; // @public @deprecated (undocumented) export type MutationTuple = useMutation.ResultTuple; // @public @deprecated (undocumented) export type OnDataOptions = useSubscription.OnDataOptions; // @public @deprecated (undocumented) export type OnSubscriptionDataOptions = useSubscription.OnSubscriptionDataOptions; export { PreloadedQueryRef } // @public (undocumented) export type PreloadQueryFetchPolicy = Extract; // @public export interface PreloadQueryFunction { (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): PreloadedQueryRef_2; (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { errorPolicy: "ignore" | "all"; }): PreloadedQueryRef_2; (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { returnPartialData: true; }): PreloadedQueryRef_2; (query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: PreloadQueryOptions> ] : [options: PreloadQueryOptions>]): PreloadedQueryRef_2; toPromise>(queryRef: TQueryRef): Promise; } // @public (undocumented) export type PreloadQueryOptions = { context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: PreloadQueryFetchPolicy; returnPartialData?: boolean; refetchWritePolicy?: RefetchWritePolicy; } & VariablesOption; // @public @deprecated (undocumented) export type QueryHookOptions = useQuery.Options; export { QueryRef } // @public @deprecated (undocumented) export type QueryResult = useQuery.Result; // @public (undocumented) export const reactCompilerVersion: string; // @public (undocumented) type ResetFunction = () => void; // @public (undocumented) export type SkipToken = typeof skipToken; // @public (undocumented) export const skipToken: unique symbol; // @public @deprecated (undocumented) export type SubscriptionHookOptions = useSubscription.Options; // @public @deprecated (undocumented) export type SubscriptionResult = useSubscription.Result; // @public @deprecated (undocumented) export type SuspenseQueryHookFetchPolicy = useSuspenseQuery.FetchPolicy; // @public @deprecated (undocumented) export type SuspenseQueryHookOptions = useSuspenseQuery.Options; // @public (undocumented) export function useApolloClient(override?: ApolloClient): ApolloClient; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; fetchPolicy: "no-cache"; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: false; errorPolicy: "ignore" | "all"; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; errorPolicy: "ignore" | "all"; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { errorPolicy: "ignore" | "all"; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; returnPartialData: false; }): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; returnPartialData: boolean; }): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: false; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; }): [ QueryRef_2, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; }): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken): [undefined, useBackgroundQuery.Result]; // @public export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { returnPartialData: false; })): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { returnPartialData: boolean; })): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useBackgroundQuery.Options> ] : [options: useBackgroundQuery.Options>]): [ QueryRef_2, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken | useBackgroundQuery.Options> ] : [options: SkipToken | useBackgroundQuery.Options>]): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options>): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export namespace useBackgroundQuery { import _self = useBackgroundQuery; // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; refetchWritePolicy?: RefetchWritePolicy; returnPartialData?: boolean; // @deprecated skip?: boolean; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useBackgroundQuery { // (undocumented) export interface Options extends Base.Options, DocumentationTypes.VariableOptions { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useBackgroundQuery { // (undocumented) export interface Result extends useBackgroundQuery.Result { } } } // (undocumented) export namespace DocumentationTypes { export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options): [ QueryRef_2 | undefined, useBackgroundQuery.Result ]; } // (undocumented) export type FetchPolicy = Extract; // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export interface Result { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } } // @public @deprecated (undocumented) export type UseBackgroundQueryResult = useBackgroundQuery.Result; // @public export function useFragment(options: useFragment.Options & { from: Array>; }): useFragment.Result>; // @public export function useFragment(options: useFragment.Options & { from: Array; }): useFragment.Result>; // @public export function useFragment(options: useFragment.Options & { from: Array | null>; }): useFragment.Result>; // @public export function useFragment(options: useFragment.Options): useFragment.Result; // @public (undocumented) export namespace useFragment { import _self = useFragment; // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useFragment { // (undocumented) export interface Options extends useFragment.Options { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useFragment { // (undocumented) export interface Result { // (undocumented) complete: boolean; // (undocumented) data: MaybeMasked_2 | DataValue.Partial>; missing?: MissingTree; } } } // (undocumented) export namespace DocumentationTypes { export function useFragment({ fragment, from, fragmentName, variables, optimistic, client, }: useFragment.Options): useFragment.Result; } export type FromOptionValue = ApolloCache_2.FromOptionValue; // (undocumented) export interface Options { client?: ApolloClient; fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; from: useFragment.FromOptionValue | Array | null> | null; optimistic?: boolean; variables?: NoInfer_2; } // (undocumented) export type Result = ({ complete: true; missing?: never; } & GetDataState, "complete">) | { complete: false; missing?: MissingTree; data: TData extends Array ? Array | null> : DataValue.Partial; dataState: "partial"; }; } // @public @deprecated (undocumented) export type UseFragmentOptions = useFragment.Options; // @public @deprecated (undocumented) export type UseFragmentResult = useFragment.Result; // @public export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { returnPartialData: true; }): useLazyQuery.ResultTuple; // @public export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { returnPartialData: boolean; }): useLazyQuery.ResultTuple; // @public export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery.Options, NoInfer_2>): useLazyQuery.ResultTuple; // @public (undocumented) export namespace useLazyQuery { import _self = useLazyQuery; // (undocumented) export namespace Base { // (undocumented) export interface Result { client: ApolloClient; error?: ErrorLike; fetchMore: (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; loading: boolean; networkStatus: NetworkStatus; observable: ObservableQuery; previousData?: MaybeMasked; refetch: (variables?: Partial) => Promise>>; startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn) => void; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useLazyQuery { // (undocumented) export interface Options extends useLazyQuery.Options { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useLazyQuery { // (undocumented) export interface Result extends Base.Result, DocumentationTypes.DataState, DocumentationTypes.VariableOptions { called: boolean; } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useLazyQuery { // (undocumented) export interface ExecOptions extends DocumentationTypes.VariableOptions { context?: DefaultContext; } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useLazyQuery { import ResultTuple = _self.ResultTuple; } } // (undocumented) export namespace DocumentationTypes { export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options): useLazyQuery.ResultTuple; } // (undocumented) export type ExecFunction = (...args: {} extends TVariables ? [ options?: useLazyQuery.ExecOptions ] : [options: useLazyQuery.ExecOptions]) => ObservableQuery.ResultPromise>; // (undocumented) export type ExecOptions = { context?: DefaultContext; } & VariablesOption; // (undocumented) export interface Options { client?: ApolloClient; errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: InternalTypes_2.NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy; returnPartialData?: boolean; skipPollAttempt?: () => boolean; } // (undocumented) export type Result["dataState"] = DataState["dataState"]> = Base.Result & (({ called: true; variables: TVariables; } & GetDataState, TStates>) | { called: false; variables: Partial; data: undefined; dataState: "empty"; }); // (undocumented) export type ResultTuple["dataState"] = DataState["dataState"]> = [ execute: ExecFunction, result: useLazyQuery.Result ]; } // @public export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useLoadableQuery.Result; // @public export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { errorPolicy: "ignore" | "all"; }): useLoadableQuery.Result; // @public export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; }): useLoadableQuery.Result; // @public export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery.Options): useLoadableQuery.Result; // @public (undocumented) export namespace useLoadableQuery { // (undocumented) export namespace DocumentationTypes { export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options): useLoadableQuery.Result; } // (undocumented) export type FetchPolicy = Extract; // (undocumented) export interface Handlers { fetchMore: FetchMoreFunction; refetch: RefetchFunction; // Warning: (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts reset: ResetFunction; subscribeToMore: SubscribeToMoreFunction; } // (undocumented) export type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; refetchWritePolicy?: RefetchWritePolicy; returnPartialData?: boolean; } // (undocumented) export type Result["dataState"] = DataState["dataState"]> = [ loadQuery: LoadQueryFunction, queryRef: QueryRef_2 | null, handlers: Handlers ]; } // @public @deprecated (undocumented) export type UseLoadableQueryResult = useLoadableQuery.Result; // Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional" needs to be exported by the entry point index.d.ts // // @public export function useMutation = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options, NoInfer_2, TCache, { [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; }>): useMutation.ResultTuple, TCache>; // @public (undocumented) export namespace useMutation { // (undocumented) export namespace DocumentationTypes { export function useMutation(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options): useMutation.ResultTuple; } // (undocumented) export type MutationFunction = (...[options]: {} extends TVariables ? [ options?: MutationFunctionOptions & { variables?: TVariables; } ] : [ options: MutationFunctionOptions & { variables: TVariables; } ]) => Promise>>; // (undocumented) export type MutationFunctionOptions = Options & { context?: DefaultContext | ((hookContext: DefaultContext | undefined) => DefaultContext); }; // (undocumented) export interface Options = Partial> { awaitRefetchQueries?: boolean; client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: MutationFetchPolicy; keepRootFields?: boolean; notifyOnNetworkStatusChange?: boolean; onCompleted?: (data: MaybeMasked, clientOptions?: Options) => void; onError?: (error: ErrorLike, clientOptions?: Options) => void; onQueryUpdated?: OnQueryUpdated; optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked> | IgnoreModifier); refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; update?: MutationUpdaterFunction; updateQueries?: MutationQueryReducersMap; variables?: Partial & TConfiguredVariables; } // (undocumented) export interface Result { called: boolean; client: ApolloClient; data: MaybeMasked | null | undefined; error: ErrorLike | undefined; loading: boolean; reset: () => void; } // (undocumented) export type ResultTuple = [ mutate: MutationFunction, result: Result ]; } // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { returnPartialData: true; }): useQuery.Result; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken): useQuery.Result>; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useQuery.Options, NoInfer_2> & { returnPartialData: true; })): useQuery.Result>; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { returnPartialData: boolean; }): useQuery.Result; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useQuery.Options, NoInfer_2> & { returnPartialData: boolean; })): useQuery.Result>; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useQuery.Options, NoInfer_2> ] : [options: useQuery.Options, NoInfer_2>]): useQuery.Result; // @public export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken | useQuery.Options, NoInfer_2> ] : [options: SkipToken | useQuery.Options, NoInfer_2>]): useQuery.Result>; // @public (undocumented) export namespace useQuery { // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: InternalTypes_2.NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy; returnPartialData?: boolean; skip?: boolean; skipPollAttempt?: () => boolean; ssr?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface Result { client: ApolloClient; error?: ErrorLike; fetchMore: (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; loading: boolean; networkStatus: NetworkStatus; observable: ObservableQuery; previousData?: MaybeMasked_2; refetch: (variables?: Partial) => Promise>>; startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn) => void; variables: TReturnVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useQuery { // (undocumented) export interface Options extends Base.Options, DocumentationTypes.VariableOptions { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useQuery { // (undocumented) export interface Result extends Base.Result, DocumentationTypes.DataState { } } } // (undocumented) export namespace DocumentationTypes { export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options): useQuery.Result; } // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export type Result["dataState"] = DataState["dataState"], TReturnVariables extends OperationVariables = TVariables> = Base.Result & GetDataState, TStates>; } // @public (undocumented) export namespace useQuery { var // (undocumented) ssrDisabledResult: ObservableQuery.Result; } // @public export function useQueryRefHandlers(queryRef: QueryRef_2["dataState"]>): useQueryRefHandlers.Result; // @public (undocumented) export namespace useQueryRefHandlers { // (undocumented) export namespace DocumentationTypes { export function useQueryRefHandlers(queryRef: QueryRef_2): useQueryRefHandlers.Result; } // (undocumented) export interface Result { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } } // @public @deprecated (undocumented) export type UseQueryRefHandlersResult = useQueryRefHandlers.Result; // @public export function useReactiveVar(rv: ReactiveVar): T; // @public export function useReadQuery["dataState"]>(queryRef: QueryRef_2): useReadQuery.Result; // @public (undocumented) export namespace useReadQuery { // (undocumented) export namespace Base { // (undocumented) export interface Result { error: ErrorLike | undefined; networkStatus: NetworkStatus; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useReadQuery { // (undocumented) export interface Result extends Base.Result, DocumentationTypes.DataState { } } export function useReadQuery(queryRef: QueryRef_2): useReadQuery.Result; } // (undocumented) export type Result["dataState"] = DataState["dataState"]> = Base.Result & GetDataState, TStates>; } // @public @deprecated (undocumented) export type UseReadQueryResult = useReadQuery.Result; // @public export function useSubscription(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ options?: useSubscription.Options, NoInfer_2> ] : [options: useSubscription.Options, NoInfer_2>]): useSubscription.Result; // @public (undocumented) export namespace useSubscription { import _self = useSubscription; // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; extensions?: Record; fetchPolicy?: FetchPolicy; ignoreResults?: boolean; onComplete?: () => void; onData?: (options: OnDataOptions) => any; onError?: (error: ErrorLike) => void; shouldResubscribe?: boolean | ((options: Options) => boolean); skip?: boolean; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSubscription { // (undocumented) export interface Options extends Base.Options, DocumentationTypes.VariableOptions { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSubscription { // (undocumented) export interface Result extends useSubscription.Result { } } } // (undocumented) export namespace DocumentationTypes { export function useSubscription(options?: useSubscription.Options): useSubscription.Result; } // (undocumented) export interface OnDataOptions { // (undocumented) client: ApolloClient; // (undocumented) data: OnDataResult; } // (undocumented) export type OnDataResult = Omit, "restart">; // (undocumented) export interface OnSubscriptionDataOptions { // (undocumented) client: ApolloClient; // (undocumented) subscriptionData: OnDataResult; } // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export interface Result { data?: MaybeMasked_2; error?: ErrorLike; loading: boolean; restart: () => void; } } // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: Array>; }): useSuspenseFragment.Result>; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: Array; }): useSuspenseFragment.Result>; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: Array | null>; }): useSuspenseFragment.Result>; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: useSuspenseFragment.FromOptionValue; }): useSuspenseFragment.Result; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: null; }): useSuspenseFragment.Result; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: useSuspenseFragment.FromOptionValue | null; }): useSuspenseFragment.Result; // @public export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; // @public (undocumented) export namespace useSuspenseFragment { import _self = useSuspenseFragment; // (undocumented) export namespace Base { // (undocumented) export type Options = { fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; from: useSuspenseFragment.FromOptionValue | Array | null> | null; optimistic?: boolean; client?: ApolloClient; }; } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSuspenseFragment { // (undocumented) export interface Options extends Base.Options, DocumentationTypes.VariableOptions { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSuspenseFragment { // (undocumented) export interface Result extends useSuspenseFragment.Result { } } } // (undocumented) export namespace DocumentationTypes { export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; } export type FromOptionValue = ApolloCache_2.FromOptionValue; // (undocumented) export type Options = Base.Options & VariablesOption>; // (undocumented) export interface Result { // (undocumented) data: DataValue.Complete>; } } // @public @deprecated (undocumented) export type UseSuspenseFragmentOptions = useSuspenseFragment.Options; // @public @deprecated (undocumented) export type UseSuspenseFragmentResult = useSuspenseFragment.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { errorPolicy: "ignore" | "all"; }): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; returnPartialData: true; }): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; }): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; }): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useSuspenseQuery.Options> & { returnPartialData: true; })): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useSuspenseQuery.Options> ] : [options: useSuspenseQuery.Options>]): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken | useSuspenseQuery.Options> ] : [options: SkipToken | useSuspenseQuery.Options>]): useSuspenseQuery.Result; // @public export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useSuspenseQuery.Options>): useSuspenseQuery.Result; // @public (undocumented) export namespace useSuspenseQuery { // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext; errorPolicy?: ErrorPolicy; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; refetchWritePolicy?: RefetchWritePolicy; returnPartialData?: boolean; // @deprecated skip?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface Result { client: ApolloClient; error: ErrorLike | undefined; fetchMore: FetchMoreFunction; networkStatus: NetworkStatus; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSuspenseQuery { // (undocumented) export interface Options extends Base.Options, DocumentationTypes.VariableOptions { } } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export namespace useSuspenseQuery { // (undocumented) export interface Result extends Base.Result, DocumentationTypes.DataState { } } } // (undocumented) export namespace DocumentationTypes { export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useSuspenseQuery.Options): useSuspenseQuery.Result; } // (undocumented) export type FetchPolicy = Extract; // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export type Result["dataState"] = DataState["dataState"]> = Base.Result & GetDataState, TStates>; } // @public @deprecated (undocumented) export type UseSuspenseQueryResult = useSuspenseQuery.Result; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-react_compiled.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache } from '@apollo/client/cache'; import type { ApolloCache as ApolloCache_2 } from '@apollo/client'; import type { ApolloClient } from '@apollo/client'; import { ApolloLink } from '@apollo/client/link'; import type { ApolloQueryResult as ApolloQueryResult_2 } from '@apollo/client'; import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; import type { Cache as Cache_2 } from '@apollo/client/cache'; import type { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; import type { DataProxy } from '@apollo/client/cache'; import type { DataState as DataState_2 } from '@apollo/client'; import type { DeepPartial } from '@apollo/client/utilities'; import type { DefaultContext as DefaultContext_2 } from '@apollo/client'; import type { DocumentationTypes } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import { DocumentTransform } from '@apollo/client/utilities'; import type { ErrorLike as ErrorLike_2 } from '@apollo/client'; import type { ErrorPolicy as ErrorPolicy_2 } from '@apollo/client'; import type { FetchMoreFunction } from '@apollo/client/react/internal'; import type { FetchMoreOptions as FetchMoreOptions_2 } from '@apollo/client'; import type { FetchPolicy as FetchPolicy_2 } from '@apollo/client'; import type { FetchResult } from '@apollo/client/link'; import type { FormattedExecutionResult } from 'graphql'; import type { FragmentType } from '@apollo/client/masking'; import { getApolloClientMemoryInternals } from '@apollo/client/utilities/internal'; import type { GetDataState as GetDataState_2 } from '@apollo/client'; import { gql } from '@apollo/client'; import type { GraphQLRequest } from '@apollo/client/link'; import type { HKT } from '@apollo/client/utilities'; import type { HookWrappers } from '@apollo/client/react/internal'; import type { IgnoreModifier } from '@apollo/client/cache'; import type { Incremental } from '@apollo/client/incremental'; import type { InternalRefetchQueriesInclude as InternalRefetchQueriesInclude_2 } from '@apollo/client'; import type { InteropObservable } from 'rxjs'; import type { IsAny } from '@apollo/client/utilities/internal'; import type { LocalState } from '@apollo/client/local-state'; import type { MaybeMasked } from '@apollo/client/masking'; import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client'; import type { MissingTree } from '@apollo/client/cache'; import type { MutateResult as MutateResult_2 } from '@apollo/client'; import type { MutationFetchPolicy as MutationFetchPolicy_2 } from '@apollo/client'; import type { MutationQueryReducersMap as MutationQueryReducersMap_2 } from '@apollo/client'; import type { MutationUpdaterFunction as MutationUpdaterFunction_2 } from '@apollo/client'; import { NetworkStatus as NetworkStatus_2 } from '@apollo/client'; import type { NextNotification } from 'rxjs'; import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; import type { NormalizedExecutionResult as NormalizedExecutionResult_2 } from '@apollo/client'; import { Observable } from 'rxjs'; import type { ObservableNotification } from 'rxjs'; import type { ObservableQuery as ObservableQuery_2 } from '@apollo/client'; import type { Observer } from 'rxjs'; import type { OnQueryUpdated as OnQueryUpdated_2 } from '@apollo/client'; import { OperationTypeNode } from 'graphql'; import type { OperationVariables } from '@apollo/client'; import { PreloadedQueryRef } from '@apollo/client/react/internal'; import type { Prettify } from '@apollo/client/utilities/internal'; import { QueryRef } from '@apollo/client/react/internal'; import type { QueryResult as QueryResult_3 } from '@apollo/client'; import type { ReactiveVar } from '@apollo/client'; import type * as ReactTypes from 'react'; import type { Reference } from '@apollo/client/cache'; import type { Reference as Reference_2 } from '@apollo/client'; import type { RefetchFunction } from '@apollo/client/react/internal'; import type { RefetchWritePolicy as RefetchWritePolicy_2 } from '@apollo/client'; import type { StoreObject } from '@apollo/client/cache'; import type { StoreObject as StoreObject_2 } from '@apollo/client'; import type { Subscribable } from 'rxjs'; import type { SubscribeToMoreFunction } from '@apollo/client'; import type { Subscription } from 'rxjs'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import type { TypedDocumentNode as TypedDocumentNode_2 } from '@apollo/client'; import type { Unmasked } from '@apollo/client/masking'; import type { Unmasked as Unmasked_2 } from '@apollo/client'; import type { UpdateQueryMapFn as UpdateQueryMapFn_2 } from '@apollo/client'; import type { VariablesOption } from '@apollo/client/utilities/internal'; import type { WatchFragmentOptions } from '@apollo/client/cache'; import type { WatchFragmentResult } from '@apollo/client/cache'; import type { WatchQueryFetchPolicy } from '@apollo/client'; import type { WatchQueryOptions } from '@apollo/client'; import type { wrapperSymbol } from '@apollo/client/react/internal'; // @public class ApolloClient_2 implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.compiled.d.ts constructor(options: ApolloClientOptions); // (undocumented) __requestRaw(payload: GraphQLRequest): Observable>; // (undocumented) cache: ApolloCache; clearStore(): Promise; // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) get defaultContext(): Partial; // (undocumented) defaultOptions: DefaultOptions; // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) readonly devtoolsConfig: DevtoolsOptions; // @deprecated (undocumented) disableNetworkFetches: never; get documentTransform(): DocumentTransform; extract(optimistic?: boolean): unknown; getMemoryInternals?: typeof getApolloClientMemoryInternals; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.compiled.d.ts getObservableQueries(include?: RefetchQueriesInclude): Set>; // (undocumented) link: ApolloLink; get localState(): LocalState | undefined; set localState(localState: LocalState); // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "MutateResult" needs to be exported by the entry point index.compiled.d.ts mutate(options: MutationOptions): Promise>>; onClearStore(cb: () => Promise): () => void; onResetStore(cb: () => Promise): () => void; set prioritizeCacheValues(value: boolean); get prioritizeCacheValues(): boolean; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "QueryResult_2" needs to be exported by the entry point index.compiled.d.ts query(options: QueryOptions): Promise>>; // (undocumented) queryDeduplication: boolean; readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; // @deprecated reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; refetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.compiled.d.ts refetchQueries>>(options: RefetchQueriesOptions): RefetchQueriesResult; resetStore(): Promise[] | null>; restore(serializedState: unknown): ApolloCache; setLink(newLink: ApolloLink): void; stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "SubscriptionObservable" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "SubscribeResult" needs to be exported by the entry point index.compiled.d.ts subscribe(options: SubscriptionOptions): SubscriptionObservable>>; // (undocumented) version: string; watchFragment(options: WatchFragmentOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "OperationVariables_2" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions_2" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.compiled.d.ts watchQuery(options: WatchQueryOptions_2): ObservableQuery; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) interface ApolloClientOptions { assumeImmutableResults?: boolean; cache: ApolloCache; // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; dataMasking?: boolean; // (undocumented) defaultContext?: Partial; defaultOptions?: DefaultOptions; devtools?: DevtoolsOptions; // (undocumented) documentTransform?: DocumentTransform; // (undocumented) enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; incrementalHandler?: Incremental.Handler; link: ApolloLink; // (undocumented) localState?: LocalState; queryDeduplication?: boolean; ssrForceFetchDelay?: number; ssrMode?: boolean; } // Warning: (ae-forgotten-export) The symbol "ApolloConsumer_2" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) export const ApolloConsumer: ReactTypes.FC; // @public (undocumented) namespace ApolloConsumer_2 { // (undocumented) interface Props { // (undocumented) children: (client: ApolloClient) => ReactTypes.ReactNode; } } // @public (undocumented) const ApolloConsumer: ReactTypes.FC; // @public (undocumented) export interface ApolloContextValue { // (undocumented) [wrapperSymbol]?: HookWrappers; // (undocumented) client?: ApolloClient; } // @public (undocumented) export namespace ApolloProvider { // (undocumented) export interface Props { // (undocumented) children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; // (undocumented) client: ApolloClient; } } // @public (undocumented) export const ApolloProvider: ReactTypes.FC; // Warning: (ae-forgotten-export) The symbol "DataState" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "GetDataState" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) type ApolloQueryResult["dataState"] = DataState["dataState"]> = { error?: ErrorLike; loading: boolean; networkStatus: NetworkStatus; partial: boolean; } & GetDataState; // Warning: (ae-forgotten-export) The symbol "useBackgroundQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type BackgroundQueryHookFetchPolicy = useBackgroundQuery_2.FetchPolicy; // @public @deprecated (undocumented) export type BackgroundQueryHookOptions = useBackgroundQuery_2.Options; // @public export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; // @public (undocumented) type DataState = { data: DataValue.Complete; dataState: "complete"; } | { data: DataValue.Streaming; dataState: "streaming"; } | { data: DataValue.Partial; dataState: "partial"; } | { data: undefined; dataState: "empty"; }; // @public (undocumented) namespace DataValue { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts type Complete = ApplyHKTImplementationWithDefault; type Partial = ApplyHKTImplementationWithDefault; type Streaming = ApplyHKTImplementationWithDefault; } // @public (undocumented) interface DefaultContext extends Record { // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; queryDeduplication?: boolean; } // @public (undocumented) interface DefaultOptions { // (undocumented) mutate?: Partial>; // (undocumented) query?: Partial>; // (undocumented) watchQuery?: Partial>; } // @public (undocumented) interface DevtoolsOptions { enabled?: boolean; name?: string; } // @public interface ErrorLike { // (undocumented) message: string; // (undocumented) name: string; // (undocumented) stack?: string; } // @public type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) type FetchMoreOptions = { query?: DocumentNode | TypedDocumentNode; variables?: Partial>; errorPolicy?: ErrorPolicy; context?: DefaultContext; updateQuery?: (previousQueryResult: Unmasked, options: { fetchMoreResult: Unmasked; variables: TFetchVars; }) => Unmasked; }; // @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; // @public (undocumented) type From = StoreObject_2 | Reference_2 | FragmentType> | string | null; // @public (undocumented) type From_2 = StoreObject_2 | Reference_2 | FragmentType> | string | null; // @public (undocumented) export function getApolloContext(): ReactTypes.Context; // @public (undocumented) type GetDataState["dataState"]> = Extract, { dataState: TState; }>; export { gql } // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; // @public (undocumented) interface InternalRefetchQueriesOptions extends Omit, "include"> { // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) include?: InternalRefetchQueriesInclude; // (undocumented) removeOptimistic?: string; } // @public (undocumented) type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; // Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; // Warning: (ae-forgotten-export) The symbol "useLazyQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type LazyQueryExecFunction = useLazyQuery_2.ExecFunction; // @public @deprecated (undocumented) export type LazyQueryHookExecOptions = useLazyQuery_2.ExecOptions; // @public @deprecated (undocumented) export type LazyQueryHookOptions = useLazyQuery_2.Options; // @public @deprecated (undocumented) export type LazyQueryResult = useLazyQuery_2.Result; // @public @deprecated (undocumented) export type LazyQueryResultTuple = useLazyQuery_2.ResultTuple; // Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type LoadableQueryFetchPolicy = useLoadableQuery_2.FetchPolicy; // @public @deprecated (undocumented) export type LoadableQueryHookOptions = useLoadableQuery_2.Options; // @public @deprecated (undocumented) export type LoadQueryFunction = useLoadableQuery_2.LoadQueryFunction; // @public (undocumented) type MakeRequiredVariablesOptional> = Prettify<{ [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; } & Omit>; // @public (undocumented) type MakeRequiredVariablesOptional_2> = Prettify<{ [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; } & Omit>; // @public (undocumented) interface MaskFragmentOptions { // (undocumented) data: TData; // (undocumented) fragment: DocumentNode; // (undocumented) fragmentName?: string; } // @public (undocumented) interface MaskOperationOptions { cause?: object; // (undocumented) data: TData; // (undocumented) document: DocumentNode; // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) fetchPolicy?: WatchQueryFetchPolicy_2; } // @public (undocumented) interface MutateResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) type MutationFetchPolicy = Extract; // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type MutationFunctionOptions = useMutation_2.MutationFunctionOptions; // @public @deprecated (undocumented) export type MutationHookOptions = useMutation_2.Options; // @public (undocumented) type MutationOptions = { optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked> | IgnoreModifier); updateQueries?: MutationQueryReducersMap; refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; awaitRefetchQueries?: boolean; update?: MutationUpdaterFunction; onQueryUpdated?: OnQueryUpdated; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: MutationFetchPolicy; keepRootFields?: boolean; mutation: DocumentNode | TypedDocumentNode; } & VariablesOption>; // @public (undocumented) type MutationQueryReducer = (previousResult: Record, options: { mutationResult: NormalizedExecutionResult>; queryName: string | undefined; queryVariables: Record; }) => Record; // @public (undocumented) type MutationQueryReducersMap = { [queryName: string]: MutationQueryReducer; }; // @public @deprecated (undocumented) export type MutationResult = useMutation_2.Result; // @public (undocumented) interface MutationStoreValue { // (undocumented) error: Error | null; // (undocumented) loading: boolean; // (undocumented) mutation: DocumentNode; // (undocumented) variables: Record; } // @public @deprecated (undocumented) export type MutationTuple = useMutation_2.ResultTuple; // @public (undocumented) type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { context?: DefaultContext; variables?: TVariables; }) => void; // @public enum NetworkStatus { error = 8, fetchMore = 3, loading = 1, poll = 6, ready = 7, refetch = 4, setVariables = 2, streaming = 9 } // @public (undocumented) interface NextFetchPolicyContext { // (undocumented) initialFetchPolicy: WatchQueryFetchPolicy_2; // (undocumented) observable: ObservableQuery; // (undocumented) options: WatchQueryOptions_2; // (undocumented) reason: "after-fetch" | "variables-changed"; } // @public type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; // @public (undocumented) interface ObservableAndInfo { // (undocumented) fromLink: boolean; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) observable: Observable>; } // @public (undocumented) namespace ObservableQuery { // @internal @deprecated interface CacheWatchOptions extends Cache_2.WatchOptions { // @deprecated lastOwnDiff?: Cache_2.DiffResult; } // (undocumented) type Options = { fetchPolicy: WatchQueryFetchPolicy_2; nextFetchPolicy?: WatchQueryFetchPolicy_2 | ((this: WatchQueryOptions_2, currentFetchPolicy: WatchQueryFetchPolicy_2, context: NextFetchPolicyContext) => WatchQueryFetchPolicy_2); initialFetchPolicy: WatchQueryFetchPolicy_2; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode | TypedDocumentNode; variables: TVariables; }; interface ResultPromise extends Promise { retain(): this; } } // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) class ObservableQuery implements Subscribable>>, InteropObservable>> { // (undocumented) ["@@observable"]: () => Subscribable>>; // (undocumented) [Symbol.observable]: () => Subscribable>>; constructor({ queryManager, options, transformedQuery, }: { queryManager: QueryManager; options: WatchQueryOptions_2; transformedQuery?: DocumentNode | TypedDocumentNode; queryId?: string; }); // @internal @deprecated (undocumented) applyOptions(newOptions: Partial>): void; // Warning: (ae-forgotten-export) The symbol "FetchMoreOptions" needs to be exported by the entry point index.compiled.d.ts fetchMore(options: FetchMoreOptions): Promise>; // @internal @deprecated (undocumented) getCacheDiff({ optimistic }?: { optimistic?: boolean | undefined; }): Cache_2.DiffResult; // (undocumented) getCurrentResult(): ApolloQueryResult>; // (undocumented) hasObservers(): boolean; // @internal @deprecated _lastWrite?: unknown; // @internal @deprecated (undocumented) notify(scheduled?: boolean): void; // (undocumented) readonly options: ObservableQuery.Options; // (undocumented) pipe: Observable>>["pipe"]; // (undocumented) get query(): TypedDocumentNode; // (undocumented) readonly queryName?: string; refetch(variables?: Partial): ObservableQuery.ResultPromise>; reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; // @internal @deprecated reset(): void; setVariables(variables: TVariables): Promise>; startPolling(pollInterval: number): void; stop(): void; stopPolling(): void; // (undocumented) subscribe: (observer: Partial>>> | ((value: ApolloQueryResult>) => void)) => Subscription; // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.compiled.d.ts subscribeToMore(options: SubscribeToMoreOptions): () => void; // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.compiled.d.ts updateQuery(mapFn: UpdateQueryMapFn): void; get variables(): TVariables; } // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type OnDataOptions = useSubscription_2.OnDataOptions; // @public (undocumented) type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; // @public @deprecated (undocumented) export type OnSubscriptionDataOptions = useSubscription_2.OnSubscriptionDataOptions; // @public (undocumented) type OperationVariables_2 = Record; // @public (undocumented) namespace OverridableTypes { // (undocumented) interface Complete extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } // (undocumented) interface Defaults { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) Complete: Complete; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) Partial: Partial; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) Streaming: Streaming; } // (undocumented) interface Partial extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: DeepPartial; } // (undocumented) interface Streaming extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } {}; } export { PreloadedQueryRef } // @public (undocumented) export type PreloadQueryFetchPolicy = Extract; // @public export interface PreloadQueryFunction { (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): PreloadedQueryRef; (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { errorPolicy: "ignore" | "all"; }): PreloadedQueryRef; (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { returnPartialData: true; }): PreloadedQueryRef; (query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: PreloadQueryOptions> ] : [options: PreloadQueryOptions>]): PreloadedQueryRef; toPromise>(queryRef: TQueryRef): Promise; } // @public (undocumented) export type PreloadQueryOptions = { context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: PreloadQueryFetchPolicy; returnPartialData?: boolean; refetchWritePolicy?: RefetchWritePolicy_2; } & VariablesOption; // Warning: (ae-forgotten-export) The symbol "useQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type QueryHookOptions = useQuery_2.Options; // @public (undocumented) class QueryManager { // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.compiled.d.ts constructor(options: QueryManagerOptions); // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) broadcastQueries(): void; // (undocumented) get cache(): ApolloCache; // (undocumented) clearStore(options?: Cache_2.ResetOptions): Promise; // Warning: (ae-forgotten-export) The symbol "ApolloClient_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) readonly client: ApolloClient_2; readonly clientOptions: ApolloClientOptions; // (undocumented) readonly dataMasking: boolean; // (undocumented) readonly defaultContext: Partial; // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) defaultOptions: DefaultOptions; // (undocumented) readonly documentTransform: DocumentTransform; // (undocumented) protected fetchCancelFns: Map any>; // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) fetchObservableWithInfo(options: WatchQueryOptions_2, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, }: { networkStatus?: NetworkStatus; query?: DocumentNode; fetchQueryOperator?: (source: Observable) => Observable; onCacheHit?: () => void; observableQuery?: ObservableQuery | undefined; }): ObservableAndInfo; // (undocumented) fetchQuery(options: WatchQueryOptions_2, networkStatus?: NetworkStatus): Promise>; // (undocumented) generateRequestId(): number; // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) getDocumentInfo(document: DocumentNode): TransformCacheEntry; // (undocumented) getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; // (undocumented) getVariables(document: DocumentNode, variables?: TVariables): TVariables; // (undocumented) readonly incrementalHandler: Incremental.Handler; // (undocumented) protected inFlightLinkObservables: Trie<{ observable?: Observable>; restart?: () => void; }>; // (undocumented) get link(): ApolloLink; // (undocumented) localState: LocalState | undefined; // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) maskFragment(options: MaskFragmentOptions): TData; // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) maskOperation(options: MaskOperationOptions): MaybeMasked; // (undocumented) mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions & { errorPolicy: ErrorPolicy; fetchPolicy: MutationFetchPolicy; }): Promise>>; // (undocumented) mutationStore?: { [mutationId: string]: MutationStoreValue; }; obsQueries: Set>; prioritizeCacheValues: boolean; // (undocumented) query(options: QueryOptions): Promise>>; // (undocumented) refetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; // (undocumented) readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription(options: SubscriptionOptions): SubscriptionObservable>; stop(): void; // (undocumented) transform(document: DocumentNode): DocumentNode; // (undocumented) watchQuery(options: WatchQueryOptions_2): ObservableQuery; } // @public (undocumented) interface QueryManagerOptions { // (undocumented) assumeImmutableResults: boolean; // (undocumented) client: ApolloClient_2; // (undocumented) clientOptions: ApolloClientOptions; // (undocumented) dataMasking: boolean; // (undocumented) defaultContext: Partial | undefined; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) documentTransform: DocumentTransform | null | undefined; // (undocumented) incrementalHandler: Incremental.Handler; // (undocumented) localState: LocalState | undefined; // (undocumented) onBroadcast: undefined | (() => void); // (undocumented) queryDeduplication: boolean; // (undocumented) ssrMode: boolean; } // @public (undocumented) namespace QueryNotification { // (undocumented) type FromCache = NextNotification> & { source: "cache"; }; // (undocumented) type FromNetwork = ObservableNotification> & { source: "network"; }; // (undocumented) type NewNetworkStatus = NextNotification<{ resetError?: boolean; }> & { source: "newNetworkStatus"; }; // (undocumented) type SetResult = NextNotification> & { source: "setResult"; }; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; } // @public type QueryOptions = { query: DocumentNode | TypedDocumentNode; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: FetchPolicy; } & VariablesOption>; export { QueryRef } // @public @deprecated (undocumented) export type QueryResult = useQuery_2.Result; // @public (undocumented) interface QueryResult_2 { data: TData | undefined; error?: ErrorLike; } // @public (undocumented) export const reactCompilerVersion: string = "19.1.0-rc.2"; // @public (undocumented) type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) type RefetchQueriesIncludeShorthand = "all" | "active"; // @public (undocumented) interface RefetchQueriesOptions { // (undocumented) include?: RefetchQueriesInclude; // (undocumented) onQueryUpdated?: OnQueryUpdated | null; // (undocumented) optimistic?: boolean; // (undocumented) updateCache?: (cache: TCache) => void; } // @public (undocumented) type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? QueryResult_2[] : TResult extends PromiseLike ? U[] : TResult[]; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) interface RefetchQueriesResult extends Promise> { // (undocumented) queries: ObservableQuery[]; // (undocumented) results: InternalRefetchQueriesResult[]; } // @public (undocumented) type RefetchQueryDescriptor = string | DocumentNode; // @public (undocumented) type RefetchWritePolicy = "merge" | "overwrite"; // @public (undocumented) type ResetFunction = () => void; // @public (undocumented) type ResetFunction_2 = () => void; // @public (undocumented) export type SkipToken = typeof skipToken; // @public (undocumented) export const skipToken: unique symbol; // @public (undocumented) type SkipToken_2 = typeof skipToken_2; // @public (undocumented) const skipToken_2: unique symbol; // @public (undocumented) interface SubscribeResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // @public (undocumented) interface SubscribeToMoreOptions { // (undocumented) context?: DefaultContext; // (undocumented) document: DocumentNode | TypedDocumentNode; // (undocumented) onError?: (error: ErrorLike) => void; // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) updateQuery?: SubscribeToMoreUpdateQueryFn; // (undocumented) variables?: TSubscriptionVariables; } // @public (undocumented) type SubscribeToMoreUpdateQueryFn = { ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { subscriptionData: { data: Unmasked; }; }): Unmasked | void; }; // @public @deprecated (undocumented) export type SubscriptionHookOptions = useSubscription_2.Options; // @public interface SubscriptionObservable extends Observable { restart: () => void; } // @public (undocumented) type SubscriptionOptions = { query: DocumentNode | TypedDocumentNode; fetchPolicy?: FetchPolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; extensions?: Record; } & VariablesOption>; // @public @deprecated (undocumented) export type SubscriptionResult = useSubscription_2.Result; // Warning: (ae-forgotten-export) The symbol "useSuspenseQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type SuspenseQueryHookFetchPolicy = useSuspenseQuery_2.FetchPolicy; // @public @deprecated (undocumented) export type SuspenseQueryHookOptions = useSuspenseQuery_2.Options; // @public (undocumented) interface TransformCacheEntry { // (undocumented) asQuery: DocumentNode; // (undocumented) clientQuery: DocumentNode | null; // (undocumented) defaultVars: OperationVariables_2; // (undocumented) hasClientExports: boolean; // (undocumented) hasForcedResolvers: boolean; // (undocumented) hasIncrementalDirective: boolean; // (undocumented) hasNonreactiveDirective: boolean; // (undocumented) nonReactiveQuery: DocumentNode; // (undocumented) operationType: OperationTypeNode | undefined; // (undocumented) serverQuery: DocumentNode | null; // (undocumented) violation?: Error | undefined; } // @public (undocumented) interface UpdateQueryMapFn { // (undocumented) ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; } // @public (undocumented) type UpdateQueryOptions = { variables?: TVariables; } & ({ complete: true; previousData: Unmasked; } | { complete: false; previousData: DeepPartial> | undefined; }); // @public (undocumented) export function useApolloClient(override?: ApolloClient): ApolloClient; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; fetchPolicy: "no-cache"; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: false; errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; returnPartialData: false; }): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; returnPartialData: boolean; }): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: false; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { returnPartialData: boolean; }): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; }): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken): [undefined, useBackgroundQuery.Result]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { returnPartialData: false; })): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { returnPartialData: boolean; })): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useBackgroundQuery.Options> ] : [options: useBackgroundQuery.Options>]): [ QueryRef, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken | useBackgroundQuery.Options> ] : [options: SkipToken | useBackgroundQuery.Options>]): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options>): [ QueryRef | undefined, useBackgroundQuery.Result ]; // @public (undocumented) export namespace useBackgroundQuery { // (undocumented) export type FetchPolicy = Extract; // (undocumented) export type Options = { client?: ApolloClient; refetchWritePolicy?: RefetchWritePolicy_2; errorPolicy?: ErrorPolicy_2; context?: DefaultContext_2; returnPartialData?: boolean; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; skip?: boolean; } & VariablesOption; // (undocumented) export type Result = { subscribeToMore: SubscribeToMoreFunction; fetchMore: FetchMoreFunction; refetch: RefetchFunction; }; } // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { returnPartialData: boolean; fetchPolicy: "no-cache"; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { returnPartialData: false; errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { returnPartialData: boolean; errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { errorPolicy: "ignore" | "all"; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { skip: boolean; returnPartialData: false; }): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { skip: boolean; returnPartialData: boolean; }): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { returnPartialData: false; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { returnPartialData: boolean; }): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { skip: boolean; }): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // Warning: (ae-forgotten-export) The symbol "SkipToken_2" needs to be exported by the entry point index.compiled.d.ts // // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2): [undefined, useBackgroundQuery_2.Result]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useBackgroundQuery_2.Options> & { returnPartialData: false; })): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useBackgroundQuery_2.Options> & { returnPartialData: boolean; })): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useBackgroundQuery_2.Options> ] : [options: useBackgroundQuery_2.Options>]): [ QueryRef, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken_2 | useBackgroundQuery_2.Options> ] : [options: SkipToken_2 | useBackgroundQuery_2.Options>]): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | useBackgroundQuery_2.Options>): [ QueryRef | undefined, useBackgroundQuery_2.Result ]; // @public (undocumented) namespace useBackgroundQuery_2 { // (undocumented) type FetchPolicy = Extract; // (undocumented) type Options = { client?: ApolloClient; refetchWritePolicy?: RefetchWritePolicy_2; errorPolicy?: ErrorPolicy_2; context?: DefaultContext_2; returnPartialData?: boolean; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; skip?: boolean; } & VariablesOption; // (undocumented) type Result = { subscribeToMore: SubscribeToMoreFunction; fetchMore: FetchMoreFunction; refetch: RefetchFunction; }; } // @public @deprecated (undocumented) export type UseBackgroundQueryResult = useBackgroundQuery_2.Result; // @public (undocumented) export function useFragment(options: useFragment.Options): useFragment.Result; // @public (undocumented) export namespace useFragment { // (undocumented) export interface Options { client?: ApolloClient; fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; // (undocumented) from: StoreObject | Reference | FragmentType> | string | null; optimistic?: boolean; variables?: NoInfer_2; } // (undocumented) export type Result = { data: MaybeMasked; complete: true; missing?: never; } | { data: DeepPartial>; complete: false; missing?: MissingTree; }; } // @public (undocumented) function useFragment_2(options: useFragment_2.Options): useFragment_2.Result; // @public (undocumented) namespace useFragment_2 { // (undocumented) interface Options { client?: ApolloClient; fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; // (undocumented) from: StoreObject | Reference | FragmentType> | string | null; optimistic?: boolean; variables?: NoInfer_2; } // (undocumented) type Result = { data: MaybeMasked; complete: true; missing?: never; } | { data: DeepPartial>; complete: false; missing?: MissingTree; }; } // Warning: (ae-forgotten-export) The symbol "useFragment_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type UseFragmentOptions = useFragment_2.Options; // @public @deprecated (undocumented) export type UseFragmentResult = useFragment_2.Result; // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { returnPartialData: true; }): useLazyQuery.ResultTuple; // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { returnPartialData: boolean; }): useLazyQuery.ResultTuple; // @public (undocumented) export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery.Options, NoInfer_2>): useLazyQuery.ResultTuple; // @public (undocumented) export namespace useLazyQuery { // (undocumented) export type ExecFunction = (...args: {} extends TVariables ? [ options?: useLazyQuery.ExecOptions ] : [options: useLazyQuery.ExecOptions]) => ObservableQuery_2.ResultPromise>; // (undocumented) export type ExecOptions = { context?: DefaultContext_2; } & VariablesOption; // (undocumented) export interface Options { client?: ApolloClient; errorPolicy?: ErrorPolicy_2; fetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; skipPollAttempt?: () => boolean; } // (undocumented) export type Result["dataState"] = DataState_2["dataState"]> = { startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn_2) => void; refetch: (variables?: Partial) => Promise>>; fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; client: ApolloClient; observable: ObservableQuery_2; previousData?: MaybeMasked_2; error?: ErrorLike_2; loading: boolean; networkStatus: NetworkStatus_2; } & (({ called: true; variables: TVariables; } & GetDataState_2, TStates>) | { called: false; variables: Partial; data: undefined; dataState: "empty"; }); // (undocumented) export type ResultTuple["dataState"] = DataState_2["dataState"]> = [ execute: ExecFunction, result: useLazyQuery.Result ]; } // @public (undocumented) function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options: useLazyQuery_2.Options, NoInfer_2> & { returnPartialData: true; }): useLazyQuery_2.ResultTuple; // @public (undocumented) function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options: useLazyQuery_2.Options, NoInfer_2> & { returnPartialData: boolean; }): useLazyQuery_2.ResultTuple; // @public (undocumented) function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery_2.Options, NoInfer_2>): useLazyQuery_2.ResultTuple; // @public (undocumented) namespace useLazyQuery_2 { // (undocumented) type ExecFunction = (...args: {} extends TVariables ? [ options?: useLazyQuery_2.ExecOptions ] : [options: useLazyQuery_2.ExecOptions]) => ObservableQuery_2.ResultPromise>; // (undocumented) type ExecOptions = { context?: DefaultContext_2; } & VariablesOption; // (undocumented) interface Options { client?: ApolloClient; errorPolicy?: ErrorPolicy_2; fetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; skipPollAttempt?: () => boolean; } // (undocumented) type Result["dataState"] = DataState_2["dataState"]> = { startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn_2) => void; refetch: (variables?: Partial) => Promise>>; fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; client: ApolloClient; observable: ObservableQuery_2; previousData?: MaybeMasked_2; error?: ErrorLike_2; loading: boolean; networkStatus: NetworkStatus_2; } & (({ called: true; variables: TVariables; } & GetDataState_2, TStates>) | { called: false; variables: Partial; data: undefined; dataState: "empty"; }); // Warning: (ae-forgotten-export) The symbol "useLazyQuery_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type ResultTuple["dataState"] = DataState_2["dataState"]> = [ execute: ExecFunction, result: useLazyQuery_2.Result ]; } // @public (undocumented) export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useLoadableQuery.Result; // @public (undocumented) export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { errorPolicy: "ignore" | "all"; }): useLoadableQuery.Result; // @public (undocumented) export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; }): useLoadableQuery.Result; // @public export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery.Options): useLoadableQuery.Result; // @public (undocumented) export namespace useLoadableQuery { // (undocumented) export type FetchPolicy = Extract; // (undocumented) export type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; } // (undocumented) export type Result["dataState"] = DataState_2["dataState"]> = [ loadQuery: LoadQueryFunction, queryRef: QueryRef | null, handlers: { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; reset: ResetFunction; } ]; } // @public (undocumented) function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useLoadableQuery_2.Result; // @public (undocumented) function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { errorPolicy: "ignore" | "all"; }): useLoadableQuery_2.Result; // @public (undocumented) function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { returnPartialData: true; }): useLoadableQuery_2.Result; // @public function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery_2.Options): useLoadableQuery_2.Result; // @public (undocumented) namespace useLoadableQuery_2 { // (undocumented) type FetchPolicy = Extract; // (undocumented) type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; // (undocumented) interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; // Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type Result["dataState"] = DataState_2["dataState"]> = [ loadQuery: LoadQueryFunction, queryRef: QueryRef | null, handlers: { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; reset: ResetFunction_2; } ]; } // @public @deprecated (undocumented) export type UseLoadableQueryResult = useLoadableQuery_2.Result; // Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional" needs to be exported by the entry point index.compiled.d.ts // // @public export function useMutation = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options, NoInfer_2, TCache, { [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; }>): useMutation.ResultTuple, TCache>; // @public (undocumented) export namespace useMutation { // (undocumented) export type MutationFunction = (...[options]: {} extends TVariables ? [ options?: MutationFunctionOptions & { variables?: TVariables; } ] : [ options: MutationFunctionOptions & { variables: TVariables; } ]) => Promise>>; // (undocumented) export type MutationFunctionOptions = Options & { mutation?: DocumentNode_2 | TypedDocumentNode; }; // (undocumented) export interface Options = Partial> { awaitRefetchQueries?: boolean; client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: MutationFetchPolicy_2; keepRootFields?: boolean; notifyOnNetworkStatusChange?: boolean; onCompleted?: (data: MaybeMasked_2, clientOptions?: Options) => void; onError?: (error: ErrorLike_2, clientOptions?: Options) => void; onQueryUpdated?: OnQueryUpdated_2; optimisticResponse?: Unmasked_2> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked_2> | IgnoreModifier); refetchQueries?: ((result: NormalizedExecutionResult_2>) => InternalRefetchQueriesInclude_2) | InternalRefetchQueriesInclude_2; update?: MutationUpdaterFunction_2; updateQueries?: MutationQueryReducersMap_2; variables?: TConfiguredVariables; } // (undocumented) export interface Result { called: boolean; client: ApolloClient; data: MaybeMasked_2 | null | undefined; error: ErrorLike_2 | undefined; loading: boolean; reset: () => void; } // (undocumented) export type ResultTuple = [ mutate: MutationFunction, result: Result ]; } // Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional_2" needs to be exported by the entry point index.compiled.d.ts // // @public function useMutation_2 = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation_2.Options, NoInfer_2, TCache, { [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; }>): useMutation_2.ResultTuple, TCache>; // @public (undocumented) namespace useMutation_2 { // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type MutationFunction = (...[options]: {} extends TVariables ? [ options?: MutationFunctionOptions & { variables?: TVariables; } ] : [ options: MutationFunctionOptions & { variables: TVariables; } ]) => Promise>>; // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type MutationFunctionOptions = Options & { mutation?: DocumentNode_2 | TypedDocumentNode; }; // (undocumented) interface Options = Partial> { awaitRefetchQueries?: boolean; client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: MutationFetchPolicy_2; keepRootFields?: boolean; notifyOnNetworkStatusChange?: boolean; onCompleted?: (data: MaybeMasked_2, clientOptions?: Options) => void; onError?: (error: ErrorLike_2, clientOptions?: Options) => void; onQueryUpdated?: OnQueryUpdated_2; optimisticResponse?: Unmasked_2> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked_2> | IgnoreModifier); refetchQueries?: ((result: NormalizedExecutionResult_2>) => InternalRefetchQueriesInclude_2) | InternalRefetchQueriesInclude_2; update?: MutationUpdaterFunction_2; updateQueries?: MutationQueryReducersMap_2; variables?: TConfiguredVariables; } // (undocumented) interface Result { called: boolean; client: ApolloClient; data: MaybeMasked_2 | null | undefined; error: ErrorLike_2 | undefined; loading: boolean; reset: () => void; } // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type ResultTuple = [ mutate: MutationFunction, result: Result ]; } // @public (undocumented) export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { returnPartialData: true; }): useQuery.Result; // @public (undocumented) export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { returnPartialData: boolean; }): useQuery.Result; // @public (undocumented) export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useQuery.Options, NoInfer_2> ] : [options: useQuery.Options, NoInfer_2>]): useQuery.Result; // @public (undocumented) export namespace useQuery { // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; skip?: boolean; skipPollAttempt?: () => boolean; ssr?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface Result { client: ApolloClient; error?: ErrorLike_2; fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; loading: boolean; networkStatus: NetworkStatus_2; observable: ObservableQuery_2; previousData?: MaybeMasked; refetch: (variables?: Partial) => Promise>>; startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn_2) => void; variables: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface Options extends Base.Options { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface Result extends Base.Result, DocumentationTypes.DataState { } } // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export type Result["dataState"] = DataState_2["dataState"]> = Base.Result & GetDataState_2, TStates>; } // @public (undocumented) export namespace useQuery { var // (undocumented) ssrDisabledResult: ApolloQueryResult_2; } // @public (undocumented) function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery_2.Options, NoInfer_2> & { returnPartialData: true; }): useQuery_2.Result; // @public (undocumented) function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery_2.Options, NoInfer_2> & { returnPartialData: boolean; }): useQuery_2.Result; // @public (undocumented) function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useQuery_2.Options, NoInfer_2> ] : [options: useQuery_2.Options, NoInfer_2>]): useQuery_2.Result; // @public (undocumented) namespace useQuery_2 { // (undocumented) namespace Base { // (undocumented) interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; fetchPolicy?: WatchQueryFetchPolicy; initialFetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); notifyOnNetworkStatusChange?: boolean; pollInterval?: number; refetchWritePolicy?: RefetchWritePolicy_2; returnPartialData?: boolean; skip?: boolean; skipPollAttempt?: () => boolean; ssr?: boolean; } } // (undocumented) namespace Base { // (undocumented) interface Result { client: ApolloClient; error?: ErrorLike_2; fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; loading: boolean; networkStatus: NetworkStatus_2; observable: ObservableQuery_2; previousData?: MaybeMasked; refetch: (variables?: Partial) => Promise>>; startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: SubscribeToMoreFunction; updateQuery: (mapFn: UpdateQueryMapFn_2) => void; variables: TVariables; } } // (undocumented) namespace DocumentationTypes { // (undocumented) interface Options extends Base.Options { variables?: TVariables; } } // (undocumented) namespace DocumentationTypes { // (undocumented) interface Result extends Base.Result, DocumentationTypes.DataState { } } // Warning: (ae-forgotten-export) The symbol "useQuery_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type Options = Base.Options & VariablesOption; // (undocumented) type Result["dataState"] = DataState_2["dataState"]> = Base.Result & GetDataState_2, TStates>; } // @public (undocumented) namespace useQuery_2 { var // (undocumented) ssrDisabledResult: ApolloQueryResult_2; } // @public export function useQueryRefHandlers(queryRef: QueryRef["dataState"]>): useQueryRefHandlers.Result; // @public (undocumented) export namespace useQueryRefHandlers { // (undocumented) export interface Result { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } } // @public function useQueryRefHandlers_2(queryRef: QueryRef["dataState"]>): useQueryRefHandlers_2.Result; // @public (undocumented) namespace useQueryRefHandlers_2 { // (undocumented) interface Result { fetchMore: FetchMoreFunction; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } } // Warning: (ae-forgotten-export) The symbol "useQueryRefHandlers_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type UseQueryRefHandlersResult = useQueryRefHandlers_2.Result; // @public export function useReactiveVar(rv: ReactiveVar): T; // @public (undocumented) export function useReadQuery["dataState"]>(queryRef: QueryRef): useReadQuery.Result; // @public (undocumented) export namespace useReadQuery { // (undocumented) export type Result["dataState"] = DataState_2["dataState"]> = { error: ErrorLike_2 | undefined; networkStatus: NetworkStatus_2; } & GetDataState_2, TStates>; } // @public (undocumented) function useReadQuery_2["dataState"]>(queryRef: QueryRef): useReadQuery_2.Result; // @public (undocumented) namespace useReadQuery_2 { // (undocumented) type Result["dataState"] = DataState_2["dataState"]> = { error: ErrorLike_2 | undefined; networkStatus: NetworkStatus_2; } & GetDataState_2, TStates>; } // Warning: (ae-forgotten-export) The symbol "useReadQuery_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type UseReadQueryResult = useReadQuery_2.Result; // @public export function useSubscription(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ options?: useSubscription.Options, NoInfer_2> ] : [options: useSubscription.Options, NoInfer_2>]): useSubscription.Result; // @public (undocumented) export namespace useSubscription { // (undocumented) export namespace Base { // (undocumented) export interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; extensions?: Record; fetchPolicy?: FetchPolicy_2; ignoreResults?: boolean; onComplete?: () => void; onData?: (options: OnDataOptions) => any; onError?: (error: ErrorLike_2) => void; shouldResubscribe?: boolean | ((options: Options) => boolean); skip?: boolean; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface Result extends Base.Options { variables?: TVariables; } } // (undocumented) export interface OnDataOptions { // (undocumented) client: ApolloClient; // (undocumented) data: OnDataResult; } // (undocumented) export type OnDataResult = Omit, "restart">; // (undocumented) export interface OnSubscriptionDataOptions { // (undocumented) client: ApolloClient; // (undocumented) subscriptionData: OnDataResult; } // (undocumented) export type Options = Base.Options & VariablesOption; // (undocumented) export interface Result { data?: MaybeMasked; error?: ErrorLike_2; loading: boolean; // (undocumented) restart: () => void; } } // @public function useSubscription_2(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ options?: useSubscription_2.Options, NoInfer_2> ] : [options: useSubscription_2.Options, NoInfer_2>]): useSubscription_2.Result; // @public (undocumented) namespace useSubscription_2 { // (undocumented) namespace Base { // (undocumented) interface Options { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; extensions?: Record; fetchPolicy?: FetchPolicy_2; ignoreResults?: boolean; onComplete?: () => void; // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts onData?: (options: OnDataOptions) => any; onError?: (error: ErrorLike_2) => void; shouldResubscribe?: boolean | ((options: Options) => boolean); skip?: boolean; } } // (undocumented) namespace DocumentationTypes { // (undocumented) interface Result extends Base.Options { variables?: TVariables; } } // (undocumented) interface OnDataOptions { // (undocumented) client: ApolloClient; // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) data: OnDataResult; } // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type OnDataResult = Omit, "restart">; // (undocumented) interface OnSubscriptionDataOptions { // (undocumented) client: ApolloClient; // (undocumented) subscriptionData: OnDataResult; } // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts // // (undocumented) type Options = Base.Options & VariablesOption; // (undocumented) interface Result { data?: MaybeMasked; error?: ErrorLike_2; loading: boolean; // (undocumented) restart: () => void; } } // @public (undocumented) export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: NonNullable>; }): useSuspenseFragment.Result; // @public (undocumented) export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: null; }): useSuspenseFragment.Result; // @public (undocumented) export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: From; }): useSuspenseFragment.Result; // @public (undocumented) export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; // @public (undocumented) export namespace useSuspenseFragment { // (undocumented) export type Options = { fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; from: From; optimistic?: boolean; client?: ApolloClient; } & VariablesOption>; // (undocumented) export type Result = { data: MaybeMasked; }; } // @public (undocumented) function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { from: NonNullable>; }): useSuspenseFragment_2.Result; // @public (undocumented) function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { from: null; }): useSuspenseFragment_2.Result; // @public (undocumented) function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { from: From_2; }): useSuspenseFragment_2.Result; // @public (undocumented) function useSuspenseFragment_2(options: useSuspenseFragment_2.Options): useSuspenseFragment_2.Result; // @public (undocumented) namespace useSuspenseFragment_2 { // (undocumented) type Options = { fragment: DocumentNode_2 | TypedDocumentNode_2; fragmentName?: string; from: From_2; optimistic?: boolean; client?: ApolloClient; } & VariablesOption>; // (undocumented) type Result = { data: MaybeMasked; }; } // Warning: (ae-forgotten-export) The symbol "useSuspenseFragment_2" needs to be exported by the entry point index.compiled.d.ts // // @public @deprecated (undocumented) export type UseSuspenseFragmentOptions = useSuspenseFragment_2.Options; // @public @deprecated (undocumented) export type UseSuspenseFragmentResult = useSuspenseFragment_2.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { errorPolicy: "ignore" | "all"; }): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; returnPartialData: true; }): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; }): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; }): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useSuspenseQuery.Options> & { returnPartialData: true; })): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useSuspenseQuery.Options> ] : [options: useSuspenseQuery.Options>]): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken | useSuspenseQuery.Options> ] : [options: SkipToken | useSuspenseQuery.Options>]): useSuspenseQuery.Result; // @public (undocumented) export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useSuspenseQuery.Options>): useSuspenseQuery.Result; // @public (undocumented) export namespace useSuspenseQuery { // (undocumented) export type FetchPolicy = Extract; // (undocumented) export type Options = { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; returnPartialData?: boolean; refetchWritePolicy?: RefetchWritePolicy_2; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; skip?: boolean; } & VariablesOption; // (undocumented) export type Result["dataState"] = DataState_2["dataState"]> = { client: ApolloClient; error: ErrorLike_2 | undefined; fetchMore: FetchMoreFunction; networkStatus: NetworkStatus_2; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } & GetDataState_2, TStates>; } // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { returnPartialData: true; errorPolicy: "ignore" | "all"; }): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { errorPolicy: "ignore" | "all"; }): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { skip: boolean; returnPartialData: true; }): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { returnPartialData: true; }): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { skip: boolean; }): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useSuspenseQuery_2.Options> & { returnPartialData: true; })): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: useSuspenseQuery_2.Options> ] : [options: useSuspenseQuery_2.Options>]): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ options?: SkipToken_2 | useSuspenseQuery_2.Options> ] : [options: SkipToken_2 | useSuspenseQuery_2.Options>]): useSuspenseQuery_2.Result; // @public (undocumented) function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | useSuspenseQuery_2.Options>): useSuspenseQuery_2.Result; // @public (undocumented) namespace useSuspenseQuery_2 { // (undocumented) type FetchPolicy = Extract; // (undocumented) type Options = { client?: ApolloClient; context?: DefaultContext_2; errorPolicy?: ErrorPolicy_2; returnPartialData?: boolean; refetchWritePolicy?: RefetchWritePolicy_2; fetchPolicy?: FetchPolicy; queryKey?: string | number | any[]; skip?: boolean; } & VariablesOption; // (undocumented) type Result["dataState"] = DataState_2["dataState"]> = { client: ApolloClient; error: ErrorLike_2 | undefined; fetchMore: FetchMoreFunction; networkStatus: NetworkStatus_2; refetch: RefetchFunction; subscribeToMore: SubscribeToMoreFunction; } & GetDataState_2, TStates>; } // @public @deprecated (undocumented) export type UseSuspenseQueryResult = useSuspenseQuery_2.Result; // @public (undocumented) type WatchQueryFetchPolicy_2 = FetchPolicy | "cache-and-network" | "standby"; // @public type WatchQueryOptions_2 = { fetchPolicy?: WatchQueryFetchPolicy_2; nextFetchPolicy?: WatchQueryFetchPolicy_2 | ((this: WatchQueryOptions_2, currentFetchPolicy: WatchQueryFetchPolicy_2, context: NextFetchPolicyContext) => WatchQueryFetchPolicy_2); initialFetchPolicy?: WatchQueryFetchPolicy_2; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode | TypedDocumentNode; } & VariablesOption>; // Warnings were encountered during analysis: // // src/core/ObservableQuery.ts:65:3 - (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.compiled.d.ts // src/core/ObservableQuery.ts:145:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.compiled.d.ts // src/core/ObservableQuery.ts:157:5 - (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.compiled.d.ts // src/core/ObservableQuery.ts:305:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.compiled.d.ts // src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.compiled.d.ts // src/core/types.ts:309:3 - (ae-forgotten-export) The symbol "ErrorLike" needs to be exported by the entry point index.compiled.d.ts // src/core/types.ts:313:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.compiled.d.ts // src/core/types.ts:321:7 - (ae-forgotten-export) The symbol "DataValue" needs to be exported by the entry point index.compiled.d.ts // src/core/types.ts:371:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:178:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:261:3 - (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:264:3 - (ae-forgotten-export) The symbol "NormalizedExecutionResult" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:274:3 - (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.compiled.d.ts // src/core/watchQueryOptions.ts:286:3 - (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useBackgroundQuery.ts:64:5 - (ae-forgotten-export) The symbol "useBackgroundQuery_2" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useLoadableQuery.ts:70:7 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useLoadableQuery.ts:70:7 - (ae-forgotten-export) The symbol "ResetFunction_2" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useSuspenseFragment.ts:75:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useSuspenseFragment.ts:75:5 - (ae-forgotten-export) The symbol "From_2" needs to be exported by the entry point index.compiled.d.ts // src/react/hooks/useSuspenseQuery.ts:66:5 - (ae-forgotten-export) The symbol "useSuspenseQuery_2" needs to be exported by the entry point index.compiled.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-react_internal.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloClient } from '@apollo/client'; import type { DataState } from '@apollo/client'; import type { DecoratedPromise } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; import type { InternalTypes } from '@apollo/client/react'; import type { MaybeMasked } from '@apollo/client/masking'; import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client'; import type { ObservableQuery } from '@apollo/client'; import type { OperationVariables } from '@apollo/client'; import type { ResultOf } from '@graphql-typed-document-node/core'; import type { VariablesOf } from '@graphql-typed-document-node/core'; // Warning: (ae-forgotten-export) The symbol "WrappedQueryRef" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function assertWrappedQueryRef["dataState"]>(queryRef: QueryRef): asserts queryRef is WrappedQueryRef; // @public (undocumented) export function assertWrappedQueryRef["dataState"]>(queryRef: QueryRef | undefined | null): asserts queryRef is WrappedQueryRef | undefined | null; // @public (undocumented) export type CacheKey = [ query: DocumentNode, stringifiedVariables: string, ...queryKey: any[] ]; // @public (undocumented) export type FetchMoreFunction = (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; // @public (undocumented) type FragmentCacheKey = [ fragment: DocumentNode, stringifiedVariables: string, cacheId: string | null ]; // @public (undocumented) export interface FragmentKey { // (undocumented) __fragmentKey?: string; } // @public (undocumented) class FragmentReference { // Warning: (ae-forgotten-export) The symbol "FragmentReferenceOptions" needs to be exported by the entry point index.d.ts constructor(client: ApolloClient, watchFragmentOptions: ApolloClient.WatchFragmentOptions & { from: string | null | Array; }, options: FragmentReferenceOptions); // (undocumented) readonly key: FragmentKey; // Warning: (ae-forgotten-export) The symbol "Listener_2" needs to be exported by the entry point index.d.ts // // (undocumented) listen(listener: Listener_2>): () => void; // (undocumented) readonly observable: ApolloClient.ObservableFragment; // Warning: (ae-forgotten-export) The symbol "FragmentRefPromise" needs to be exported by the entry point index.d.ts // // (undocumented) promise: FragmentRefPromise>; // (undocumented) retain(): () => void; } // @public (undocumented) interface FragmentReferenceOptions { // (undocumented) autoDisposeTimeoutMs?: number; // (undocumented) onDispose?: () => void; } // @public (undocumented) type FragmentRefPromise = DecoratedPromise; // Warning: (ae-forgotten-export) The symbol "SuspenseCache" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function getSuspenseCache(client: ApolloClient & { [suspenseCacheSymbol]?: SuspenseCache; }): SuspenseCache; // Warning: (ae-forgotten-export) The symbol "QueryRefPromise" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function getWrappedPromise["dataState"]>(queryRef: WrappedQueryRef): QueryRefPromise; // @public (undocumented) export type HookWrappers = InternalTypes.HookWrappers; // @public (undocumented) export class InternalQueryReference["dataState"] = DataState["dataState"]> { // Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts constructor(observable: ObservableQuery, options: InternalQueryReferenceOptions); // (undocumented) applyOptions(watchQueryOptions: ObservedOptions): QueryRefPromise; // Warning: (ae-forgotten-export) The symbol "ObservedOptions" needs to be exported by the entry point index.d.ts // // (undocumented) didChangeOptions(watchQueryOptions: ObservedOptions): boolean; // (undocumented) get disposed(): boolean; // (undocumented) fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; // (undocumented) readonly key: QueryKey; // Warning: (ae-forgotten-export) The symbol "Listener" needs to be exported by the entry point index.d.ts // // (undocumented) listen(listener: Listener): () => void; // (undocumented) readonly observable: ObservableQuery; // (undocumented) promise: QueryRefPromise; // (undocumented) refetch(variables: OperationVariables | undefined): Promise>; // (undocumented) reinitialize(): void; // (undocumented) result: ObservableQuery.Result, TStates>; // (undocumented) retain(): () => void; // (undocumented) softRetain(): () => void; // (undocumented) get watchQueryOptions(): ObservableQuery.Options; } // @public (undocumented) interface InternalQueryReferenceOptions { // (undocumented) autoDisposeTimeoutMs?: number; // (undocumented) onDispose?: () => void; } // @public (undocumented) type Listener["dataState"]> = (promise: QueryRefPromise) => void; // @public (undocumented) type Listener_2 = (promise: FragmentRefPromise) => void; // @public (undocumented) const OBSERVED_CHANGED_OPTIONS: readonly ["context", "errorPolicy", "fetchPolicy", "refetchWritePolicy", "returnPartialData"]; // Warning: (ae-forgotten-export) The symbol "OBSERVED_CHANGED_OPTIONS" needs to be exported by the entry point index.d.ts // // @public (undocumented) type ObservedOptions = Pick; // @public (undocumented) const PRELOADED_QUERY_REF_BRAND: unique symbol; // @public export interface PreloadedQueryRef["dataState"] = "complete" | "streaming"> extends QueryRef { // @internal @deprecated (undocumented) [PRELOADED_QUERY_REF_BRAND]: typeof PRELOADED_QUERY_REF_BRAND; } // @public (undocumented) const PROMISE_SYMBOL: unique symbol; // @public (undocumented) const QUERY_REF_BRAND: unique symbol; // @public (undocumented) const QUERY_REFERENCE_SYMBOL: unique symbol; // @public (undocumented) export interface QueryKey { // (undocumented) __queryKey?: string; } // @public export interface QueryRef["dataState"] = "complete" | "streaming"> { // @internal @deprecated (undocumented) [QUERY_REF_BRAND]?(variables: TVariables): { data: TData; states: TStates; }; } // @public (undocumented) export namespace QueryRef { // (undocumented) export type ForQuery, TStates extends DataState>["dataState"] = "complete" | "streaming"> = QueryRef, VariablesOf, TStates>; } // @public (undocumented) type QueryRefPromise["dataState"]> = DecoratedPromise, TStates>>; // @public (undocumented) export type RefetchFunction = (variables?: Partial) => Promise>; // @public (undocumented) class SuspenseCache { constructor(options?: SuspenseCacheOptions); // (undocumented) add(cacheKey: CacheKey, queryRef: InternalQueryReference): void; // Warning: (ae-forgotten-export) The symbol "FragmentCacheKey" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FragmentReference" needs to be exported by the entry point index.d.ts // // (undocumented) getFragmentRef(cacheKey: FragmentCacheKey, client: ApolloClient, options: ApolloClient.WatchFragmentOptions & { from: string | null | Array; }): FragmentReference; // (undocumented) getQueryRef["dataState"] = DataState["dataState"]>(cacheKey: CacheKey, createObservable: () => ObservableQuery): InternalQueryReference; } // @public (undocumented) export interface SuspenseCacheOptions { autoDisposeTimeoutMs?: number; } // @public (undocumented) const suspenseCacheSymbol: unique symbol; // @public (undocumented) export function unwrapQueryRef["dataState"]>(queryRef: WrappedQueryRef): InternalQueryReference; // @public (undocumented) export function unwrapQueryRef["dataState"]>(queryRef: Partial>): undefined | InternalQueryReference; // @public (undocumented) export function updateWrappedQueryRef["dataState"]>(queryRef: WrappedQueryRef, promise: QueryRefPromise): void; // @internal @deprecated interface WrappedQueryRef["dataState"] = "complete" | "streaming"> extends QueryRef { // @deprecated (undocumented) [PROMISE_SYMBOL]: QueryRefPromise; // @deprecated (undocumented) readonly [QUERY_REFERENCE_SYMBOL]: InternalQueryReference; } // @public (undocumented) export const wrapperSymbol: unique symbol; // @public (undocumented) export function wrapQueryRef["dataState"]>(internalQueryRef: InternalQueryReference): WrappedQueryRef; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-react_internal_compiler-runtime.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public export const c: any; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-react_ssr.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloClient } from '@apollo/client'; import type * as ReactTypes from 'react'; // @public @deprecated (undocumented) export function getDataFromTree(tree: ReactTypes.ReactNode, context?: { [key: string]: any; }): Promise; // Warning: (ae-forgotten-export) The symbol "GetMarkupFromTreeOptions" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) export function getMarkupFromTree({ tree, context, renderFunction, }: GetMarkupFromTreeOptions): Promise; // @public (undocumented) type GetMarkupFromTreeOptions = { tree: ReactTypes.ReactNode; context?: { [key: string]: any; }; renderFunction?: prerenderStatic.RenderToString | prerenderStatic.RenderToStringPromise; }; // @public export function prerenderStatic({ tree, context, renderFunction, signal, ignoreResults, diagnostics, maxRerenders, }: prerenderStatic.Options): Promise>; // @public (undocumented) export namespace prerenderStatic { // (undocumented) export interface Diagnostics { renderCount: number; } // (undocumented) export interface Options { context?: { client?: ApolloClient; }; diagnostics?: boolean; ignoreResults?: boolean; maxRerenders?: number; renderFunction: Prerender; signal?: AbortSignal; tree: ReactTypes.ReactNode; } export type PrerenderFunction = RenderToString | RenderToStringPromise | PrerenderToWebStream | PrerenderToNodeStream | ((reactNode: ReactTypes.ReactNode) => ReturnType | ReturnType | ReturnType | ReturnType); // (undocumented) export type PrerenderToNodeStream = (reactNode: ReactTypes.ReactNode) => Promise<{ prelude: AsyncIterable; }>; // (undocumented) export type PrerenderToWebStream = (reactNode: ReactTypes.ReactNode) => Promise<{ prelude: ReadableStream; }>; // (undocumented) export type RenderToString = (element: ReactTypes.ReactNode) => string; // (undocumented) export type RenderToStringPromise = (element: ReactTypes.ReactNode) => PromiseLike; // (undocumented) export interface Result { aborted: boolean; diagnostics?: Diagnostics; renderFnResult: ReturnType extends PromiseLike ? U : ReturnType; result: string; } } // @public @deprecated (undocumented) export function renderToStringWithData(component: ReactTypes.ReactElement): Promise; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-testing.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; import { FormattedExecutionResult } from 'graphql'; import { Observable } from 'rxjs'; import type { OperationVariables } from '@apollo/client'; import type { Unmasked } from '@apollo/client/masking'; // @internal @deprecated (undocumented) type CovariantUnaryFunction = { fn(arg: Arg): Ret; }["fn"]; // @public @deprecated (undocumented) export type MockedRequest> = MockLink.MockedRequest; // @public @deprecated (undocumented) export type MockedResponse, TVariables extends OperationVariables = Record> = MockLink.MockedResponse; // @public (undocumented) export namespace MockLink { // (undocumented) export interface DefaultOptions { // (undocumented) delay?: MockLink.Delay; } // (undocumented) export type Delay = number | DelayFunction; // (undocumented) export type DelayFunction = (operation: ApolloLink.Operation) => number; // (undocumented) export interface MockedRequest { // (undocumented) query: DocumentNode; // Warning: (ae-forgotten-export) The symbol "VariableMatcher" needs to be exported by the entry point index.d.ts // // (undocumented) variables?: TVariables | VariableMatcher; } // (undocumented) export interface MockedResponse< /** @ts-ignore */ out TData = Record, out TVariables extends OperationVariables = Record> { // (undocumented) delay?: number | MockLink.DelayFunction; // (undocumented) error?: Error; // (undocumented) maxUsageCount?: number; // (undocumented) request: MockedRequest; // (undocumented) result?: ApolloLink.Result> | ResultFunction>, TVariables>; } // (undocumented) export interface Options { // (undocumented) defaultOptions?: DefaultOptions; // (undocumented) showWarnings?: boolean; } // Warning: (ae-forgotten-export) The symbol "CovariantUnaryFunction" needs to be exported by the entry point index.d.ts // // (undocumented) export type ResultFunction> = CovariantUnaryFunction; } // @public (undocumented) export class MockLink extends ApolloLink { constructor(mockedResponses: ReadonlyArray, Record>>, options?: MockLink.Options); // (undocumented) addMockedResponse(mockedResponse: MockLink.MockedResponse): void; // (undocumented) static defaultOptions: MockLink.DefaultOptions; // (undocumented) operation: ApolloLink.Operation; // (undocumented) request(operation: ApolloLink.Operation): Observable; // (undocumented) showWarnings: boolean; } // @public @deprecated (undocumented) export type MockLinkOptions = MockLink.Options; // @public (undocumented) export namespace MockSubscriptionLink { // (undocumented) export interface Result { // (undocumented) delay?: number; // (undocumented) error?: Error; // (undocumented) result?: ApolloLink.Result; } } // @public (undocumented) export class MockSubscriptionLink extends ApolloLink { constructor(); // (undocumented) onSetup(listener: any): void; // (undocumented) onUnsubscribe(listener: any): void; // (undocumented) operation?: ApolloLink.Operation; // (undocumented) request(operation: ApolloLink.Operation): Observable, Record>>; // (undocumented) setups: any[]; // (undocumented) simulateComplete(): void; // (undocumented) simulateResult(result: MockSubscriptionLink.Result, complete?: boolean): void; // (undocumented) unsubscribers: any[]; } // @public (undocumented) export function realisticDelay({ min, max, }?: { min?: number; max?: number; }): MockLink.DelayFunction; // @public @deprecated (undocumented) export type ResultFunction> = MockLink.ResultFunction; // @public (undocumented) type VariableMatcher> = CovariantUnaryFunction; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-testing_internal.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloClient } from '@apollo/client'; import { ApolloLink } from '@apollo/client'; import { ApolloLink as ApolloLink_2 } from '@apollo/client/link'; import type { ApolloPayloadResult } from '@apollo/client'; import type { ExecuteContext } from '@apollo/client/link'; import { FetchResult } from '@apollo/client'; import type { GraphQLFormattedError } from 'graphql-17-alpha2'; import type { GraphQLRequest } from '@apollo/client'; import { HttpLink } from '@apollo/client/link/http'; import type { InitialIncrementalExecutionResult } from 'graphql-17-alpha2'; import type { MaskedDocumentNode } from '@apollo/client/masking'; import type { MockedProviderProps } from '@apollo/client/testing/react'; import type { MockLink } from '@apollo/client/testing'; import type { Observable } from 'rxjs'; import { Observable as Observable_2 } from '@apollo/client'; import { Operation } from '@apollo/client'; import type { Queries } from '@testing-library/dom'; import type { queries } from '@testing-library/dom'; import * as React_2 from 'react'; import type * as ReactDOMClient from 'react-dom/client'; import type { RenderHookOptions } from '@testing-library/react'; import type { RenderHookResult } from '@testing-library/react'; import type { RenderOptions } from '@testing-library/react'; import type { RenderResult } from '@testing-library/react'; import type { Subscribable } from 'rxjs'; import type { SubsequentIncrementalExecutionResult } from 'graphql-17-alpha2'; import type { TypedDocumentNode } from '@apollo/client'; // @public (undocumented) export function actAsync(scope: () => T | Promise): Promise; // @public (undocumented) export function addDelayToMocks[]>(mocks: T, delay?: number, override?: boolean): { request: MockLink.MockedRequest>; maxUsageCount?: number; result?: FetchResult | MockLink.ResultFunction, Record> | undefined; error?: Error; delay: number | MockLink.DelayFunction; }[]; // @public (undocumented) type ConsoleMethod = "log" | "info" | "warn" | "error" | "debug"; // @public (undocumented) export function createClientWrapper(client: ApolloClient, Wrapper?: React_2.JSXElementConstructor<{ children: React_2.ReactNode; }>): React_2.JSXElementConstructor<{ children: React_2.ReactNode; }>; // @public (undocumented) export function createMockWrapper(renderOptions: MockedProviderProps, Wrapper?: React_2.JSXElementConstructor<{ children: React_2.ReactNode; }>): React_2.JSXElementConstructor<{ children: React_2.ReactNode; }>; // @public (undocumented) export function createOperationWithDefaultContext(context: any, operation: GraphQLRequest, executeContext?: ExecuteContext): Operation; // @public (undocumented) export function enableFakeTimers(config?: FakeTimersConfig | LegacyFakeTimersConfig): Disposable; // @public (undocumented) export function executeWithDefaultContext(link: ApolloLink_2, operation: GraphQLRequest, context?: ExecuteContext): Observable_2; // @public (undocumented) type HydrateableContainer = Parameters<(typeof ReactDOMClient)["hydrateRoot"]>[0]; // @public (undocumented) type HydrateableContainer_2 = Parameters<(typeof ReactDOMClient)["hydrateRoot"]>[0]; // @public (undocumented) interface Letter { // (undocumented) __typename: "Letter"; // (undocumented) letter: string; // (undocumented) position: number; } // @public (undocumented) export interface MaskedVariablesCaseData { // (undocumented) character: { __typename: "Character"; id: string; } & { " $fragmentRefs"?: { MaskedVariablesCaseFragment: MaskedVariablesCaseFragment; }; }; } // @public (undocumented) type MaskedVariablesCaseFragment = { __typename: "Character"; name: string; } & { " $fragmentName"?: "MaskedVariablesCaseFragment"; }; // @public (undocumented) export function mockDeferStream, TExtensions = Record>(): { httpLink: HttpLink; enqueueInitialChunk(chunk: InitialIncrementalExecutionResult): void; enqueueSubsequentChunk(chunk: SubsequentIncrementalExecutionResult): void; enqueueErrorChunk(errors: GraphQLFormattedError[]): void; }; // @public (undocumented) export function mockMultipartSubscriptionStream, TExtensions = Record>(): { httpLink: HttpLink; enqueueHeartbeat: () => void; enqueuePayloadResult(payload: ApolloPayloadResult["payload"], hasNext?: boolean): void; enqueueProtocolErrors(errors: ApolloPayloadResult["errors"]): void; }; // @public (undocumented) type ObservableEvent = { type: "next"; value: T; } | { type: "error"; error: any; } | { type: "complete"; }; // @public (undocumented) export class ObservableStream { // (undocumented) [Symbol.dispose](): void; constructor(observable: Observable | Subscribable); // (undocumented) getCurrent(): T | undefined; // Warning: (ae-forgotten-export) The symbol "TakeOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableEvent" needs to be exported by the entry point index.d.ts // // (undocumented) peek({ timeout }?: TakeOptions): Promise>; // (undocumented) take({ timeout }?: TakeOptions): Promise<{ type: "error"; error: any; } | { type: "complete"; } | { type: "next"; value: T; }>; // (undocumented) takeComplete(options?: TakeOptions): Promise; // (undocumented) takeError(options?: TakeOptions): Promise; // (undocumented) takeNext(options?: TakeOptions): Promise; // (undocumented) unsubscribe(): void; } // @public (undocumented) export interface PaginatedCaseData { // Warning: (ae-forgotten-export) The symbol "Letter" needs to be exported by the entry point index.d.ts // // (undocumented) letters: Letter[]; } // @public (undocumented) export interface PaginatedCaseVariables { // (undocumented) limit?: number; // (undocumented) offset?: number; } // Warning: (ae-forgotten-export) The symbol "RendererableContainer" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "HydrateableContainer" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function renderAsync(ui: React.ReactNode, options: RenderOptions): Promise>; // @public (undocumented) export function renderAsync(ui: React.ReactNode, options?: Omit | undefined): Promise; // @public (undocumented) type RendererableContainer = ReactDOMClient.Container; // @public (undocumented) type RendererableContainer_2 = ReactDOMClient.Container; // Warning: (ae-forgotten-export) The symbol "RendererableContainer_2" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "HydrateableContainer_2" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function renderHookAsync(renderCallback: (initialProps: Props) => Result, options?: RenderHookOptions | undefined): Promise>; // @public export function resetApolloContext(): void; // @public (undocumented) export function setupMaskedVariablesCase(): { mocks: MockLink.MockedResponse>[]; query: MaskedDocumentNode; unmaskedQuery: TypedDocumentNode; }; // @public (undocumented) export function setupPaginatedCase(): { query: TypedDocumentNode; link: ApolloLink; data: { __typename: string; letter: string; position: number; }[]; }; // @public (undocumented) export function setupSimpleCase(): { query: TypedDocumentNode>; mocks: MockLink.MockedResponse>[]; }; // @public (undocumented) export function setupVariablesCase(): { mocks: MockLink.MockedResponse[]; query: TypedDocumentNode; }; // @public (undocumented) export interface SimpleCaseData { // (undocumented) greeting: string; } // Warning: (ae-forgotten-export) The symbol "ConsoleMethod" needs to be exported by the entry point index.d.ts // // @public (undocumented) type Spies = Record>; // Warning: (ae-forgotten-export) The symbol "Spies" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function spyOnConsole(...spyOn: Keys): Spies & Disposable; // @public (undocumented) export namespace spyOnConsole { var // (undocumented) takeSnapshots: (...spyOn: Keys) => Spies & Disposable; } // @public (undocumented) interface TakeOptions { // (undocumented) timeout?: number; } // @public (undocumented) export interface VariablesCaseData { // (undocumented) character: { __typename: "Character"; id: string; name: string; }; } // @public (undocumented) export interface VariablesCaseVariables { // (undocumented) id: string; } // @public (undocumented) export function wait(ms: number): Promise; // @internal @deprecated (undocumented) export function withCleanup(item: T, cleanup: (item: T) => void): T & Disposable; // @public (undocumented) export function withProdMode(): { prevDEV: boolean; } & Disposable; // Warnings were encountered during analysis: // // src/testing/internal/scenarios/index.ts:81:7 - (ae-forgotten-export) The symbol "MaskedVariablesCaseFragment" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-testing_react.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache } from '@apollo/client/cache'; import { ApolloClient } from '@apollo/client'; import type { ApolloLink } from '@apollo/client/link'; import type { LocalState } from '@apollo/client/local-state'; import { MockLink } from '@apollo/client/testing'; import * as React_2 from 'react'; // Warning: (ae-forgotten-export) The symbol "MockedProviderState" needs to be exported by the entry point index.d.ts // // @public (undocumented) export class MockedProvider extends React_2.Component { constructor(props: MockedProviderProps); // (undocumented) componentWillUnmount(): void; // (undocumented) render(): React_2.JSX.Element | null; } // @public (undocumented) export interface MockedProviderProps { // (undocumented) cache?: ApolloCache; // (undocumented) childProps?: object; // (undocumented) children?: any; // (undocumented) defaultOptions?: ApolloClient.DefaultOptions; devtools?: ApolloClient.Options["devtools"]; // (undocumented) link?: ApolloLink; // (undocumented) localState?: LocalState; // (undocumented) mockLinkDefaultOptions?: MockLink.DefaultOptions; // (undocumented) mocks?: ReadonlyArray>; // (undocumented) showWarnings?: boolean; } // @public (undocumented) interface MockedProviderState { // (undocumented) client: ApolloClient; } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ASTNode } from 'graphql'; import { canonicalStringify } from '@apollo/client/utilities/internal'; import { DeepOmit } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import type { FieldNode } from 'graphql'; import type { FieldPolicy } from '@apollo/client/cache'; import type { FormattedExecutionResult } from 'graphql'; import { getMainDefinition } from '@apollo/client/utilities/internal'; import type { NetworkStatus } from '@apollo/client'; import { Observable } from 'rxjs'; import type { Primitive } from '@apollo/client/utilities/internal'; import type { Reference as Reference_2 } from '@apollo/client/cache'; // @public export const addTypenameToDocument: ((doc: TNode) => TNode) & { added(field: FieldNode): boolean; }; // @public export type AsStoreObject = { [K in keyof T]: T[K]; }; // @public export interface CacheSizes { "cache.fragmentQueryDocuments": number; "documentTransform.cache": number; "fragmentRegistry.findFragmentSpreads": number; "fragmentRegistry.lookup": number; "fragmentRegistry.transform": number; "inMemoryCache.executeSelectionSet": number; "inMemoryCache.executeSubSelectedArray": number; "inMemoryCache.maybeBroadcastWatch": number; "PersistedQueryLink.persistedQueryHashes": number; "queryManager.getDocumentInfo": number; "removeTypenameFromVariables.getVariableDefinitions": number; canonicalStringify: number; checkDocument: number; print: number; } // @public export const cacheSizes: Partial; export { canonicalStringify } // Warning: (ae-forgotten-export) The symbol "KeyArgs" needs to be exported by the entry point index.d.ts // // @public export function concatPagination(keyArgs?: KeyArgs): FieldPolicy; // Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // // @public export type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // @public (undocumented) type DeepPartialMap = {} & Map, DeepPartial>; // @public (undocumented) type DeepPartialObject = { [K in keyof T]?: DeepPartial; }; // @public (undocumented) type DeepPartialPrimitive = Primitive | Date | RegExp; // @public (undocumented) type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; // @public (undocumented) type DeepPartialReadonlySet = {} & ReadonlySet>; // @public (undocumented) type DeepPartialSet = {} & Set>; // @public export class DocumentTransform { // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts constructor(transform: TransformFn, options?: DocumentTransformOptions); concat(otherTransform: DocumentTransform): DocumentTransform; static identity(): DocumentTransform; // @internal @deprecated readonly left?: DocumentTransform; resetCache(): void; // @internal @deprecated readonly right?: DocumentTransform; static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { left: DocumentTransform; right: DocumentTransform; }; transformDocument(document: DocumentNode): DocumentNode; } // @public (undocumented) export type DocumentTransformCacheKey = ReadonlyArray; // @public (undocumented) interface DocumentTransformOptions { cache?: boolean; getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } export { getMainDefinition } // @beta export interface HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) arg3: unknown; // (undocumented) arg4: unknown; // (undocumented) return: unknown; } // @public export function isFormattedExecutionResult(result?: object): result is FormattedExecutionResult; // @public export function isMutationOperation(document: DocumentNode_2): boolean; // @public export function isNetworkRequestInFlight(networkStatus?: NetworkStatus): boolean; // @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public export function isQueryOperation(document: DocumentNode_2): boolean; // @public export function isReference(obj: any): obj is Reference; // @public export function isSubscriptionOperation(document: DocumentNode_2): boolean; // @public (undocumented) type KeyArgs = FieldPolicy["keyArgs"]; export { Observable } // @public export function offsetLimitPagination(keyArgs?: KeyArgs): FieldPolicy; // @public const print_2: ((ast: ASTNode) => string) & { reset(): void; }; export { print_2 as print } // @public export interface Reference { // (undocumented) readonly __ref: string; } // Warning: (ae-forgotten-export) The symbol "TExistingRelay" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "TIncomingRelay" needs to be exported by the entry point index.d.ts // // @public (undocumented) type RelayFieldPolicy = FieldPolicy | null, TIncomingRelay | null, TIncomingRelay | null>; // Warning: (ae-forgotten-export) The symbol "RelayFieldPolicy" needs to be exported by the entry point index.d.ts // // @public export function relayStylePagination(keyArgs?: KeyArgs): RelayFieldPolicy; // @public export interface StoreObject { // (undocumented) [storeFieldName: string]: StoreValue; // (undocumented) __typename?: string; } // @public export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; // @public export function stripTypename(value: T): DeepOmit; // @public (undocumented) type TExistingRelay = Readonly<{ edges: TRelayEdge[]; pageInfo: TRelayPageInfo; }>; // @public (undocumented) type TIncomingRelay = { edges?: TRelayEdge[]; pageInfo?: TRelayPageInfo; }; // @public (undocumented) type TransformFn = (document: DocumentNode) => DocumentNode; // @public (undocumented) type TRelayEdge = { cursor?: string; node: TNode; } | (Reference_2 & { cursor?: string; }); // @public (undocumented) type TRelayPageInfo = { hasPreviousPage: boolean; hasNextPage: boolean; startCursor: string; endCursor: string; }; // Warnings were encountered during analysis: // // src/utilities/policies/pagination.ts:86:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:87:3 - (ae-forgotten-export) The symbol "TRelayPageInfo" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_environment.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public (undocumented) export const __DEV__: boolean; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_internal.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ApolloCache } from '@apollo/client'; import type { ApolloClient } from '@apollo/client'; import type { ASTNode } from 'graphql'; import type { DataValue } from '@apollo/client'; import type { DirectiveNode } from 'graphql'; import type { DocumentNode } from 'graphql'; import type { ErrorLike } from '@apollo/client'; import type { FieldNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; import type { HKT } from '@apollo/client/utilities'; import type { Incremental } from '@apollo/client/incremental'; import type { InlineFragmentNode } from 'graphql'; import type { MaybeMasked } from '@apollo/client'; import type { NetworkStatus } from '@apollo/client'; import { Observable } from 'rxjs'; import type { ObservableQuery } from '@apollo/client'; import type { Observer } from 'rxjs'; import type { OperationDefinitionNode } from 'graphql'; import type { OperationTypeNode } from 'graphql'; import type { OperationVariables } from '@apollo/client'; import type { OperatorFunction } from 'rxjs'; import type { Reference } from '@apollo/client/utilities'; import type { SelectionNode } from 'graphql'; import type { SelectionSetNode } from 'graphql'; import { StrongCache } from '@wry/caches'; import type { Subscription } from 'rxjs'; import type { Trie } from '@wry/trie'; import { WeakCache } from '@wry/caches'; // @internal @deprecated (undocumented) export type ApplyHKT = (fn & { arg1: arg1; arg2: arg2; arg3: arg3; arg4: arg4; })["return"]; // @internal @deprecated (undocumented) export type ApplyHKTImplementationWithDefault, arg1, arg2 = never, arg3 = never, arg4 = never> = ApplyHKT; // @internal @deprecated (undocumented) export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; // @internal @deprecated export const AutoCleanedStrongCache: typeof StrongCache; // @internal @deprecated (undocumented) export type AutoCleanedStrongCache = StrongCache; // @internal @deprecated export const AutoCleanedWeakCache: typeof WeakCache; // @internal @deprecated (undocumented) export type AutoCleanedWeakCache = WeakCache; // @public export function bindCacheKey(...prebound: object[]): (...args: any) => object; // @public export const canonicalStringify: ((value: any) => string) & { reset(): void; }; // @internal @deprecated (undocumented) export const canUseDOM: boolean; // @internal @deprecated export const checkDocument: (doc: DocumentNode, expectedType?: OperationTypeNode) => void; // @internal @deprecated export function cloneDeep(value: T): T; // @public export function combineLatestBatched(observables: Array & { dirty?: boolean; }>): Observable; // Warning: (ae-forgotten-export) The symbol "TupleToIntersection" needs to be exported by the entry point index.d.ts // // @internal @deprecated export function compact(...objects: TArgs): TupleToIntersection; // @internal @deprecated export function createFragmentMap(fragments?: FragmentDefinitionNode[]): FragmentMap; // @internal @deprecated (undocumented) export function createFulfilledPromise(value: TValue): FulfilledPromise; // @internal @deprecated (undocumented) export function createRejectedPromise(reason: unknown): RejectedPromise; // @public (undocumented) export function dealias(fieldValue: Record | null | undefined, selectionSet: SelectionSetNode): { [x: string]: any; } | null | undefined; // @internal @deprecated (undocumented) export type DecoratedPromise = PendingPromise | FulfilledPromise | RejectedPromise; // @internal @deprecated (undocumented) export function decoratePromise(promise: Promise): DecoratedPromise; // @internal @deprecated (undocumented) export namespace DeepMerger { // (undocumented) export type ArrayMergeStrategy = "truncate" | "combine"; // (undocumented) export interface MergeOptions { // (undocumented) atPath?: ReadonlyArray; } // (undocumented) export interface Options { // (undocumented) arrayMerge?: DeepMerger.ArrayMergeStrategy; // Warning: (ae-forgotten-export) The symbol "ReconcilerFunction" needs to be exported by the entry point index.d.ts // // (undocumented) reconciler?: ReconcilerFunction; } } // @internal @deprecated (undocumented) export class DeepMerger { constructor(options?: DeepMerger.Options); // (undocumented) isObject: typeof isNonNullObject; // (undocumented) merge(target: any, source: any, mergeOptions?: DeepMerger.MergeOptions): any; // (undocumented) shallowCopyForMerge(value: T): T; } // Warning: (ae-forgotten-export) The symbol "DeepOmitPrimitive" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepOmitArray" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) export type DeepOmit = T extends DeepOmitPrimitive ? T : { [P in keyof T as P extends K ? never : P]: T[P] extends infer TP ? TP extends DeepOmitPrimitive ? TP : TP extends any[] ? DeepOmitArray : DeepOmit : never; }; // Warning: (ae-incompatible-release-tags) The symbol "DeepOmitArray" is marked as @public, but its signature references "DeepOmit" which is marked as @internal // // @public (undocumented) type DeepOmitArray = { [P in keyof T]: DeepOmit; }; // Warning: (ae-incompatible-release-tags) The symbol "DeepOmitPrimitive" is marked as @public, but its signature references "Primitive" which is marked as @internal // // @public (undocumented) type DeepOmitPrimitive = Primitive | Function; // @public (undocumented) type Directives = { [directiveName: string]: { [argName: string]: any; }; }; // @public export namespace DocumentationTypes { // (undocumented) export interface ApolloQueryResult extends DataState { error?: ErrorLike; loading: boolean; networkStatus: NetworkStatus; // @deprecated partial: boolean; } // (undocumented) export interface DataState { data?: DataValue.Complete | DataValue.Streaming | DataValue.Partial | undefined; dataState: "complete" | "streaming" | "partial" | "empty"; } // (undocumented) export interface RxjsObservable { // (undocumented) pipe(...operators: [ OperatorFunction>, OperatorResult> ] | [ OperatorFunction>, unknown>, ...OperatorFunction[], OperatorFunction ]): Observable; // (undocumented) subscribe(observer: Partial>>> | ((value: ApolloQueryResult>) => void)): Subscription; } // (undocumented) export interface VariableOptions { variables?: TVariables; } } // @public (undocumented) export function equalByQuery(query: DocumentNode, { data: aData, ...aRest }: Partial>, { data: bData, ...bRest }: Partial>, variables?: OperationVariables): boolean; // @internal @deprecated export const extensionsSymbol: unique symbol; // @public export interface ExtensionsWithStreamInfo extends Record { // (undocumented) [streamInfoSymbol]?: { deref(): StreamInfoTrie | undefined; }; } // @public (undocumented) export function filterMap(fn: (value: T, context: undefined) => R | undefined): OperatorFunction; // @public (undocumented) export function filterMap(fn: (value: T, context: Context) => R | undefined, makeContext: () => NoInfer): OperatorFunction; // @internal @deprecated export interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; } // @internal @deprecated (undocumented) export type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; // @internal @deprecated (undocumented) export interface FulfilledPromise extends Promise { // (undocumented) status: "fulfilled"; // (undocumented) value: TValue; } // @internal @deprecated export const getApolloCacheMemoryInternals: (() => { cache: { fragmentQueryDocuments: number | undefined; }; }) | undefined; // @internal @deprecated export const getApolloClientMemoryInternals: (() => { limits: { [k: string]: number; }; sizes: { cache?: { fragmentQueryDocuments: number | undefined; } | undefined; addTypenameDocumentTransform?: { cache: number; }[] | undefined; inMemoryCache?: { executeSelectionSet: number | undefined; executeSubSelectedArray: number | undefined; maybeBroadcastWatch: number | undefined; } | undefined; fragmentRegistry?: { findFragmentSpreads: number | undefined; lookup: number | undefined; transform: number | undefined; } | undefined; print: number | undefined; canonicalStringify: number | undefined; links: unknown[]; queryManager: { getDocumentInfo: number; documentTransforms: { cache: number; }[]; }; }; }) | undefined; // @internal @deprecated (undocumented) export function getDefaultValues(definition: OperationDefinitionNode | undefined): Record; // @internal @deprecated (undocumented) export function getFragmentDefinition(doc: DocumentNode): FragmentDefinitionNode; // @internal @deprecated (undocumented) export function getFragmentDefinitions(doc: DocumentNode): FragmentDefinitionNode[]; // @internal @deprecated (undocumented) export function getFragmentFromSelection(selection: SelectionNode, fragmentMap?: FragmentMap | FragmentMapFunction): InlineFragmentNode | FragmentDefinitionNode | null; // @internal @deprecated export function getFragmentQueryDocument(document: DocumentNode, fragmentName?: string): DocumentNode; // @internal @deprecated (undocumented) export function getGraphQLErrorsFromResult(result: { errors?: ReadonlyArray; }): Array; // @internal @deprecated export const getInMemoryCacheMemoryInternals: (() => { addTypenameDocumentTransform: { cache: number; }[]; inMemoryCache: { executeSelectionSet: number | undefined; executeSubSelectedArray: number | undefined; maybeBroadcastWatch: number | undefined; }; fragmentRegistry: { findFragmentSpreads: number | undefined; lookup: number | undefined; transform: number | undefined; }; cache: { fragmentQueryDocuments: number | undefined; }; }) | undefined; // @public export function getMainDefinition(queryDoc: DocumentNode): OperationDefinitionNode | FragmentDefinitionNode; // @internal @deprecated (undocumented) export function getOperationDefinition(doc: DocumentNode): OperationDefinitionNode | undefined; // @internal @deprecated (undocumented) export function getOperationName(doc: DocumentNode, fallback?: TFallback): string | TFallback; // @internal @deprecated (undocumented) export function getQueryDefinition(doc: DocumentNode): OperationDefinitionNode; // Warning: (ae-forgotten-export) The symbol "Directives" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) export const getStoreKeyName: ((fieldName: string, args?: Record | null, directives?: Directives) => string) & { setStringify(s: typeof storeKeyNameStringify): (value: any) => string; }; // @public (undocumented) const globalCaches: { print?: () => number; canonicalStringify?: () => number; }; // @internal @deprecated (undocumented) export function graphQLResultHasError(result: FormattedExecutionResult): boolean; // @internal @deprecated (undocumented) export function hasDirectives(names: string[], root: ASTNode, all?: boolean): boolean; // @public (undocumented) export function hasForcedResolvers(document: ASTNode): boolean; // @internal @deprecated (undocumented) export type IsAny = 0 extends 1 & T ? true : false; // @internal @deprecated export const isArray: (a: any) => a is any[] | readonly any[]; // @internal @deprecated (undocumented) export function isDocumentNode(value: unknown): value is DocumentNode; // @internal @deprecated (undocumented) export function isField(selection: SelectionNode): selection is FieldNode; // @internal @deprecated (undocumented) export function isNonEmptyArray(value: ArrayLike | null | undefined): value is Array; // @internal @deprecated (undocumented) export function isNonNullObject(obj: unknown): obj is Record; // @internal @deprecated (undocumented) export function isPlainObject(obj: unknown): obj is Record; // @internal @deprecated (undocumented) export function makeReference(id: string): Reference; // @internal @deprecated export function makeUniqueId(prefix: string): string; // @public (undocumented) export const mapObservableFragmentMemoized: (observable: ApolloCache.ObservableFragment, _cacheKey: symbol, mapFn: (from: ApolloCache.WatchFragmentResult) => ApolloCache.WatchFragmentResult) => ApolloCache.ObservableFragment; // @internal @deprecated (undocumented) export function maybeDeepFreeze(obj: T): T; // @internal @deprecated (undocumented) export function mergeDeep(...sources: T): TupleToIntersection; // @internal @deprecated (undocumented) export function mergeDeepArray(sources: T[]): T; // Warning: (ae-forgotten-export) The symbol "OptionsUnion" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) export function mergeOptions>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial | undefined, options: TOptions | Partial): TOptions & TDefaultOptions; // @public @deprecated type NoInfer_2 = [T][T extends any ? 0 : never]; export { NoInfer_2 as NoInfer } // @internal @deprecated (undocumented) export function omitDeep(value: T, key: K): DeepOmit; // @public (undocumented) type OptionsUnion = ApolloClient.WatchQueryOptions | ApolloClient.QueryOptions | ApolloClient.MutateOptions; // @internal @deprecated (undocumented) export interface PendingPromise extends Promise { // (undocumented) status: "pending"; } // @internal @deprecated (undocumented) export type Prettify = { [K in keyof T]: T[K]; } & {}; // @public (undocumented) export function preventUnhandledRejection(promise: Promise): Promise; // @internal @deprecated (undocumented) export type Primitive = null | undefined | string | number | boolean | symbol | bigint; // Warning: (ae-incompatible-release-tags) The symbol "ReconcilerFunction" is marked as @public, but its signature references "DeepMerger" which is marked as @internal // // @public (undocumented) type ReconcilerFunction = (this: DeepMerger, target: Record, source: Record, property: string | number) => any; // Warning: (ae-forgotten-export) The symbol "globalCaches" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function registerGlobalCache(name: keyof typeof globalCaches, getSize: () => number): void; // @internal @deprecated (undocumented) export interface RejectedPromise extends Promise { // (undocumented) reason: unknown; // (undocumented) status: "rejected"; } // @public (undocumented) type RemoveDirectiveConfig = { name?: string; test?: (node: DirectiveNode) => boolean; remove?: boolean; }; // Warning: (ae-forgotten-export) The symbol "RemoveDirectiveConfig" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) export function removeDirectivesFromDocument(directives: RemoveDirectiveConfig[], doc: DocumentNode): DocumentNode | null; // @internal @deprecated (undocumented) export type RemoveIndexSignature = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; }; // @public (undocumented) export function removeMaskedFragmentSpreads(document: DocumentNode): DocumentNode; // @internal @deprecated (undocumented) export function resultKeyNameFromField(field: FieldNode): string; // @internal @deprecated (undocumented) export function shouldInclude({ directives }: SelectionNode, variables?: Record): boolean; // @internal @deprecated (undocumented) export function storeKeyNameFromField(field: FieldNode, variables?: Object): string; // @public (undocumented) let storeKeyNameStringify: (value: any) => string; // @public export const streamInfoSymbol: unique symbol; // @internal @deprecated (undocumented) export type StreamInfoTrie = Trie<{ current: Incremental.StreamFieldInfo; previous?: { incoming: unknown; streamFieldInfo: Incremental.StreamFieldInfo; result: unknown; }; }>; // @internal @deprecated (undocumented) export function stringifyForDisplay(value: any, space?: number): string; // @internal @deprecated (undocumented) export function toQueryResult(value: ObservableQuery.Result): ApolloClient.QueryResult; // @public (undocumented) type TupleToIntersection = T extends [infer A] ? A : T extends [infer A, infer B] ? A & B : T extends [infer A, infer B, infer C] ? A & B & C : T extends [infer A, infer B, infer C, infer D] ? A & B & C & D : T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E : T extends (infer U)[] ? U : any; // @internal @deprecated (undocumented) export type VariablesOption = {} extends TVariables ? { variables?: TVariables; } : { variables: TVariables; }; // @internal @deprecated export const variablesUnknownSymbol: unique symbol; // Warnings were encountered during analysis: // // src/utilities/internal/getStoreKeyName.ts:89:1 - (ae-forgotten-export) The symbol "storeKeyNameStringify" needs to be exported by the entry point index.d.ts // src/utilities/internal/types/ExtensionsWithStreamDetails.ts:11:5 - (ae-incompatible-release-tags) The symbol "deref" is marked as @public, but its signature references "StreamInfoTrie" which is marked as @internal // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_internal_globals.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public (undocumented) const global_2: typeof globalThis & Window; export { global_2 as global } // @public (undocumented) export function maybe(thunk: () => T): T | undefined; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_internal_ponyfills.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public (undocumented) const FinalizationRegistry_2: FinalizationRegistryConstructor; export { FinalizationRegistry_2 as FinalizationRegistry } // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_invariant.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public (undocumented) export const ApolloErrorMessageHandler: unique symbol; // @public (undocumented) export function invariant(condition: any, ...args: [message?: string | number, ...any[]]): asserts condition; // @public (undocumented) export namespace invariant { var // (undocumented) debug: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; var // (undocumented) log: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; var // (undocumented) warn: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; var // (undocumented) error: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; } // @public (undocumented) export class InvariantError extends Error { constructor(message?: string); } // @public export function newInvariantError(message?: string | number, ...optionalParams: unknown[]): InvariantError; // Warning: (ae-forgotten-export) The symbol "VerbosityLevel" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function setVerbosity(level: VerbosityLevel): VerbosityLevel; // Warning: (ae-forgotten-export) The symbol "verbosityLevels" needs to be exported by the entry point index.d.ts // // @public (undocumented) type VerbosityLevel = (typeof verbosityLevels)[number]; // @public (undocumented) const verbosityLevels: readonly ["debug", "log", "warn", "error", "silent"]; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-utilities_subscriptions_relay.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { GraphQLResponse } from 'relay-runtime'; import { Observable } from 'relay-runtime'; import type { OperationVariables } from '@apollo/client'; import type { RequestParameters } from 'relay-runtime'; // Warning: (ae-forgotten-export) The symbol "CreateMultipartSubscriptionOptions" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function createFetchMultipartSubscription(uri: string, { fetch: preferredFetch, headers }?: CreateMultipartSubscriptionOptions): (operation: RequestParameters, variables: OperationVariables) => Observable; // @public (undocumented) type CreateMultipartSubscriptionOptions = { fetch?: WindowOrWorkerGlobalScope["fetch"]; headers?: Record; }; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-v4-migration.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public @deprecated (undocumented) export const addNonReactiveToNamedFragments: never; // @public @deprecated (undocumented) export const ApolloConsumer: never; // @public @deprecated (undocumented) export type ApolloConsumerProps = never; // @public @deprecated (undocumented) export class ApolloError { } // @public @deprecated (undocumented) export type ApolloErrorOptions = never; // @public @deprecated (undocumented) export const asyncMap: never; // @public @deprecated (undocumented) export type BaseMutationOptions = never; // @public @deprecated (undocumented) export type BaseQueryOptions = never; // @public @deprecated (undocumented) export type BatchableRequest = never; // @public @deprecated (undocumented) export const buildQueryFromSelectionSet: never; // @public @deprecated (undocumented) export const canUseAsyncIteratorSymbol: never; // @public @deprecated (undocumented) export const canUseLayoutEffect: never; // @public @deprecated (undocumented) export const canUseSymbol: never; // @public @deprecated (undocumented) export const canUseWeakMap: never; // @public @deprecated (undocumented) export const canUseWeakSet: never; // @public @deprecated (undocumented) export type ChildDataProps = never; // @public @deprecated (undocumented) export type ChildMutateProps = never; // @public @deprecated (undocumented) export type ChildProps = never; // @public @deprecated (undocumented) export type ClientParseError = never; // @public @deprecated (undocumented) export type CommonOptions = never; // @public @deprecated (undocumented) export class Concast { } // @public @deprecated (undocumented) export type ConcastSourcesArray = never; // @public @deprecated (undocumented) export type ConcastSourcesIterable = never; // @public @deprecated (undocumented) export const createMockClient: never; // @public @deprecated (undocumented) export const createSchemaFetch: never; // @public @deprecated (undocumented) export const createTestSchema: never; // @public @deprecated (undocumented) export type DataProps = never; // @public @deprecated (undocumented) export const DataProxy: never; // @public @deprecated (undocumented) export type DataValue = never; // @public @deprecated (undocumented) export const defaultCacheSizes: never; // @public @deprecated (undocumented) export type DirectiveInfo = never; // @public @deprecated (undocumented) export type Directives = never; // @public @deprecated (undocumented) const DocumentType_2: never; export { DocumentType_2 as DocumentType } // @public @deprecated (undocumented) export type FetchMoreQueryOptions = never; // @public @deprecated (undocumented) export const fixObservableSubclass: never; // @public @deprecated (undocumented) export type FragmentMatcher = never; // @public @deprecated (undocumented) export const fromError: never; // @public @deprecated (undocumented) export const fromPromise: never; // @public @deprecated (undocumented) export type GetDirectiveConfig = never; // @public @deprecated (undocumented) export const getDirectiveNames: never; // @public @deprecated (undocumented) export const getFragmentMaskMode: never; // @public @deprecated (undocumented) export type GetFragmentSpreadConfig = never; // @public @deprecated (undocumented) export const getInclusionDirectives: never; // @public @deprecated (undocumented) export type GetNodeConfig = never; // @public @deprecated (undocumented) export const getTypenameFromResult: never; // @public @deprecated (undocumented) export const graphql: never; // @public @deprecated (undocumented) export type GraphQLErrors = never; // @public @deprecated (undocumented) export const hasAllDirectives: never; // @public @deprecated (undocumented) export const hasAnyDirectives: never; // @public @deprecated (undocumented) export const hasClientExports: never; // @public @deprecated (undocumented) export type IDocumentDefinition = never; // @public @deprecated (undocumented) export type InclusionDirectives = never; // @public @deprecated (undocumented) export const isApolloError: never; // @public @deprecated (undocumented) export const isApolloPayloadResult: never; // @public @deprecated (undocumented) export const isExecutionPatchIncrementalResult: never; // @public @deprecated (undocumented) export const isExecutionPatchInitialResult: never; // @public @deprecated (undocumented) export const isExecutionPatchResult: never; // @public @deprecated (undocumented) export const isFullyUnmaskedOperation: never; // @public @deprecated (undocumented) export const isInlineFragment: never; // @public @deprecated (undocumented) export const isStatefulPromise: never; // @public @deprecated (undocumented) export type IsStrictlyAny = never; // @public @deprecated (undocumented) export const itAsync: never; // @public @deprecated (undocumented) export const iterateObserversSafely: never; // @public @deprecated (undocumented) export type Masked = never; // @public @deprecated (undocumented) export type MaskedDocumentNode = never; // @public @deprecated (undocumented) export const mergeIncrementalData: never; // @public @deprecated (undocumented) export type MethodKeys = never; // @public @deprecated (undocumented) export const mockObservableLink: never; // @public @deprecated (undocumented) export const mockSingleLink: never; // @public @deprecated (undocumented) export type MutateProps = never; // @public @deprecated (undocumented) export const Mutation: never; // @public @deprecated (undocumented) export type MutationComponentOptions = never; // @public @deprecated (undocumented) export type MutationDataOptions = never; // @public @deprecated (undocumented) export type MutationUpdaterFn = never; // @public @deprecated (undocumented) export type NetworkError = never; // @public @deprecated (undocumented) export type ObservableQueryFields = never; // @public @deprecated (undocumented) export const ObservableSubscription: never; // @public @deprecated (undocumented) export const Observer: never; // @public @deprecated (undocumented) export type OnlyRequiredProperties = never; // @public @deprecated (undocumented) export const OperationBatcher: never; // @public @deprecated (undocumented) export const operationName: never; // @public @deprecated (undocumented) export type OperationOption = never; // @public @deprecated (undocumented) export type OptionProps = never; // @public @deprecated (undocumented) export const parser: never; // @public @deprecated (undocumented) export type PromiseWithState = never; // @public @deprecated (undocumented) export type PureQueryOptions = never; // @public @deprecated (undocumented) export const Query: never; // @public @deprecated (undocumented) export type QueryComponentOptions = never; // @public @deprecated (undocumented) export type QueryControls = never; // @public @deprecated (undocumented) export type QueryDataOptions = never; // @public @deprecated (undocumented) export type QueryLazyOptions = never; // @public @deprecated (undocumented) export type ReconcilerFunction = never; // @public @deprecated (undocumented) export type RefetchQueriesFunction = never; // @public (undocumented) export namespace Removals { // @deprecated (undocumented) export type defer = never; // @deprecated (undocumented) export type errors = never; // @deprecated (undocumented) export type HOC = never; // @deprecated (undocumented) export type implementationDetail = never; // @deprecated (undocumented) export type internal = never; // @deprecated (undocumented) export type internalTesting = never; // @deprecated (undocumented) export type removedType = never; // @deprecated (undocumented) export type removedValue = never; // @deprecated (undocumented) export type renderProp = never; // @deprecated (undocumented) export type rxjs = never; // @deprecated (undocumented) export type testingLibrary = never; // @deprecated (undocumented) export type utility = never; } // @public @deprecated (undocumented) export type RemoveArgumentsConfig = never; // @public @deprecated (undocumented) export const removeArgumentsFromDocument: never; // @public @deprecated (undocumented) export const removeClientSetsFromDocument: never; // @public @deprecated (undocumented) export const removeConnectionDirectiveFromDocument: never; // @public @deprecated (undocumented) export type RemoveDirectiveConfig = never; // @public @deprecated (undocumented) export type RemoveFragmentDefinitionConfig = never; // @public @deprecated (undocumented) export type RemoveFragmentSpreadConfig = never; // @public @deprecated (undocumented) export const removeFragmentSpreadFromDocument: never; // @public @deprecated (undocumented) export type RemoveNodeConfig = never; // @public @deprecated (undocumented) export type RemoveVariableDefinitionConfig = never; // @public @deprecated (undocumented) export const RenderPromises: never; // @public @deprecated (undocumented) export const resetApolloContext: never; // @public @deprecated (undocumented) export type Resolver = never; // @public @deprecated (undocumented) export type Resolvers = never; // @public @deprecated (undocumented) export const serializeFetchParameter: never; // @public @deprecated (undocumented) export const subscribeAndCount: never; // @public @deprecated (undocumented) export const Subscription: never; // @public @deprecated (undocumented) export type SubscriptionComponentOptions = never; // @public @deprecated (undocumented) export type SubscriptionCurrentObservable = never; // @public @deprecated (undocumented) export const throwServerError: never; // @public @deprecated (undocumented) export const tick: never; // @public @deprecated (undocumented) export const toPromise: never; // @public @deprecated (undocumented) export const transformOperation: never; // @public @deprecated (undocumented) export type TupleToIntersection = never; // @public @deprecated (undocumented) export type UnionToIntersection = never; // @public @deprecated (undocumented) export const validateOperation: never; // @public @deprecated (undocumented) export const valueToObjectRepresentation: never; // @public @deprecated (undocumented) export type VariableValue = never; // @public @deprecated (undocumented) export const verifyDocumentType: never; // @public @deprecated (undocumented) export const wait: never; // @public @deprecated (undocumented) export const withApollo: never; // @public @deprecated (undocumented) export type WithApolloClient = never; // @public @deprecated (undocumented) export const withErrorSpy: never; // @public @deprecated (undocumented) export const withLogSpy: never; // @public @deprecated (undocumented) export const withMutation: never; // @public @deprecated (undocumented) export const withQuery: never; // @public @deprecated (undocumented) export const withSubscription: never; // @public @deprecated (undocumented) export const withWarningSpy: never; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report-zz_removals.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public @deprecated (undocumented) export const addNonReactiveToNamedFragments: never; // @public @deprecated (undocumented) export const ApolloConsumer: never; // @public @deprecated (undocumented) export type ApolloConsumerProps = never; // @public @deprecated (undocumented) export class ApolloError { } // @public @deprecated (undocumented) export type ApolloErrorOptions = never; // @public @deprecated (undocumented) export const asyncMap: never; // @public @deprecated (undocumented) export type BaseMutationOptions = never; // @public @deprecated (undocumented) export type BaseQueryOptions = never; // @public @deprecated (undocumented) export type BatchableRequest = never; // @public @deprecated (undocumented) export const buildQueryFromSelectionSet: never; // @public @deprecated (undocumented) export const canUseAsyncIteratorSymbol: never; // @public @deprecated (undocumented) export const canUseLayoutEffect: never; // @public @deprecated (undocumented) export const canUseSymbol: never; // @public @deprecated (undocumented) export const canUseWeakMap: never; // @public @deprecated (undocumented) export const canUseWeakSet: never; // @public @deprecated (undocumented) export type ChildDataProps = never; // @public @deprecated (undocumented) export type ChildMutateProps = never; // @public @deprecated (undocumented) export type ChildProps = never; // @public @deprecated (undocumented) export type ClientParseError = never; // @public @deprecated (undocumented) export type CommonOptions = never; // @public @deprecated (undocumented) export class Concast { } // @public @deprecated (undocumented) export type ConcastSourcesArray = never; // @public @deprecated (undocumented) export type ConcastSourcesIterable = never; // @public @deprecated (undocumented) export const createMockClient: never; // @public @deprecated (undocumented) export const createSchemaFetch: never; // @public @deprecated (undocumented) export const createTestSchema: never; // @public @deprecated (undocumented) export type DataProps = never; // @public @deprecated (undocumented) export const DataProxy: never; // @public @deprecated (undocumented) export type DataValue = never; // @public @deprecated (undocumented) export const defaultCacheSizes: never; // @public @deprecated (undocumented) export type DirectiveInfo = never; // @public @deprecated (undocumented) export type Directives = never; // @public @deprecated (undocumented) const DocumentType_2: never; export { DocumentType_2 as DocumentType } // @public @deprecated (undocumented) export type FetchMoreQueryOptions = never; // @public @deprecated (undocumented) export const fixObservableSubclass: never; // @public @deprecated (undocumented) export type FragmentMatcher = never; // @public @deprecated (undocumented) export const fromError: never; // @public @deprecated (undocumented) export const fromPromise: never; // @public @deprecated (undocumented) export type GetDirectiveConfig = never; // @public @deprecated (undocumented) export const getDirectiveNames: never; // @public @deprecated (undocumented) export const getFragmentMaskMode: never; // @public @deprecated (undocumented) export type GetFragmentSpreadConfig = never; // @public @deprecated (undocumented) export const getInclusionDirectives: never; // @public @deprecated (undocumented) export type GetNodeConfig = never; // @public @deprecated (undocumented) export const getTypenameFromResult: never; // @public @deprecated (undocumented) export const graphql: never; // @public @deprecated (undocumented) export type GraphQLErrors = never; // @public @deprecated (undocumented) export const hasAllDirectives: never; // @public @deprecated (undocumented) export const hasAnyDirectives: never; // @public @deprecated (undocumented) export const hasClientExports: never; // @public @deprecated (undocumented) export type IDocumentDefinition = never; // @public @deprecated (undocumented) export type InclusionDirectives = never; // @public @deprecated (undocumented) export const isApolloError: never; // @public @deprecated (undocumented) export const isApolloPayloadResult: never; // @public @deprecated (undocumented) export const isExecutionPatchIncrementalResult: never; // @public @deprecated (undocumented) export const isExecutionPatchInitialResult: never; // @public @deprecated (undocumented) export const isExecutionPatchResult: never; // @public @deprecated (undocumented) export const isFullyUnmaskedOperation: never; // @public @deprecated (undocumented) export const isInlineFragment: never; // @public @deprecated (undocumented) export const isStatefulPromise: never; // @public @deprecated (undocumented) export type IsStrictlyAny = never; // @public @deprecated (undocumented) export const itAsync: never; // @public @deprecated (undocumented) export const iterateObserversSafely: never; // @public @deprecated (undocumented) export const mergeIncrementalData: never; // @public @deprecated (undocumented) export type MethodKeys = never; // @public @deprecated (undocumented) export const mockObservableLink: never; // @public @deprecated (undocumented) export const mockSingleLink: never; // @public @deprecated (undocumented) export type MutateProps = never; // @public @deprecated (undocumented) export const Mutation: never; // @public @deprecated (undocumented) export type MutationComponentOptions = never; // @public @deprecated (undocumented) export type MutationDataOptions = never; // @public @deprecated (undocumented) export type MutationUpdaterFn = never; // @public @deprecated (undocumented) export type NetworkError = never; // @public @deprecated (undocumented) export type ObservableQueryFields = never; // @public @deprecated (undocumented) export const ObservableSubscription: never; // @public @deprecated (undocumented) export const Observer: never; // @public @deprecated (undocumented) export type OnlyRequiredProperties = never; // @public @deprecated (undocumented) export const OperationBatcher: never; // @public @deprecated (undocumented) export const operationName: never; // @public @deprecated (undocumented) export type OperationOption = never; // @public @deprecated (undocumented) export type OptionProps = never; // @public @deprecated (undocumented) export const parser: never; // @public @deprecated (undocumented) export type PromiseWithState = never; // @public @deprecated (undocumented) export type PureQueryOptions = never; // @public @deprecated (undocumented) export const Query: never; // @public @deprecated (undocumented) export type QueryComponentOptions = never; // @public @deprecated (undocumented) export type QueryControls = never; // @public @deprecated (undocumented) export type QueryDataOptions = never; // @public @deprecated (undocumented) export type QueryLazyOptions = never; // @public @deprecated (undocumented) export type ReconcilerFunction = never; // @public @deprecated (undocumented) export type RefetchQueriesFunction = never; // @public export namespace Removals { // @deprecated (undocumented) export type defer = never; // @deprecated (undocumented) export type errors = never; // @deprecated (undocumented) export type HOC = never; // @deprecated (undocumented) export type implementationDetail = never; // @deprecated (undocumented) export type internal = never; // @deprecated (undocumented) export type internalTesting = never; // @deprecated (undocumented) export type removedType = never; // @deprecated (undocumented) export type removedValue = never; // @deprecated (undocumented) export type renderProp = never; // @deprecated (undocumented) export type rxjs = never; // @deprecated (undocumented) export type testingLibrary = never; // @deprecated (undocumented) export type utility = never; } // @public @deprecated (undocumented) export type RemoveArgumentsConfig = never; // @public @deprecated (undocumented) export const removeArgumentsFromDocument: never; // @public @deprecated (undocumented) export const removeClientSetsFromDocument: never; // @public @deprecated (undocumented) export const removeConnectionDirectiveFromDocument: never; // @public @deprecated (undocumented) export type RemoveDirectiveConfig = never; // @public @deprecated (undocumented) export type RemoveFragmentDefinitionConfig = never; // @public @deprecated (undocumented) export type RemoveFragmentSpreadConfig = never; // @public @deprecated (undocumented) export const removeFragmentSpreadFromDocument: never; // @public @deprecated (undocumented) export type RemoveNodeConfig = never; // @public @deprecated (undocumented) export type RemoveVariableDefinitionConfig = never; // @public @deprecated (undocumented) export const RenderPromises: never; // @public @deprecated (undocumented) export const resetApolloContext: never; // @public @deprecated (undocumented) export type Resolver = never; // @public @deprecated (undocumented) export type Resolvers = never; // @public @deprecated (undocumented) export const serializeFetchParameter: never; // @public @deprecated (undocumented) export const subscribeAndCount: never; // @public @deprecated (undocumented) export const Subscription: never; // @public @deprecated (undocumented) export type SubscriptionComponentOptions = never; // @public @deprecated (undocumented) export type SubscriptionCurrentObservable = never; // @public @deprecated (undocumented) export const throwServerError: never; // @public @deprecated (undocumented) export const tick: never; // @public @deprecated (undocumented) export const toPromise: never; // @public @deprecated (undocumented) export const transformOperation: never; // @public @deprecated (undocumented) export type TupleToIntersection = never; // @public @deprecated (undocumented) export type UnionToIntersection = never; // @public @deprecated (undocumented) export const validateOperation: never; // @public @deprecated (undocumented) export const valueToObjectRepresentation: never; // @public @deprecated (undocumented) export type VariableValue = never; // @public @deprecated (undocumented) export const verifyDocumentType: never; // @public @deprecated (undocumented) export const wait: never; // @public @deprecated (undocumented) export const withApollo: never; // @public @deprecated (undocumented) export type WithApolloClient = never; // @public @deprecated (undocumented) export const withErrorSpy: never; // @public @deprecated (undocumented) export const withLogSpy: never; // @public @deprecated (undocumented) export const withMutation: never; // @public @deprecated (undocumented) export const withQuery: never; // @public @deprecated (undocumented) export const withSubscription: never; // @public @deprecated (undocumented) export const withWarningSpy: never; // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .api-reports/api-report.api.md ================================================ ## API Report File for "@apollo/client" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import type { ASTNode } from 'graphql'; import { disableExperimentalFragmentVariables } from 'graphql-tag'; import { disableFragmentWarnings } from 'graphql-tag'; import { DocumentNode } from 'graphql'; import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; import { enableExperimentalFragmentVariables } from 'graphql-tag'; import type { FieldNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; import { gql } from 'graphql-tag'; import type { GraphQLFormattedError } from 'graphql'; import type { InlineFragmentNode } from 'graphql'; import type { InteropObservable } from 'rxjs'; import type { NextNotification } from 'rxjs'; import { Observable } from 'rxjs'; import type { ObservableNotification } from 'rxjs'; import type { Observer } from 'rxjs'; import { OperationTypeNode } from 'graphql'; import type { print as print_2 } from 'graphql'; import { resetCaches } from 'graphql-tag'; import type { SelectionSetNode } from 'graphql'; import type { Subscribable } from 'rxjs'; import type { Subscription } from 'rxjs'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; // Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts // // @public (undocumented) type AllFieldsModifier> = Modifier> : never>; // @public (undocumented) export namespace ApolloCache { // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts export type FromOptionValue = StoreObject | Reference | FragmentType> | string; // (undocumented) export interface ObservableFragment extends Observable> { getCurrentResult: () => ApolloCache.WatchFragmentResult; } export interface WatchFragmentOptions { fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; from: ApolloCache.FromOptionValue | Array | null> | null; optimistic?: boolean; variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts export type WatchFragmentResult = true extends IsAny ? ({ complete: true; missing?: never; } & GetDataState) | ({ complete: false; missing?: MissingTree; } & GetDataState) : TData extends null | null[] ? Prettify<{ complete: true; missing?: never; } & GetDataState> : Prettify<{ complete: true; missing?: never; } & GetDataState> | { complete: false; missing?: MissingTree; data: TData extends Array ? Array | null> : DataValue.Partial; dataState: "partial"; }; } // @public (undocumented) export abstract class ApolloCache { // (undocumented) readonly assumeImmutableResults: boolean; batch(options: Cache_2.BatchOptions): U; abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; abstract extract(optimistic?: boolean): unknown; // (undocumented) abstract fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(): string[]; // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts // // @internal @deprecated getMemoryInternals?: typeof getApolloCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; // (undocumented) lookupFragment(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; protected onAfterBroadcast: (cb: () => void) => void; // (undocumented) abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; // (undocumented) abstract read(query: Cache_2.ReadOptions): Unmasked | null; readFragment({ fragment, variables, fragmentName, id, from, optimistic, returnPartialData, }: Cache_2.ReadFragmentOptions): Unmasked | null; // (undocumented) readFragment(options: Cache_2.ReadFragmentOptions, optimistic: boolean): Unmasked | null; readQuery({ query, variables, id, optimistic, returnPartialData, }: Cache_2.ReadQueryOptions): Unmasked | null; readQuery(options: Cache_2.ReadQueryOptions, optimistic: boolean): Unmasked | null; // (undocumented) recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; // (undocumented) abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; resolvesClientField?(typename: string, fieldName: string): boolean; abstract restore(serializedState: unknown): this; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) transformForLink(document: DocumentNode): DocumentNode; // (undocumented) updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) abstract watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array>; }): ApolloCache.ObservableFragment>>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array; }): ApolloCache.ObservableFragment>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: Array | null>; }): ApolloCache.ObservableFragment | null>>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: null; }): ApolloCache.ObservableFragment; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions & { from: ApolloCache.FromOptionValue; }): ApolloCache.ObservableFragment>; // (undocumented) watchFragment(options: ApolloCache.WatchFragmentOptions): ApolloCache.ObservableFragment | null>; // (undocumented) abstract write(write: Cache_2.WriteOptions): Reference | undefined; writeFragment({ data, fragment, fragmentName, variables, overwrite, id, from, broadcast, }: Cache_2.WriteFragmentOptions): Reference | undefined; writeQuery({ data, query, variables, overwrite, id, broadcast, }: Cache_2.WriteQueryOptions): Reference | undefined; } // @public (undocumented) export namespace ApolloClient { // (undocumented) export namespace Base { // (undocumented) export interface ReadQueryOptions { id?: string; optimistic?: boolean; query: DocumentNode | TypedDocumentNode; returnPartialData?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface ReadFragmentOptions { fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; optimistic?: boolean; returnPartialData?: boolean; } } // (undocumented) export namespace Base { // (undocumented) export interface WriteQueryOptions { broadcast?: boolean; data: Unmasked; extensions?: Record; id?: string; overwrite?: boolean; query: DocumentNode | TypedDocumentNode; } } // (undocumented) export namespace Base { // (undocumented) export interface WriteFragmentOptions { broadcast?: boolean; data: Unmasked; fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; overwrite?: boolean; } } // (undocumented) export interface DefaultOptions { // (undocumented) mutate?: Partial>; // (undocumented) query?: Partial>; // (undocumented) watchQuery?: Partial>; } // (undocumented) export interface DevtoolsOptions { enabled?: boolean; name?: string; } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ReadQueryOptions extends Base.ReadQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ReadFragmentOptions extends Base.ReadFragmentOptions { from?: ApolloCache.FromOptionValue; id?: string; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteQueryOptions extends Base.WriteQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteQueryOptions extends Base.WriteQueryOptions { variables?: TVariables; } } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface WriteFragmentOptions extends Base.WriteFragmentOptions { from?: ApolloCache.FromOptionValue; id?: string; variables?: TVariables; } } // (undocumented) export interface Experiment { // (undocumented) (this: ApolloClient, options: ApolloClient.Options): void; // (undocumented) v: 1; } // Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts // // (undocumented) export type MutateOptions = { optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { IGNORE: IgnoreModifier; }) => Unmasked> | IgnoreModifier); updateQueries?: MutationQueryReducersMap; refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; awaitRefetchQueries?: boolean; update?: MutationUpdaterFunction; onQueryUpdated?: OnQueryUpdated; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: MutationFetchPolicy; keepRootFields?: boolean; mutation: DocumentNode | TypedDocumentNode; } & VariablesOption>; // (undocumented) export interface MutateResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // (undocumented) export interface ObservableFragment extends Observable> { getCurrentResult: () => ApolloClient.WatchFragmentResult; } // (undocumented) export interface Options { assumeImmutableResults?: boolean; cache: ApolloCache; // Warning: (ae-forgotten-export) The symbol "ClientAwarenessLink" needs to be exported by the entry point index.d.ts // // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; dataMasking?: boolean; // (undocumented) defaultContext?: Partial; defaultOptions?: ApolloClient.DefaultOptions; devtools?: ApolloClient.DevtoolsOptions; // (undocumented) documentTransform?: DocumentTransform; // (undocumented) enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; experiments?: ApolloClient.Experiment[]; // Warning: (ae-forgotten-export) The symbol "Incremental" needs to be exported by the entry point index.d.ts incrementalHandler?: Incremental.Handler; link: ApolloLink; // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // // (undocumented) localState?: LocalState; queryDeduplication?: boolean; ssrForceFetchDelay?: number; ssrMode?: boolean; } export type QueryOptions = { query: DocumentNode | TypedDocumentNode; errorPolicy?: ErrorPolicy; context?: DefaultContext; fetchPolicy?: FetchPolicy; } & VariablesOption>; // (undocumented) export interface QueryResult { data: TData | undefined; error?: ErrorLike; } // (undocumented) export type ReadFragmentOptions = Base.ReadFragmentOptions & VariablesOption & Cache_2.CacheIdentifierOption; // (undocumented) export type ReadQueryOptions = Base.ReadQueryOptions & VariablesOption; export interface RefetchQueriesOptions { include?: RefetchQueriesInclude; onQueryUpdated?: OnQueryUpdated | null; optimistic?: boolean; updateCache?: (cache: TCache) => void; } export interface RefetchQueriesResult extends Promise>, RefetchQueriesResult.AdditionalProperties { } // (undocumented) export namespace RefetchQueriesResult { // (undocumented) export interface AdditionalProperties { queries: ObservableQuery[]; results: InternalRefetchQueriesResult[]; } } // (undocumented) export type SubscribeOptions = { query: DocumentNode | TypedDocumentNode; fetchPolicy?: FetchPolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; extensions?: Record; } & VariablesOption>; // (undocumented) export interface SubscribeResult { data: TData | undefined; error?: ErrorLike; extensions?: Record; } // (undocumented) export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; // (undocumented) export type WatchFragmentResult = ApolloCache.WatchFragmentResult>; export type WatchQueryOptions = { fetchPolicy?: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); initialFetchPolicy?: WatchQueryFetchPolicy; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode | TypedDocumentNode; [variablesUnknownSymbol]?: boolean; } & VariablesOption>; // (undocumented) export type WriteFragmentOptions = Base.WriteFragmentOptions & VariablesOption & Cache_2.CacheIdentifierOption; // (undocumented) export type WriteQueryOptions = Base.WriteQueryOptions & VariablesOption; } // @public export class ApolloClient { // (undocumented) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClient.Options); // (undocumented) __requestRaw(request: ApolloLink.Request): Observable>; // (undocumented) cache: ApolloCache; clearStore(): Promise; // (undocumented) get defaultContext(): Partial; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly devtoolsConfig: ApolloClient.DevtoolsOptions; // @deprecated (undocumented) disableNetworkFetches: never; get documentTransform(): DocumentTransform; extract(optimistic?: boolean): unknown; // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts getMemoryInternals?: typeof getApolloClientMemoryInternals; getObservableQueries(include?: RefetchQueriesInclude): Set>; // (undocumented) link: ApolloLink; get localState(): LocalState | undefined; set localState(localState: LocalState); mutate(options: ApolloClient.MutateOptions): Promise>>; onClearStore(cb: () => Promise): () => void; onResetStore(cb: () => Promise): () => void; set prioritizeCacheValues(value: boolean); get prioritizeCacheValues(): boolean; query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) queryDeduplication: boolean; readFragment(options: ApolloClient.ReadFragmentOptions): Unmasked | null; // @deprecated readFragment(options: ApolloClient.ReadFragmentOptions, optimistic: boolean): Unmasked | null; readQuery(options: ApolloClient.ReadQueryOptions): Unmasked | null; // @deprecated readQuery(options: ApolloClient.ReadQueryOptions, optimistic: boolean): Unmasked | null; // @deprecated reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; refetchObservableQueries(includeStandby?: boolean): Promise[]>; refetchQueries>>(options: ApolloClient.RefetchQueriesOptions): ApolloClient.RefetchQueriesResult; resetStore(): Promise[] | null>; restore(serializedState: unknown): ApolloCache; setLink(newLink: ApolloLink): void; stop(): void; subscribe(options: ApolloClient.SubscribeOptions): SubscriptionObservable>>; // (undocumented) version: string; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array>; }): ApolloClient.ObservableFragment>; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array; }): ApolloClient.ObservableFragment>; // (undocumented) watchFragment(options: ApolloClient.WatchFragmentOptions & { from: Array | null>; }): ApolloClient.ObservableFragment>; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: null; }): ApolloClient.ObservableFragment; watchFragment(options: ApolloClient.WatchFragmentOptions & { from: ApolloCache.FromOptionValue; }): ApolloClient.ObservableFragment; watchFragment(options: ApolloClient.WatchFragmentOptions): ApolloClient.ObservableFragment; watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; writeFragment(options: ApolloClient.WriteFragmentOptions): Reference | undefined; writeQuery(options: ApolloClient.WriteQueryOptions): Reference | undefined; } // @public @deprecated (undocumented) export type ApolloClientOptions = ApolloClient.Options; // @public (undocumented) export namespace ApolloLink { // Warning: (ae-forgotten-export) The symbol "ApplyHKTImplementationWithDefault" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "NotImplementedHandler" needs to be exported by the entry point index.d.ts // // (undocumented) export type AdditionalResultTypes, TExtensions = Record> = ApplyHKTImplementationWithDefault; // (undocumented) export namespace DocumentationTypes { export function ForwardFunction(operation: ApolloLink.Operation): Observable; export function RequestHandler(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } export interface ExecuteContext { client: ApolloClient; } export type ForwardFunction = (operation: ApolloLink.Operation) => Observable; export interface Operation { readonly client: ApolloClient; extensions: Record; getContext: () => Readonly; operationName: string | undefined; operationType: OperationTypeNode; query: DocumentNode; setContext: { (context: Partial): void; (updateContext: (previousContext: Readonly) => Partial): void; }; variables: OperationVariables; } export interface OperationContext extends DefaultContext { } export interface Request { context?: DefaultContext; extensions?: Record; query: DocumentNode; variables?: OperationVariables; } export type RequestHandler = (operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction) => Observable; // (undocumented) export type Result, TExtensions = Record> = FormattedExecutionResult | AdditionalResultTypes; } // @public export class ApolloLink { constructor(request?: ApolloLink.RequestHandler); // @deprecated static concat(...links: ApolloLink[]): ApolloLink; concat(...links: ApolloLink[]): ApolloLink; static empty(): ApolloLink; static execute(link: ApolloLink, request: ApolloLink.Request, context: ApolloLink.ExecuteContext): Observable; static from(links: ApolloLink[]): ApolloLink; // @internal @deprecated getMemoryInternals?: () => unknown; // @internal @deprecated readonly left?: ApolloLink; request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; // @internal @deprecated readonly right?: ApolloLink; static split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; } // @public (undocumented) export interface ApolloPayloadResult, TExtensions = Record> { // (undocumented) errors?: ReadonlyArray; // (undocumented) payload: FormattedExecutionResult | null; } // @public @deprecated (undocumented) export type ApolloQueryResult["dataState"] = DataState["dataState"]> = ObservableQuery.Result; // @public (undocumented) export type ApolloReducerConfig = { dataIdFromObject?: KeyFieldsFunction; }; // Warning: (ae-forgotten-export) The symbol "HKT" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) type ApplyHKT = (fn & { arg1: arg1; arg2: arg2; arg3: arg3; arg4: arg4; })["return"]; // Warning: (ae-forgotten-export) The symbol "ApplyHKT" needs to be exported by the entry point index.d.ts // // @internal @deprecated (undocumented) type ApplyHKTImplementationWithDefault, arg1, arg2 = never, arg3 = never, arg4 = never> = ApplyHKT; // @public type AsStoreObject = { [K in keyof T]: T[K]; }; // @public (undocumented) namespace BaseHttpLink { // (undocumented) interface Body { // (undocumented) extensions?: Record; // (undocumented) operationName?: string; // (undocumented) query?: string; // (undocumented) variables?: Record; } interface ContextOptions { credentials?: RequestCredentials; fetchOptions?: RequestInit; headers?: Record; http?: BaseHttpLink.HttpOptions; uri?: string | BaseHttpLink.UriFunction; } interface HttpOptions { accept?: string[]; includeExtensions?: boolean; includeQuery?: boolean; preserveHeaderCase?: boolean; } // Warning: (ae-forgotten-export) The symbol "BaseHttpLink" needs to be exported by the entry point index.d.ts interface Options extends Shared.Options { useGETForQueries?: boolean; } // (undocumented) type Printer = (node: ASTNode, originalPrint: typeof print_2) => string; // (undocumented) namespace Shared { interface Options { credentials?: RequestCredentials; fetch?: typeof fetch; fetchOptions?: RequestInit; headers?: Record; includeExtensions?: boolean; includeUnusedVariables?: boolean; preserveHeaderCase?: boolean; print?: BaseHttpLink.Printer; uri?: string | BaseHttpLink.UriFunction; } } // (undocumented) type UriFunction = (operation: ApolloLink.Operation) => string; } // @public class BaseHttpLink extends ApolloLink { constructor(options?: BaseHttpLink.Options); } // @public (undocumented) type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; // @public (undocumented) export const build: "source" | "esm" | "cjs"; // @public (undocumented) namespace Cache_2 { // (undocumented) interface BatchOptions { onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; optimistic?: string | boolean; removeOptimistic?: string; update(cache: TCache): TUpdateResult; } // (undocumented) type CacheIdentifierOption = { id?: string; from?: never; } | { id?: never; from?: ApolloCache.FromOptionValue; }; // (undocumented) interface DiffOptions extends Omit, "rootId"> { } // (undocumented) type DiffResult = { result: DataValue.Complete; complete: true; missing?: never; fromOptimisticTransaction?: boolean; } | { result: DataValue.Partial | null; complete: false; missing?: MissingFieldError; fromOptimisticTransaction?: boolean; }; // (undocumented) interface EvictOptions { // (undocumented) args?: Record; // (undocumented) broadcast?: boolean; // (undocumented) fieldName?: string; // (undocumented) id?: string; } // (undocumented) interface ModifyOptions = Record> { // (undocumented) broadcast?: boolean; // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts // // (undocumented) fields: Modifiers | AllFieldsModifier; // (undocumented) id?: string; // (undocumented) optimistic?: boolean; } // (undocumented) type ReadFragmentOptions = { fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; variables?: TVariables; returnPartialData?: boolean; optimistic?: boolean; } & Cache_2.CacheIdentifierOption; // (undocumented) interface ReadOptions { id?: string; // (undocumented) optimistic: boolean; // (undocumented) previousResult?: any; query: DocumentNode | TypedDocumentNode; // (undocumented) returnPartialData?: boolean; // (undocumented) rootId?: string; variables?: TVariables; } // (undocumented) interface ReadQueryOptions { id?: string; optimistic?: boolean; query: DocumentNode | TypedDocumentNode; returnPartialData?: boolean; variables?: TVariables; } // (undocumented) interface ResetOptions { // (undocumented) discardWatches?: boolean; } // (undocumented) type UpdateFragmentOptions = Omit & WriteFragmentOptions, "data" | "id" | "from"> & Cache_2.CacheIdentifierOption; // (undocumented) interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { } // (undocumented) type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; // (undocumented) interface WatchOptions extends DiffOptions { // (undocumented) callback: WatchCallback; // (undocumented) immediate?: boolean; // (undocumented) lastDiff?: DiffResult; // (undocumented) watcher?: object; } // (undocumented) type WriteFragmentOptions = { fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; variables?: TVariables; data: Unmasked; broadcast?: boolean; overwrite?: boolean; } & Cache_2.CacheIdentifierOption; // (undocumented) interface WriteOptions { broadcast?: boolean; // (undocumented) dataId?: string; // Warning: (ae-forgotten-export) The symbol "ExtensionsWithStreamInfo" needs to be exported by the entry point index.d.ts extensions?: ExtensionsWithStreamInfo; overwrite?: boolean; query: DocumentNode | TypedDocumentNode; // (undocumented) result: Unmasked; variables?: TVariables; } // (undocumented) interface WriteQueryOptions { broadcast?: boolean; data: Unmasked; extensions?: ExtensionsWithStreamInfo; id?: string; overwrite?: boolean; query: DocumentNode | TypedDocumentNode; variables?: TVariables; } } export { Cache_2 as Cache } // @public (undocumented) class CacheGroup { constructor(caching: boolean, parent?: CacheGroup | null); // (undocumented) readonly caching: boolean; // (undocumented) depend(dataId: string, storeFieldName: string): void; // (undocumented) dirty(dataId: string, storeFieldName: string): void; // (undocumented) keyMaker: Trie; // (undocumented) resetCaching(): void; } // @public (undocumented) type CanReadFunction = (value: StoreValue) => boolean; // @public (undocumented) export const checkFetcher: (fetcher: typeof fetch | undefined) => void; // @public (undocumented) namespace ClientAwarenessLink { // (undocumented) interface ClientAwarenessOptions { name?: string; transport?: "headers" | false; version?: string; } interface ContextOptions { clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; } // (undocumented) interface EnhancedClientAwarenessOptions { transport?: "headers" | "extensions" | false; } // (undocumented) interface Options { clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; } } // @public class ClientAwarenessLink extends ApolloLink { constructor(options?: ClientAwarenessLink.Options); } // @public (undocumented) export namespace CombinedGraphQLErrors { // (undocumented) export namespace DocumentationTypes { export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; // (undocumented) export interface InstanceProperties { readonly data: Record | null | undefined; readonly errors: ReadonlyArray; readonly extensions: Record | undefined; } export function is(error: unknown): boolean; } export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; // (undocumented) export interface MessageFormatterOptions { defaultFormatMessage: (errors: ReadonlyArray) => string; result: ApolloLink.Result; } } // @public export class CombinedGraphQLErrors extends Error { constructor(result: FormattedExecutionResult); constructor(result: ApolloLink.Result, errors: ReadonlyArray); readonly data: Record | null | undefined; readonly errors: ReadonlyArray; readonly extensions: Record | undefined; static formatMessage: CombinedGraphQLErrors.MessageFormatter; static is(error: unknown): error is CombinedGraphQLErrors; } // @public (undocumented) export namespace CombinedProtocolErrors { // (undocumented) export namespace DocumentationTypes { export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; // (undocumented) export interface InstanceProperties { readonly errors: ReadonlyArray; } } export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; // (undocumented) export interface MessageFormatterOptions { defaultFormatMessage: (errors: ReadonlyArray) => string; } } // @public export class CombinedProtocolErrors extends Error { constructor(protocolErrors: Array | ReadonlyArray); readonly errors: ReadonlyArray; static formatMessage: CombinedProtocolErrors.MessageFormatter; static is(error: unknown): error is CombinedProtocolErrors; } // @public @deprecated (undocumented) export const concat: typeof ApolloLink.concat; // @public @deprecated (undocumented) export const createHttpLink: (options?: HttpLink.Options) => HttpLink; // @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; } | { controller: AbortController; signal: AbortSignal; }; // @public (undocumented) export type DataState = { data: DataValue.Complete; dataState: "complete"; } | { data: DataValue.Streaming; dataState: "streaming"; } | { data: DataValue.Partial; dataState: "partial"; } | { data: undefined; dataState: "empty"; }; // @public (undocumented) export namespace DataValue { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts export type Complete = ApplyHKTImplementationWithDefault; export type Partial = ApplyHKTImplementationWithDefault; export type Streaming = ApplyHKTImplementationWithDefault; } // Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // // @public type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts // // @public (undocumented) type DeepPartialMap = {} & Map, DeepPartial>; // @public (undocumented) type DeepPartialObject = { [K in keyof T]?: DeepPartial; }; // Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts // // @public (undocumented) type DeepPartialPrimitive = Primitive | Date | RegExp; // @public (undocumented) type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; // @public (undocumented) type DeepPartialReadonlySet = {} & ReadonlySet>; // @public (undocumented) type DeepPartialSet = {} & Set>; // @public (undocumented) export interface DefaultContext extends Record { // (undocumented) clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; queryDeduplication?: boolean; } // Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function defaultDataIdFromObject({ __typename, id, _id }: Readonly, context?: KeyFieldsContext): string | undefined; // @public @deprecated (undocumented) export type DefaultOptions = ApolloClient.DefaultOptions; // Warning: (ae-forgotten-export) The symbol "BaseHttpLink" needs to be exported by the entry point index.d.ts // // @public (undocumented) export const defaultPrinter: BaseHttpLink.Printer; // @public (undocumented) interface DeleteModifier { // (undocumented) [_deleteModifier]: true; } // @public (undocumented) const _deleteModifier: unique symbol; // @public @deprecated (undocumented) export type DevtoolsOptions = ApolloClient.DevtoolsOptions; // @public (undocumented) export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { returnPartialData?: boolean; }; export { disableExperimentalFragmentVariables } export { disableFragmentWarnings } export { DocumentNode } // @public export class DocumentTransform { // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts constructor(transform: TransformFn, options?: DocumentTransformOptions); concat(otherTransform: DocumentTransform): DocumentTransform; static identity(): DocumentTransform; // @internal @deprecated readonly left?: DocumentTransform; resetCache(): void; // @internal @deprecated readonly right?: DocumentTransform; static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { left: DocumentTransform; right: DocumentTransform; }; transformDocument(document: DocumentNode): DocumentNode; } // @public (undocumented) export type DocumentTransformCacheKey = ReadonlyArray; // @public (undocumented) interface DocumentTransformOptions { cache?: boolean; getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } // @public @deprecated (undocumented) export const empty: typeof ApolloLink.empty; export { enableExperimentalFragmentVariables } // @public (undocumented) abstract class EntityStore implements NormalizedCache { constructor(policies: Policies, group: CacheGroup); // Warning: (ae-forgotten-export) The symbol "Layer" needs to be exported by the entry point index.d.ts // // (undocumented) abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // Warning: (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts // // (undocumented) canRead: CanReadFunction; // (undocumented) clear(): void; // (undocumented) protected data: NormalizedCacheObject; // (undocumented) delete(dataId: string, fieldName?: string, args?: Record): boolean; // (undocumented) evict(options: Cache_2.EvictOptions, limit: EntityStore): boolean; // (undocumented) extract(): NormalizedCacheObject; // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) gc(): string[]; // (undocumented) get(dataId: string, fieldName: string): StoreValue; // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts // // (undocumented) getFieldValue: (objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly; // (undocumented) getRootIdSet(ids?: Set): Set; // Warning: (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts // // (undocumented) abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; // Warning: (ae-forgotten-export) The symbol "CacheGroup" needs to be exported by the entry point index.d.ts // // (undocumented) readonly group: CacheGroup; // (undocumented) has(dataId: string): boolean; // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined): object; makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; // (undocumented) modify(dataId: string, fields: Modifier | Modifiers>, exact: boolean): boolean; // Warning: (ae-forgotten-export) The symbol "Policies" needs to be exported by the entry point index.d.ts // // (undocumented) readonly policies: Policies; // (undocumented) release(rootId: string): number; // (undocumented) abstract removeLayer(layerId: string): EntityStore; // (undocumented) replace(newData: NormalizedCacheObject | null): void; // (undocumented) retain(rootId: string): number; // Warning: (ae-forgotten-export) The symbol "Root" needs to be exported by the entry point index.d.ts // // (undocumented) static Root: typeof Root; // (undocumented) get supportsResultCaching(): boolean; // (undocumented) toObject(): NormalizedCacheObject; // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // // (undocumented) toReference: ToReferenceFunction; } // @public export interface ErrorLike { // (undocumented) message: string; // (undocumented) name: string; // (undocumented) stack?: string; } // @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) export const execute: typeof ApolloLink.execute; // @internal @deprecated const extensionsSymbol: unique symbol; // @public interface ExtensionsWithStreamInfo extends Record { // (undocumented) [streamInfoSymbol]?: { deref(): StreamInfoTrie | undefined; }; } // @public (undocumented) export const fallbackHttpConfig: { http: BaseHttpLink.HttpOptions; headers: { accept: string; "content-type": string; }; options: { method: string; }; }; // @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; // @public @deprecated (undocumented) export type FetchResult, TExtensions = Record> = ApolloLink.Result; // @public (undocumented) export interface FieldFunctionOptions, TVariables extends OperationVariables = Record> { // (undocumented) args: TArgs | null; // (undocumented) cache: InMemoryCache; // (undocumented) canRead: CanReadFunction; // (undocumented) field: FieldNode | null; // (undocumented) fieldName: string; // (undocumented) isReference: typeof isReference; // Warning: (ae-forgotten-export) The symbol "MergeObjectsFunction" needs to be exported by the entry point index.d.ts // // (undocumented) mergeObjects: MergeObjectsFunction; // Warning: (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts // // (undocumented) readField: ReadFieldFunction; // (undocumented) storage: StorageType; // (undocumented) storeFieldName: string; // (undocumented) toReference: ToReferenceFunction; // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "FieldMergeFunctionOptions" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type FieldMergeFunction = (existing: SafeReadonly | undefined, incoming: SafeReadonly, options: TOptions) => SafeReadonly; // @public (undocumented) interface FieldMergeFunctionOptions, TVariables extends OperationVariables = Record> extends FieldFunctionOptions { existingData: unknown; extensions: Record | undefined; streamFieldInfo?: Incremental.StreamFieldInfo; } // Warning: (ae-forgotten-export) The symbol "FieldReadFunctionOptions" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type FieldPolicy = { keyArgs?: KeySpecifier | KeyArgsFunction | false; read?: FieldReadFunction; merge?: FieldMergeFunction | boolean; }; // @public (undocumented) export type FieldReadFunction = (existing: SafeReadonly | undefined, options: TOptions) => TReadResult | undefined; // @public (undocumented) interface FieldReadFunctionOptions, TVariables extends OperationVariables = Record> extends FieldFunctionOptions { } // @public (undocumented) interface FieldSpecifier { // (undocumented) args?: Record; // (undocumented) field?: FieldNode; // (undocumented) fieldName: string; // (undocumented) typename?: string; // (undocumented) variables?: Record; } // Warning: (ae-forgotten-export) The symbol "EntityStore" needs to be exported by the entry point index.d.ts // // @public (undocumented) type FieldValueGetter = EntityStore["getFieldValue"]; // Warning: (ae-forgotten-export) The symbol "WriteContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) type FlavorableWriteContext = Pick; // @internal @deprecated interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; } // @internal @deprecated (undocumented) type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; // @public (undocumented) interface FragmentRegistryAPI { // (undocumented) lookup(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) register(...fragments: DocumentNode[]): this; // (undocumented) resetCaches(): void; // (undocumented) transform(document: D): D; } // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts // // @public export type FragmentType = ApplyHKTImplementationWithDefault) ? TFragmentData : TFragmentDataOrTypedDocumentNode>; // @public @deprecated (undocumented) export const from: typeof ApolloLink.from; // @internal @deprecated const getApolloCacheMemoryInternals: (() => { cache: { fragmentQueryDocuments: number | undefined; }; }) | undefined; // @internal @deprecated const getApolloClientMemoryInternals: (() => { limits: { [k: string]: number; }; sizes: { cache?: { fragmentQueryDocuments: number | undefined; } | undefined; addTypenameDocumentTransform?: { cache: number; }[] | undefined; inMemoryCache?: { executeSelectionSet: number | undefined; executeSubSelectedArray: number | undefined; maybeBroadcastWatch: number | undefined; } | undefined; fragmentRegistry?: { findFragmentSpreads: number | undefined; lookup: number | undefined; transform: number | undefined; } | undefined; print: number | undefined; canonicalStringify: number | undefined; links: unknown[]; queryManager: { getDocumentInfo: number; documentTransforms: { cache: number; }[]; }; }; }) | undefined; // @public (undocumented) export type GetDataState["dataState"]> = Extract, { dataState: TState; }>; // @internal @deprecated const getInMemoryCacheMemoryInternals: (() => { addTypenameDocumentTransform: { cache: number; }[]; inMemoryCache: { executeSelectionSet: number | undefined; executeSubSelectedArray: number | undefined; maybeBroadcastWatch: number | undefined; }; fragmentRegistry: { findFragmentSpreads: number | undefined; lookup: number | undefined; transform: number | undefined; }; cache: { fragmentQueryDocuments: number | undefined; }; }) | undefined; export { gql } // @public @deprecated (undocumented) export type GraphQLRequest = ApolloLink.Request; // @beta interface HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) arg3: unknown; // (undocumented) arg4: unknown; // (undocumented) return: unknown; } // @public (undocumented) interface HttpConfig { // (undocumented) credentials?: any; // (undocumented) headers?: Record; // (undocumented) http?: BaseHttpLink.HttpOptions; // (undocumented) options?: any; } // @public (undocumented) export namespace HttpLink { export interface ContextOptions extends BaseHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { } export interface Options extends BaseHttpLink.Options, ClientAwarenessLink.Options { } } // @public export class HttpLink extends ApolloLink { constructor(options?: HttpLink.Options); } // @public (undocumented) export type IdGetter = (value: IdGetterObj) => string | undefined; // @public (undocumented) export interface IdGetterObj extends Object { // (undocumented) __typename?: string; // (undocumented) id?: string; // (undocumented) _id?: string; } // @public (undocumented) interface IgnoreModifier { // (undocumented) [_ignoreModifier]: true; } // @public (undocumented) const _ignoreModifier: unique symbol; // @public (undocumented) namespace Incremental { // @internal @deprecated (undocumented) interface Handler = Record> { // (undocumented) extractErrors: (result: ApolloLink.Result) => readonly GraphQLFormattedError[] | undefined | void; // (undocumented) isIncrementalResult: (result: ApolloLink.Result) => result is Chunk; // (undocumented) prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request; // Warning: (ae-forgotten-export) The symbol "Incremental" needs to be exported by the entry point index.d.ts // // (undocumented) startRequest: >(request: { query: DocumentNode; }) => IncrementalRequest; } // (undocumented) interface IncrementalRequest, TData> { // (undocumented) handle: (cacheData: TData | DeepPartial | undefined | null, chunk: Chunk) => FormattedExecutionResult; // (undocumented) hasNext: boolean; } // (undocumented) type Path = ReadonlyArray; // @internal @deprecated (undocumented) interface StreamFieldInfo { // (undocumented) isFirstChunk: boolean; // (undocumented) isLastChunk: boolean; } } // @public (undocumented) type InferContextValueFromResolvers = TResolvers extends { [typename: string]: infer TFieldResolvers; } ? TFieldResolvers extends ({ [field: string]: LocalState.Resolver; }) ? unknown extends TContext ? DefaultContext : TContext : DefaultContext : DefaultContext; // @public (undocumented) export class InMemoryCache extends ApolloCache { constructor(config?: InMemoryCacheConfig); // (undocumented) readonly assumeImmutableResults = true; batch(options: Cache_2.BatchOptions): TUpdateResult; // Warning: (ae-forgotten-export) The symbol "BroadcastOptions" needs to be exported by the entry point index.d.ts // // (undocumented) protected broadcastWatches(options?: BroadcastOptions): void; // (undocumented) protected config: InMemoryCacheConfig; // (undocumented) diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) evict(options: Cache_2.EvictOptions): boolean; // (undocumented) extract(optimistic?: boolean): NormalizedCacheObject; // (undocumented) fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(options?: { resetResultCache?: boolean; }): string[]; // Warning: (ae-forgotten-export) The symbol "getInMemoryCacheMemoryInternals" needs to be exported by the entry point index.d.ts // // @internal @deprecated getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; // (undocumented) lookupFragment(fragmentName: string): FragmentDefinitionNode | null; // (undocumented) readonly makeVar: typeof makeVar; // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; // (undocumented) performTransaction(update: (cache: InMemoryCache) => any, optimisticId?: string | null): any; // (undocumented) readonly policies: Policies; // (undocumented) read(options: Cache_2.ReadOptions & { returnPartialData: true; }): TData | DeepPartial | null; // (undocumented) read(options: Cache_2.ReadOptions): TData | null; // (undocumented) release(rootId: string, optimistic?: boolean): number; // (undocumented) removeOptimistic(idToRemove: string): void; // (undocumented) reset(options?: Cache_2.ResetOptions): Promise; // (undocumented) resolvesClientField(typename: string, fieldName: string): boolean; // (undocumented) restore(data: NormalizedCacheObject): this; // (undocumented) retain(rootId: string, optimistic?: boolean): number; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) write(options: Cache_2.WriteOptions): Reference | undefined; } // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts // // (undocumented) fragments?: FragmentRegistryAPI; // (undocumented) possibleTypes?: PossibleTypesMap; // (undocumented) resultCaching?: boolean; // (undocumented) typePolicies?: TypePolicies; } // Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) export type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; // @public (undocumented) export interface InternalRefetchQueriesOptions extends Omit, "include"> { // (undocumented) include?: InternalRefetchQueriesInclude; // (undocumented) removeOptimistic?: string; } // @public (undocumented) export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; // @public (undocumented) export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | ApolloClient.QueryOptions; // @internal @deprecated (undocumented) export namespace InternalTypes { export type { NextFetchPolicyContext, QueryManager }; } // @public (undocumented) interface InvalidateModifier { // (undocumented) [_invalidateModifier]: true; } // @public (undocumented) const _invalidateModifier: unique symbol; // @internal @deprecated (undocumented) type IsAny = 0 extends 1 & T ? true : false; // @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public export function isReference(obj: any): obj is Reference; // @public (undocumented) type KeyArgsFunction = (args: Record | null, context: { typename: string; fieldName: string; field: FieldNode | null; variables?: Record; }) => KeySpecifier | false | ReturnType; // @public (undocumented) type KeyFieldsContext = { typename: string | undefined; storeObject: StoreObject; readField: ReadFieldFunction; selectionSet?: SelectionSetNode; fragmentMap?: FragmentMap; keyObject?: Record; }; // @public (undocumented) type KeyFieldsFunction = (object: Readonly, context: KeyFieldsContext) => KeySpecifier | false | ReturnType; // @public (undocumented) type KeySpecifier = ReadonlyArray; // @public (undocumented) class Layer extends EntityStore { constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup); // (undocumented) addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) getStorage(...args: Parameters): StorageType; // (undocumented) readonly group: CacheGroup; // (undocumented) readonly id: string; // (undocumented) readonly parent: EntityStore; // (undocumented) removeLayer(layerId: string): EntityStore; // (undocumented) readonly replay: (layer: EntityStore) => any; // (undocumented) toObject(): NormalizedCacheObject; } // @public export const LinkError: { is: (error: unknown) => boolean; }; // @public (undocumented) namespace LocalState { // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // // (undocumented) type ContextFunction = (options: ContextFunctionOptions) => TContext; // (undocumented) interface ContextFunctionOptions { // (undocumented) client: ApolloClient; // (undocumented) document: DocumentNode; // (undocumented) phase: "exports" | "resolve"; // (undocumented) requestContext: DefaultContext; // (undocumented) variables: OperationVariables; } // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MaybeRequireContextFunction" needs to be exported by the entry point index.d.ts type Options = { context?: ContextFunction; resolvers?: TResolvers; } & MaybeRequireContextFunction; // (undocumented) type Path = Array; type Resolver> = (rootValue: TParent, args: TArgs, context: { requestContext: TContext; client: ApolloClient; phase: "exports" | "resolve"; }, info: { field: FieldNode; fragmentMap: FragmentMap; path: Path; }) => TResult | Promise; interface Resolvers { // (undocumented) [typename: string]: { [field: string]: Resolver; }; } // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // // (undocumented) type RootValueFunction = (context: RootValueFunctionContext) => TRootValue; // (undocumented) interface RootValueFunctionContext { // (undocumented) client: ApolloClient; // (undocumented) context: DefaultContext; // (undocumented) document: DocumentNode; // (undocumented) phase: "exports" | "resolve"; // (undocumented) variables: OperationVariables; } } // Warning: (ae-forgotten-export) The symbol "InferContextValueFromResolvers" needs to be exported by the entry point index.d.ts // // @public class LocalState, TContext = InferContextValueFromResolvers> { constructor(...[options]: {} extends TResolvers ? [ options?: LocalState.Options> ] : [ options: LocalState.Options> & { resolvers: TResolvers; } ]); addResolvers(resolvers: TResolvers): void; // (undocumented) execute({ document, client, context, remoteResult, variables, onlyRunForcedResolvers, returnPartialData, fetchPolicy, }: { document: DocumentNode | TypedDocumentNode; client: ApolloClient; context: DefaultContext | undefined; remoteResult: FormattedExecutionResult | undefined; variables: TVariables | undefined; onlyRunForcedResolvers?: boolean; returnPartialData?: boolean; fetchPolicy: WatchQueryFetchPolicy; }): Promise>; // (undocumented) getExportedVariables({ document, client, context, variables, }: { document: DocumentNode | TypedDocumentNode; client: ApolloClient; context: DefaultContext | undefined; variables: Partial>; }): Promise; } // @public (undocumented) export namespace LocalStateError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly path?: Array; } } // (undocumented) export interface Options { // (undocumented) path?: Array; // (undocumented) sourceError?: unknown; } } // @public export class LocalStateError extends Error { constructor(message: string, options?: LocalStateError.Options); static is(error: unknown): error is LocalStateError; readonly path?: Array; } // @public (undocumented) export function makeVar(value: T): ReactiveVar; // @public (undocumented) interface MaskFragmentOptions { // (undocumented) data: TData; // (undocumented) fragment: DocumentNode; // (undocumented) fragmentName?: string; } // @public (undocumented) interface MaskOperationOptions { cause?: object; // (undocumented) data: TData; // (undocumented) document: DocumentNode; // (undocumented) fetchPolicy?: WatchQueryFetchPolicy; } // @public export type MaybeMasked = ApplyHKTImplementationWithDefault; // Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts // // @public (undocumented) type MaybeRequireContextFunction = {} extends RemoveIndexSignature ? {} : { context: LocalState.ContextFunction; }; // @public (undocumented) export interface MergeInfo { // (undocumented) field: FieldNode; // (undocumented) merge: FieldMergeFunction; // (undocumented) path: Array; // (undocumented) typename: string | undefined; } // @public (undocumented) type MergeObjectsFunction = (existing: T, incoming: T) => T; // @public (undocumented) export interface MergeTree { // (undocumented) info?: MergeInfo; // (undocumented) map: Map; } // @public (undocumented) export class MissingFieldError extends Error { constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); // (undocumented) readonly message: string; // (undocumented) readonly missing: MissingTree; // (undocumented) readonly path: MissingTree | Array; // (undocumented) readonly query: DocumentNode; // (undocumented) readonly variables?: Record | undefined; } // @public (undocumented) type MissingTree = string | { readonly [key: string]: MissingTree; }; // Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts // // @public (undocumented) type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; // @public (undocumented) type ModifierDetails = { DELETE: DeleteModifier; INVALIDATE: InvalidateModifier; fieldName: string; storeFieldName: string; readField: ReadFieldFunction; canRead: CanReadFunction; isReference: typeof isReference; toReference: ToReferenceFunction; storage: StorageType; }; // @public (undocumented) type Modifiers = Record> = Partial<{ [FieldName in keyof T]: Modifier>>; }>; // @public @deprecated (undocumented) export type MutateResult = ApolloClient.MutateResult; // @public (undocumented) export type MutationFetchPolicy = Extract; // @public @deprecated (undocumented) export type MutationOptions = ApolloClient.MutateOptions; // @public (undocumented) export type MutationQueryReducer = (previousResult: Record, options: { mutationResult: NormalizedExecutionResult>; queryName: string | undefined; queryVariables: Record; }) => Record; // @public (undocumented) export type MutationQueryReducersMap = { [queryName: string]: MutationQueryReducer; }; // @public (undocumented) interface MutationStoreValue { // (undocumented) error: Error | null; // (undocumented) loading: boolean; // (undocumented) mutation: DocumentNode; // (undocumented) variables: Record; } // @public (undocumented) export type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { context?: DefaultContext; variables?: TVariables; }) => void; // @public export enum NetworkStatus { error = 8, fetchMore = 3, loading = 1, poll = 6, ready = 7, refetch = 4, setVariables = 2, streaming = 9 } // @public (undocumented) interface NextFetchPolicyContext { // (undocumented) initialFetchPolicy: WatchQueryFetchPolicy; // (undocumented) observable: ObservableQuery; // (undocumented) options: ApolloClient.WatchQueryOptions; // (undocumented) reason: "after-fetch" | "variables-changed"; } // @public @deprecated type NoInfer_2 = [T][T extends any ? 0 : never]; // @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; // (undocumented) clear(): void; // (undocumented) delete(dataId: string, fieldName?: string): boolean; // (undocumented) get(dataId: string, fieldName: string): StoreValue; // Warning: (ae-forgotten-export) The symbol "FieldValueGetter" needs to be exported by the entry point index.d.ts // // (undocumented) getFieldValue: FieldValueGetter; // (undocumented) getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; // (undocumented) has(dataId: string): boolean; // (undocumented) merge(olderId: string, newerObject: StoreObject): void; // (undocumented) merge(olderObject: StoreObject, newerId: string): void; // (undocumented) modify>(dataId: string, fields: Modifiers | AllFieldsModifier, exact: boolean): boolean; // (undocumented) release(rootId: string): number; replace(newData: NormalizedCacheObject): void; retain(rootId: string): number; toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } // @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; // (undocumented) __META?: { extraRootIds: string[]; }; } // @public export type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; // @public (undocumented) namespace NotImplementedHandler { // (undocumented) interface NotImplementedResult extends HKT { // (undocumented) arg1: unknown; // (undocumented) arg2: unknown; // (undocumented) return: never; } // (undocumented) interface TypeOverrides { // Warning: (ae-forgotten-export) The symbol "NotImplementedHandler" needs to be exported by the entry point index.d.ts // // (undocumented) AdditionalApolloLinkResultTypes: NotImplementedResult; } } // @public (undocumented) class NotImplementedHandler implements Incremental.Handler { // (undocumented) extractErrors(): void; // (undocumented) isIncrementalResult(_: any): _ is never; // (undocumented) prepareRequest(request: ApolloLink.Request): ApolloLink.Request; // (undocumented) startRequest: any; } export { Observable } // @public (undocumented) interface ObservableAndInfo { // (undocumented) fromLink: boolean; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) observable: Observable>; } // @public (undocumented) export namespace ObservableQuery { // @internal @deprecated export interface CacheWatchOptions extends Cache_2.WatchOptions { // @deprecated lastOwnDiff?: Cache_2.DiffResult; } // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface ObservableMethods { pipe(...operators: OperatorFunctionChain, OperatorResult>): Observable; subscribe(observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)): Subscription; } // (undocumented) export type OperatorFunctionChain = []; } // (undocumented) export type FetchMoreOptions = { query?: DocumentNode | TypedDocumentNode; variables?: Partial>; errorPolicy?: ErrorPolicy; context?: DefaultContext; updateQuery?: (previousQueryResult: Unmasked, options: { fetchMoreResult: Unmasked; variables: TFetchVars; }) => Unmasked; }; // (undocumented) export type Options = { fetchPolicy: WatchQueryFetchPolicy; nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); initialFetchPolicy: WatchQueryFetchPolicy; refetchWritePolicy?: RefetchWritePolicy; errorPolicy?: ErrorPolicy; context?: DefaultContext; pollInterval?: number; notifyOnNetworkStatusChange?: boolean; returnPartialData?: boolean; skipPollAttempt?: () => boolean; query: DocumentNode | TypedDocumentNode; variables: TVariables; }; // (undocumented) export type Result["dataState"] = DataState["dataState"]> = { error?: ErrorLike; loading: boolean; networkStatus: NetworkStatus; partial: boolean; } & GetDataState; export interface ResultPromise extends Promise { retain(): this; } // (undocumented) export interface SubscribeToMoreOptions { // (undocumented) context?: DefaultContext; // (undocumented) document: DocumentNode | TypedDocumentNode; // (undocumented) onError?: (error: ErrorLike) => void; // (undocumented) updateQuery?: SubscribeToMoreUpdateQueryFn; // (undocumented) variables?: TSubscriptionVariables; } } // @public (undocumented) export class ObservableQuery implements Subscribable>>, InteropObservable>> { // (undocumented) ["@@observable"]: () => Subscribable>>; // (undocumented) [Symbol.observable]: () => Subscribable>>; constructor({ queryManager, options, transformedQuery, }: { queryManager: QueryManager; options: ApolloClient.WatchQueryOptions; transformedQuery?: DocumentNode | TypedDocumentNode; queryId?: string; }); // @internal @deprecated (undocumented) applyOptions(newOptions: Partial>): void; fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; // @internal @deprecated (undocumented) getCacheDiff({ optimistic }?: { optimistic?: boolean | undefined; }): Cache_2.DiffResult; // (undocumented) getCurrentResult(): ObservableQuery.Result>; // (undocumented) hasObservers(): boolean; // @internal @deprecated _lastWrite?: unknown; // @internal @deprecated (undocumented) notify(scheduled?: boolean): void; // (undocumented) readonly options: ObservableQuery.Options; pipe: Observable>>["pipe"]; // (undocumented) get query(): TypedDocumentNode; // (undocumented) readonly queryName?: string; refetch(variables?: Partial): ObservableQuery.ResultPromise>; reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; // @internal @deprecated reset(): void; setVariables(variables: TVariables): Promise>; startPolling(pollInterval: number): void; stop(): void; stopPolling(): void; subscribe: (observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)) => Subscription; subscribeToMore(options: ObservableQuery.SubscribeToMoreOptions): () => void; updateQuery(mapFn: UpdateQueryMapFn): void; get variables(): TVariables; } // @public (undocumented) export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; // @public @deprecated (undocumented) export type Operation = ApolloLink.Operation; // @public (undocumented) export type OperationVariables = Record; // @public (undocumented) export type OptimisticStoreItem = { id: string; data: NormalizedCacheObject; transaction: Transaction; }; // @public (undocumented) namespace OverridableTypes { // (undocumented) interface Complete extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } // (undocumented) interface Defaults { // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Complete: Complete; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Partial: Partial; // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts // // (undocumented) Streaming: Streaming; } // (undocumented) interface Partial extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: DeepPartial; } // (undocumented) interface Streaming extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } } // @public (undocumented) export function parseAndCheckHttpResponse(operations: ApolloLink.Operation | ApolloLink.Operation[]): (response: Response) => Promise; // @public (undocumented) class Policies { constructor(config: { cache: InMemoryCache; dataIdFromObject?: KeyFieldsFunction; possibleTypes?: PossibleTypesMap; typePolicies?: TypePolicies; }); // (undocumented) addPossibleTypes(possibleTypes: PossibleTypesMap): void; // (undocumented) addTypePolicies(typePolicies: TypePolicies): void; // (undocumented) readonly cache: InMemoryCache; // (undocumented) fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record, variables?: Record): boolean; // (undocumented) getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction | undefined; // (undocumented) getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction | undefined; // Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts // // (undocumented) getStoreFieldName(fieldSpec: FieldSpecifier): string; // (undocumented) hasKeyArgs(typename: string | undefined, fieldName: string): boolean; // (undocumented) identify(object: StoreObject, partialContext?: Partial): [string?, StoreObject?]; // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts // // (undocumented) readField(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly | undefined; // (undocumented) readonly rootIdsByTypename: Record; // (undocumented) readonly rootTypenamesById: Record; // (undocumented) runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge, path }: MergeInfo, context: WriteContext, storage?: StorageType): any; // (undocumented) readonly usingPossibleTypes = false; } // @public (undocumented) export type PossibleTypesMap = { [supertype: string]: string[]; }; // @public (undocumented) namespace PreserveTypes { // (undocumented) type FragmentType<_TData> = never; // (undocumented) namespace HKTImplementation { // (undocumented) interface FragmentType extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: never; } // (undocumented) interface MaybeMasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } // (undocumented) interface Unmasked extends HKT { // (undocumented) arg1: unknown; // (undocumented) return: this["arg1"]; } } // (undocumented) type MaybeMasked = TData; // (undocumented) interface TypeOverrides { // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts // // (undocumented) FragmentType: HKTImplementation.FragmentType; // (undocumented) MaybeMasked: HKTImplementation.MaybeMasked; // (undocumented) Unmasked: HKTImplementation.Unmasked; } // (undocumented) type Unmasked = TData; } // @internal @deprecated (undocumented) type Prettify = { [K in keyof T]: T[K]; } & {}; // @internal @deprecated (undocumented) type Primitive = null | undefined | string | number | boolean | symbol | bigint; // @public (undocumented) namespace QueryManager { // (undocumented) type Result["dataState"] = DataState["dataState"]> = ObservableQuery.Result & { [extensionsSymbol]?: ExtensionsWithStreamInfo; }; } // @public (undocumented) class QueryManager { // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts constructor(options: QueryManagerOptions); // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) broadcastQueries(): void; // (undocumented) get cache(): ApolloCache; // (undocumented) clearStore(options?: Cache_2.ResetOptions): Promise; // (undocumented) readonly client: ApolloClient; readonly clientOptions: ApolloClient.Options; // (undocumented) readonly dataMasking: boolean; // (undocumented) readonly defaultContext: Partial; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly documentTransform: DocumentTransform; // (undocumented) protected fetchCancelFns: Map any>; // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.d.ts // // (undocumented) fetchObservableWithInfo(options: ApolloClient.WatchQueryOptions, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, exposeExtensions, }: { networkStatus?: NetworkStatus; query?: DocumentNode; fetchQueryOperator?: (source: Observable) => Observable; onCacheHit?: () => void; observableQuery?: ObservableQuery | undefined; exposeExtensions?: boolean; }): ObservableAndInfo; // (undocumented) fetchQuery(options: ApolloClient.WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; // (undocumented) generateRequestId(): number; // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts // // (undocumented) getDocumentInfo(document: DocumentNode): TransformCacheEntry; // (undocumented) getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; // (undocumented) getVariables(document: DocumentNode, variables?: TVariables): TVariables; // (undocumented) readonly incrementalHandler: Incremental.Handler; // (undocumented) protected inFlightLinkObservables: Trie<{ observable?: Observable>; restart?: () => void; }>; // (undocumented) get link(): ApolloLink; // (undocumented) localState: LocalState | undefined; // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts // // (undocumented) maskFragment(options: MaskFragmentOptions): TData; // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts // // (undocumented) maskOperation(options: MaskOperationOptions): MaybeMasked; // (undocumented) mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: ApolloClient.MutateOptions & { errorPolicy: ErrorPolicy; fetchPolicy: MutationFetchPolicy; }): Promise>>; // (undocumented) mutationStore?: { [mutationId: string]: MutationStoreValue; }; obsQueries: Set>; prioritizeCacheValues: boolean; // (undocumented) query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) refetchObservableQueries(includeStandby?: boolean): Promise[]>; // (undocumented) refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; // (undocumented) readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription(options: ApolloClient.SubscribeOptions): SubscriptionObservable>; stop(): void; // (undocumented) transform(document: DocumentNode): DocumentNode; // (undocumented) watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; } // @public (undocumented) interface QueryManagerOptions { // (undocumented) assumeImmutableResults: boolean; // (undocumented) client: ApolloClient; // (undocumented) clientOptions: ApolloClient.Options; // (undocumented) dataMasking: boolean; // (undocumented) defaultContext: Partial | undefined; // (undocumented) defaultOptions: ApolloClient.DefaultOptions; // (undocumented) documentTransform: DocumentTransform | null | undefined; // (undocumented) incrementalHandler: Incremental.Handler; // (undocumented) localState: LocalState | undefined; // (undocumented) onBroadcast: undefined | (() => void); // (undocumented) queryDeduplication: boolean; // (undocumented) ssrMode: boolean; } // @public (undocumented) namespace QueryNotification { // (undocumented) type FromCache = NextNotification> & { source: "cache"; }; // (undocumented) type FromNetwork = ObservableNotification> & { source: "network"; }; // (undocumented) type NewNetworkStatus = NextNotification<{ resetError?: boolean; }> & { source: "newNetworkStatus"; }; // (undocumented) type SetResult = NextNotification> & { source: "setResult"; }; // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; } // @public @deprecated (undocumented) export type QueryOptions = ApolloClient.QueryOptions; // @public (undocumented) type ReactiveListener = (value: T) => any; // @public (undocumented) export interface ReactiveVar { // (undocumented) (newValue?: T): T; // (undocumented) attachCache(cache: ApolloCache): this; // (undocumented) forgetCache(cache: ApolloCache): boolean; // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts // // (undocumented) onNextChange(listener: ReactiveListener): () => void; } // @public (undocumented) interface ReadFieldFunction { // (undocumented) (options: ReadFieldOptions): SafeReadonly | undefined; // (undocumented) (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; } // @public (undocumented) interface ReadFieldOptions extends FieldSpecifier { // (undocumented) from?: StoreObject | Reference; } // @public (undocumented) export interface ReadMergeModifyContext { // (undocumented) extensions?: ExtensionsWithStreamInfo; // (undocumented) store: NormalizedCache; // (undocumented) variables?: OperationVariables; // (undocumented) varString?: string; } // @public (undocumented) export type ReadQueryOptions = { store: NormalizedCache; query: DocumentNode; variables?: Object; previousResult?: any; rootId?: string; config?: ApolloReducerConfig; }; // @public export interface Reference { // (undocumented) readonly __ref: string; } // @public (undocumented) export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) type RefetchQueriesIncludeShorthand = "all" | "active"; // @public @deprecated (undocumented) export type RefetchQueriesOptions = ApolloClient.RefetchQueriesOptions; // @public (undocumented) export type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? ApolloClient.QueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; // @public @deprecated (undocumented) export type RefetchQueriesResult = ApolloClient.RefetchQueriesResult; // @public (undocumented) export type RefetchQueryDescriptor = string | DocumentNode; // @public (undocumented) export type RefetchWritePolicy = "merge" | "overwrite"; // @internal @deprecated (undocumented) type RemoveIndexSignature = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; }; // @public @deprecated (undocumented) export type RequestHandler = ApolloLink.RequestHandler; export { resetCaches } // @public (undocumented) export function rewriteURIForGET(chosenURI: string, body: BaseHttpLink.Body): { parseError: unknown; newURI?: undefined; } | { newURI: string; parseError?: undefined; }; // @public (undocumented) class Root extends EntityStore { constructor({ policies, resultCaching, seed, }: { policies: Policies; resultCaching?: boolean; seed?: NormalizedCacheObject; }); // (undocumented) addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; // (undocumented) getStorage(): StorageType; // (undocumented) removeLayer(): Root; // (undocumented) readonly storageTrie: Trie; // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts // // (undocumented) readonly stump: Stump; } // @public (undocumented) type SafeReadonly = T extends object ? Readonly : T; // Warning: (ae-forgotten-export) The symbol "HttpConfig" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function selectHttpOptionsAndBody(operation: ApolloLink.Operation, fallbackConfig: HttpConfig, ...configs: Array): { options: HttpConfig & Record; body: BaseHttpLink.Body; }; // @public (undocumented) export function selectHttpOptionsAndBodyInternal(operation: ApolloLink.Operation, printer: BaseHttpLink.Printer, ...configs: HttpConfig[]): { options: HttpConfig & Record; body: BaseHttpLink.Body; }; // @public (undocumented) export const selectURI: (operation: ApolloLink.Operation, fallbackURI?: string | ((operation: ApolloLink.Operation) => string)) => any; // @public (undocumented) export namespace ServerError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly bodyText: string; readonly response: Response; readonly statusCode: number; } } // (undocumented) export interface Options { // (undocumented) bodyText: string; // (undocumented) response: Response; } } // @public export class ServerError extends Error { constructor(message: string, options: ServerError.Options); readonly bodyText: string; static is(error: unknown): error is ServerError; readonly response: Response; readonly statusCode: number; } // @public (undocumented) export namespace ServerParseError { // (undocumented) export namespace DocumentationTypes { // (undocumented) export interface InstanceProperties { readonly bodyText: string; readonly response: Response; readonly statusCode: number; } } // (undocumented) export interface Options { // (undocumented) bodyText: string; // (undocumented) response: Response; } } // @public export class ServerParseError extends Error { constructor(originalParseError: unknown, options: ServerParseError.Options); readonly bodyText: string; static is(error: unknown): error is ServerParseError; readonly response: Response; readonly statusCode: number; } // Warning: (ae-forgotten-export) The symbol "VerbosityLevel" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function setLogVerbosity(level: VerbosityLevel): VerbosityLevel; // @public @deprecated (undocumented) export const split: typeof ApolloLink.split; // @public (undocumented) type StorageType = Record; // @public export interface StoreObject { // (undocumented) [storeFieldName: string]: StoreValue; // (undocumented) __typename?: string; } // Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts // // @public (undocumented) type StoreObjectValueMaybeReference = StoreVal extends ReadonlyArray> ? StoreVal extends ReadonlyArray ? [ Item ] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; // @public export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; // @public const streamInfoSymbol: unique symbol; // @internal @deprecated (undocumented) type StreamInfoTrie = Trie<{ current: Incremental.StreamFieldInfo; previous?: { incoming: unknown; streamFieldInfo: Incremental.StreamFieldInfo; result: unknown; }; }>; // @public (undocumented) class Stump extends Layer { constructor(root: Root); // (undocumented) merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } // @public (undocumented) export interface SubscribeToMoreFunction { // (undocumented) (options: ObservableQuery.SubscribeToMoreOptions): () => void; } // @public @deprecated (undocumented) export type SubscribeToMoreOptions = ObservableQuery.SubscribeToMoreOptions; // @public (undocumented) export type SubscribeToMoreUpdateQueryFn = { ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { subscriptionData: { data: Unmasked; }; }): Unmasked | void; }; // @public export interface SubscriptionObservable extends Observable { restart: () => void; } // @public @deprecated (undocumented) export type SubscriptionOptions = ApolloClient.SubscribeOptions; // @public (undocumented) type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; // @public (undocumented) export type Transaction = (c: ApolloCache) => void; // @public (undocumented) interface TransformCacheEntry { // (undocumented) asQuery: DocumentNode; // (undocumented) clientQuery: DocumentNode | null; // (undocumented) defaultVars: OperationVariables; // (undocumented) hasClientExports: boolean; // (undocumented) hasForcedResolvers: boolean; // (undocumented) hasIncrementalDirective: boolean; // (undocumented) hasNonreactiveDirective: boolean; // (undocumented) nonReactiveQuery: DocumentNode; // (undocumented) operationType: OperationTypeNode | undefined; // (undocumented) serverQuery: DocumentNode | null; // (undocumented) violation?: Error | undefined; } // @public (undocumented) type TransformFn = (document: DocumentNode) => DocumentNode; export { TypedDocumentNode } // @public (undocumented) export interface TypeOverrides { } // @public (undocumented) export type TypePolicies = { [__typename: string]: TypePolicy; }; // @public (undocumented) export type TypePolicy = { keyFields?: KeySpecifier | KeyFieldsFunction | false; merge?: FieldMergeFunction | boolean; queryType?: true; mutationType?: true; subscriptionType?: true; fields?: { [fieldName: string]: FieldPolicy | FieldReadFunction; }; }; // @public export class UnconventionalError extends Error { constructor(errorType: unknown); static is(error: unknown): error is UnconventionalError; } // @public export type Unmasked = ApplyHKTImplementationWithDefault; // @public (undocumented) export interface UpdateQueryMapFn { // (undocumented) ( unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; } // @public (undocumented) export type UpdateQueryOptions = { variables?: TVariables; } & ({ complete: true; previousData: Unmasked; } | { complete: false; previousData: DeepPartial> | undefined; }); // @internal @deprecated (undocumented) type VariablesOption = {} extends TVariables ? { variables?: TVariables; } : { variables: TVariables; }; // @internal @deprecated const variablesUnknownSymbol: unique symbol; // Warning: (ae-forgotten-export) The symbol "verbosityLevels" needs to be exported by the entry point index.d.ts // // @public (undocumented) type VerbosityLevel = (typeof verbosityLevels)[number]; // @public (undocumented) const verbosityLevels: readonly ["debug", "log", "warn", "error", "silent"]; // @public (undocumented) export const version: string; // @public @deprecated (undocumented) export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; // @public @deprecated (undocumented) export type WatchFragmentResult = ApolloCache.WatchFragmentResult; // @public (undocumented) export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network" | "standby"; // @public @deprecated (undocumented) export type WatchQueryOptions = ApolloClient.WatchQueryOptions; // @public (undocumented) interface WriteContext extends ReadMergeModifyContext { // (undocumented) clientOnly: boolean; // (undocumented) deferred: boolean; // Warning: (ae-forgotten-export) The symbol "FlavorableWriteContext" needs to be exported by the entry point index.d.ts // // (undocumented) flavors: Map; // (undocumented) readonly fragmentMap: FragmentMap; // (undocumented) incomingById: Map; }>; // Warning: (ae-forgotten-export) The symbol "FragmentMapFunction" needs to be exported by the entry point index.d.ts // // (undocumented) lookupFragment: FragmentMapFunction; // (undocumented) merge(existing: T, incoming: T): T; // (undocumented) overwrite: boolean; // (undocumented) readonly written: { [dataId: string]: SelectionSetNode[]; }; } // Warnings were encountered during analysis: // // src/cache/core/cache.ts:126:11 - (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:101:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:173:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:173:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/types.ts:135:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ApolloClient.ts:173:5 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // src/core/ApolloClient.ts:375:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:371:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:195:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/local-state/LocalState.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/local-state/LocalState.ts:202:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/local-state/LocalState.ts:245:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/utilities/internal/types/ExtensionsWithStreamDetails.ts:11:5 - (ae-forgotten-export) The symbol "StreamInfoTrie" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) ``` ================================================ FILE: .attw.json ================================================ { "ignoreRules": ["false-esm", "cjs-resolves-to-esm"] } ================================================ FILE: .changeset/README.md ================================================ # Changesets Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets) We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) ================================================ FILE: .changeset/config.json ================================================ { "$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json", "changelog": [ "@changesets/changelog-github", { "repo": "apollographql/apollo-client" } ], "commit": false, "fixed": [], "linked": [], "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] } ================================================ FILE: .circleci/config.yml ================================================ version: 2.1 jobs: # Filesize: # docker: # - image: cimg/node:20.2.0 # steps: # - checkout # - run: npm version # - run: npm ci # - run: npm run bundlesize Circularity: docker: - image: cimg/node:23.7.0 steps: - checkout - run: npm version - run: npm ci - run: npm run madge Publint: docker: - image: cimg/node:23.7.0 steps: - checkout - run: npm version - run: npm ci - run: npm run build - run: npm run publint Lint: docker: - image: cimg/node:23.9.0 steps: - checkout - run: npm version - run: npm ci - run: npm run docmodel - run: npm run build - run: npm run lint Formatting: docker: - image: cimg/node:23.9.0 steps: - checkout - run: npm ci - run: npm run check:format Tests: docker: - image: cimg/node:23.9.0 parameters: project: type: string steps: - checkout - run: npm run ci:precheck - run: npm version - run: npm ci - run: npm run build - run: npm run typecheck - run: if test "<< parameters.project >>" = "Core Tests"; then npm run test:memory; fi - run: name: Jest suite with coverage command: npm run test:ci -- --selectProjects "<< parameters.project >>" environment: JEST_JUNIT_OUTPUT_FILE: "reports/junit/js-test-results-<< parameters.project >>.xml" - store_test_results: path: reports/junit - store_artifacts: path: reports/junit Attest: docker: - image: cimg/node:23.9.0 steps: - checkout - run: npm ci - run: npm run test:type-benches BuildTarball: docker: - image: cimg/node:23.9.0 steps: - checkout - run: npm run ci:precheck - run: npm version - run: npm ci - run: npm run build && cd dist && mv "$(npm pack --json | jq --raw-output '.[0].filename')" apollo-client.tgz - persist_to_workspace: root: dist paths: - apollo-client.tgz IntegrationTests: parameters: framework: type: string react: type: string docker: - image: cimg/node:23.9.0-browsers steps: - checkout - attach_workspace: at: /tmp/workspace - run: pnpm version - run: command: pnpm pkg set "pnpm.overrides[@apollo/client]=/tmp/workspace/apollo-client.tgz" working_directory: integration-tests - run: command: | export VERSION=$(pnpm view react@<< parameters.react >> version) pnpm pkg set "pnpm.overrides[react]=${VERSION}" "pnpm.overrides[react-dom]=${VERSION}" working_directory: integration-tests - run: command: pnpm run --if-present --filter << parameters.framework >> ci-preparations working_directory: integration-tests - run: command: pnpm install --no-frozen-lockfile working_directory: integration-tests - run: command: cat pnpm-lock.yaml working_directory: integration-tests - run: command: pnpm exec playwright install-deps working_directory: integration-tests - run: command: pnpm exec playwright install working_directory: integration-tests - run: command: pnpm run --if-present --filter << parameters.framework >> build working_directory: integration-tests - run: command: pnpm run --if-present --filter << parameters.framework >> "/test(:.*|$)/" working_directory: integration-tests TestPeerDepTypes: parameters: externalPackage: type: string docker: - image: cimg/node:23.9.0 steps: - checkout - attach_workspace: at: /tmp/workspace - run: working_directory: integration-tests/peerdeps-tsc command: | npm install npm install @apollo/client@/tmp/workspace/apollo-client.tgz npm install << parameters.externalPackage >> npm test workflows: Build and Test: jobs: # - Filesize - Tests: matrix: parameters: project: [ "Core Tests", "Core Tests - RxJS min version", "ReactDOM 17", "ReactDOM 18", "ReactDOM 19", ] - Circularity - Publint - Attest - Formatting - Lint - BuildTarball - IntegrationTests: name: Integration Test << matrix.framework >> with React << matrix.react >> requires: - BuildTarball matrix: parameters: framework: - cra5 #- next - node - vite - vite-swc - wrapping-library # -browser-esm would need a package publish to npm/CDNs react: - "18.3.0" - latest - next exclude: # CRA only works with React 18 - framework: cra5 react: next - framework: cra5 react: latest # next ships it's own React version anyways - framework: next react: next - framework: next react: "18.3.0" # node doesn't use React in the tests - framework: node react: next - framework: node react: "18.3.0" - TestPeerDepTypes: name: Test external types for << matrix.externalPackage >> requires: - BuildTarball matrix: parameters: externalPackage: - "graphql@15" - "graphql@16" - "graphql@^17.0.0-alpha" - "@types/react@17 @types/react-dom@17" - "@types/react@18 @types/react-dom@18" - "@types/react@19 @types/react-dom@19" - "typescript@next" ================================================ FILE: .claude/commands/chores.md ================================================ --- allowed-tools: Bash(git commit:*) description: Chores --- ## Context - Current git status: !`git status` - Current git diff (staged and unstaged changes): !`git diff HEAD` - Current branch: !`git branch --show-current` - Recent commits: !`git log --oneline -10` ## Your task Fetch the latest changes from the remote repository. If the current branch is not up to date, don't do anything, but inform the user about it. Take a note if the current git status is clean. Run the npm scripts `format`, `build`, `extract-api:only`, `update-size-limits` after each other in that order. If before running the scripts, the git status was clean, create a new commit with the message "chores". ================================================ FILE: .claude/documentation.md ================================================ # Documentation specific instructions Documentation can be found in the `docs/` directory and in the `src/` directory as DocBlocks. ## Data sources See @docs/source/\_sidebar.yaml for the documentation structure. DocBlocks can contain comments in the form `{@inheritDoc @apollo/client!QueryOptionsDocumentation#query:member}` to (in this example) include the DocBlock of the `query` member on the `QueryOptionsDocumentation` interface. `@apollo/client!QueryOptionsDocumentation#query:member` is called a "canonical reference" and is used to uniquely identify a DocBlock. An accumulation of all DocBlocks and their canonical references can be found in @docs/public/client.api.json. This file is generated from the source code by running `npm run docmodel`. All .json files in the `docs/public/` directory are autogenerated. They can be read, but not modified. Instead, the respective source files in the `src/` directory should be modified, and the JSON file should be regenerated by running `npm run docmodel`. ## DocBlock inheritance If possible, DocBlocks should not repeat other DocBlocks in other places, but use `@inheritDoc` annotations. For every DocBlock, before adding text, the existing DocBlocks in @src/react/types/types.documentation.ts and @src/utilities/internal/types/DocumentationTypes.ts should always be checked and if possible referenced. ## Available components For components that can be used in `.mdx` files, reference @docs/shared/MdxProvidedComponents.ts ## Documentation Guidelines ### Tone Documentation should be written in an approachable, positive, and encouraging tone. It should be helpful and opinionated. The goal is to make the documentation easy to understand and follow, while also providing clear guidance on best practices. The target audience is JavaScript and TypeScript developers of all skill levels with different native language backgrounds, so the documentation should be accessible to non-native English speakers as well. Nested sentences and complex non-domain-specific vocabulary should be avoided where possible. At no point should the documentation be sarcastic, condescending or dismissive of the reader's knowledge or experience. Spelling and grammar should follow American English conventions. Content should be framed towards the reader in an active voice (e.g. "You can use the `useQuery` hook to fetch data" instead of "The `useQuery` hook can be used to fetch data"). Passive voice can be used to describe the behavior of the library (e.g. "The `useQuery` hook returns an object containing the query result") as a result of userland code usage. The use of "we" should be avoided, unless it is used to refer to the Apollo Client team as a whole (e.g. "We recommend using fragment colocation and data masking."). ### Change documentation - CRITICAL RULE **NEVER reference changes, previous versions, or historical behavior in documentation.** Documentation must ONLY describe the current state of the library. FORBIDDEN phrases and patterns: - "previously" or "previous behavior" - "has been restructured" or "has been changed" - "now takes" or "now provides" - "in earlier versions" - "used to be" or "was changed" - Any reference to what something was like before CORRECT approach: - Describe how things work today - State what the current behavior is - Explain the current API without comparing to past versions If new features are added to the documentation, they can include a `` tag wrapping the headline of the new feature, to indicate that this feature is only available in Apollo Client 3.10.0 and later. For features that are introduced in a major version, the `` tag should not be used, as for each major version, a separate copy of the documentation is maintained. Currently, this documentation copy is the copy for Apollo Client with the major version 4, so all references to previous versions can be removed. Never use phrases like "since version 4.0, this or that change applied". Only document the current state of the library, not its history. ### Prefer describing certain APIs over others. - When having a choice, describe the state of the `dataState` property instead of mentioning `partial`. - In many cases, be more specific about the `networkStatus` that can be observed instead of using the `loading` property. In some cases it can make sense to mention both. ### Updating DocBlocks If outdated or incorrect documentation is found in `docs/public/client.api.json`, find the closest parent `fileUrlPath` in the JSON structure and update the original DocBlock in that file. Then run `npm run docmodel` to regenerate the JSON file and read the `docs/public/client.api.json` again. ### DocBlock Guidelines - Use `@template` to document TypeScript generics, not `@param` - Example: `@template TData - The type of data returned by the query` - Use `@param` only for actual function parameters - Use `@returns` to document return values - Use `@defaultValue` to document default values for properties in interfaces describing options - Use `@example` for code examples ================================================ FILE: .claude/hooks.md ================================================ # React Hooks React Hooks can be found in the `src/react/hooks` directory. This folder contains React Hooks and their associated types, as well as documentation for each hook in DocBlocks, always colocated in one file per hook. ## Hooks Type Structure Types for the React Hooks are held in the same file as the hook itself. They follow this structure: In this example, single-line comments (with `//`) are used to annotate and explain the example while DocBlocks (with `/** ... */`) are part of the actual structure that is present in the files. ```ts // A namespace with the hook's name that contains all types related to the hook export declare namespace useMyHook { // an `Options` interface export interface Options { // ... } // a `Result` interface export interface Result { // ... } // A namespace for documentation types, which are simplified versions of the hook's types. // This is necessary because we can only reference interfaces and function signatures in the Documentation, not complex types. export namespace DocumentationTypes { // The `DocumentationTypes` namespace always contains a simplified version of the hook for documentation purposes. // The function signature for documentation, which inherits documentation from the first signature of the actual hook /** {@inheritDoc @apollo/client!useMyHook:function(1)} */ export function useMyHook(options: useMyHook.Options): useMyHook.Result; } } // All overload signatures for the hook // The first hook signature contains the documentation /** * Documentation for the hook. */ function useMyHook( options: useMyHook.Options & SomeSpecifyingType ): useMyHook.Result & SomeRestrictingType; // The second and all subsequent signatures don't contain the full documentation, but only a DocBlock with a `@inheritDoc` tag. /** {@inheritDoc @apollo/client!useMyHook:function(1)} */ function useMyHook( options: useMyHook.Options & SomeOtherSpecifyingType ): useMyHook.Result & SomeOtherRestrictingType; // The hook implementation at the bottom. This one doesn't have a DocBlock. export function useMyHook(options: useMyHook.Options): useMyHook.Result { // Implementation here } ``` If the `Options`, `Result` or any other documented type is not an interface, but a more complex type, common properties are extracted into a `useMyHook.Base` namespace. Then, another interface with a simplified version of the non-common properties is created in the `DocumentationTypes` namespace, in a sub-namespace that shares the hook name. Both the "real" type in the `useMyHook` namespace and the simplified interface version in the `DocumentationTypes.useMyHook` namespace inherit from the common properties interface in the `useMyHook.Base` namespace. If the `Options` type would be more complicated, e.g. ```ts export namespace useMyHook { export type Options = { commonProperty: string; } & (T extends SomeType ? { someProperty: string } : { someProperty?: never }); } ``` the result would look like this: ```ts export namespace useMyHook { export namespace Base { export interface Options { commonProperty: string; } } export type Options = useMyHook.Base.Options & SomeComplexType; export namespace DocumentationTypes { namespace useMyHook { export interface Options extends Base.Options { someProperty?: string; } } } // the rest of the structure continues as before export interface Result { // ... } } ``` When types are simple interfaces, the nested namespace structure may not be necessary, and the types can be referenced directly in the function signature by `useMyHook.InterfaceName`. However, when dealing with complex types, the nested namespace pattern as shown above is commonly used. Note that if this is necessary for multiple types, the nested namespace definition should not be merged in one place, but just repeated for each type. So it could look like this in the end: ```ts export namespace useMyHook { export namespace Base { export interface Options { // ... } } export type Options = useMyHook.Base.Options & SomeComplexType; export namespace DocumentationTypes { namespace useMyHook { export interface Options extends Base.Options { // ... } } } export namespace Base { export interface Result { // ... } } export type Result = useMyHook.Base.Result & SomeOtherComplexType; export namespace DocumentationTypes { namespace useMyHook { export interface Result extends Base.Result { // ... } } } // other types export namespace DocumentationTypes { export function useMyHook(options: useMyHook.Options): useMyHook.Result; } } ``` ## Additional Implementation Details Some hooks may have more complex implementations with multiple function overloads that use specific type constraints. For example, a hook might have several overloads with different combinations of options that affect the resulting types. These overloads allow TypeScript to narrow the return type based on the specific options passed. The number and complexity of these overloads varies by hook based on its specific requirements. ## Internal Function Implementation Pattern Some hooks use a pattern where the exported function is a wrapper around an internal implementation function. For example: ```ts export function useMyHook(...args) { return wrapHook( "useMyHook", useMyHook_ // Internal implementation function // ... other setup )(...args); } function useMyHook_(...args) { // Actual implementation } ``` This pattern allows for hook implementations to be overwritten by the `ApolloClient` instance of the `ApolloProvider`, which allows for custom behaviour e.g. during SSR. Every hook using this pattern needs to be added to the `WrappableHooks` interface in `src/react/hooks/internal/wrapHook.ts`. ## Simple Hooks Not all hooks follow the complex namespace pattern. Simple hooks that take minimal parameters and return straightforward values (like `useApolloClient` or `useReactiveVar`) are implemented as plain functions without namespaces or complex type structures. This is appropriate when: - The hook has no or minimal configuration options - The return type is simple and can be described as a single interface or primitive type - There's no need for documentation type simplification ## Additional Type Patterns ### Self-import Pattern In some cases, a self-import pattern is allowed to access the outer `useMyHook` namespace within the `DocumentationTypes.useMyHook` namespace. This might be necessary to avoid shadowing of the `useMyHook` identifier. ```ts export declare namespace useMyHook { import _self = useMyHook; // Now can use _self.Options instead of useMyHook.Options } ``` ### Conditional Parameters Hooks may use conditional types in their parameters to make options required or optional based on generic types: ```ts export function useMyHook( query: DocumentNode, ...[options]: {} extends TVariables ? [options?: useMyHook.Options] : [options: useMyHook.Options] ): useMyHook.Result; ``` ### Result Tuples Some hooks (like `useLazyQuery` and `useMutation`) return tuples instead of single objects: ```ts export declare namespace useMyHook { export type Result = [ executeFunction: (options?: Options) => Promise, result: QueryResult, ]; } ``` ### "use no memo" Directive Some hook implementations include a `"use no memo";` directive at the beginning of the function body to indicate React Compiler optimization hints. ### Utility Documentation Types When hooks need to extend or compose with common utility types in their documentation interfaces, they import and use `UtilityDocumentationTypes` from the utilities package: ```ts import type { DocumentationTypes as UtilityDocumentationTypes, // ... other imports } from "@apollo/client/utilities/internal"; export namespace useMyHook { // ... types ... export namespace DocumentationTypes { namespace useMyHook { export interface Options extends Base.Options, UtilityDocumentationTypes.VariableOptions {} export interface Result extends Base.Result, UtilityDocumentationTypes.DataState {} } } } ``` Common utility documentation types include: - `VariableOptions` - For GraphQL variables options - `DataState` - For data state properties in query results - `ApolloQueryResult` - For complete query result types including loading, error, and data states ================================================ FILE: .claude/settings.json ================================================ { "permissions": { "allow": [ "Bash(git add:*)", "Bash(git fetch:*)", "Bash(git status:*)", "Bash(git diff:*)", "Bash(npm run:*)", "Edit(docs/**)", "Edit(src/**)" ], "deny": [] } } ================================================ FILE: .git-blame-ignore-revs ================================================ # format "ObservableQuery" test 0a67647b73abd94b706242f32b88d21a1400ad50 # format "ObservableQuery" test (in #10597) 104bf11765b1db50292f9656aa8fe48e2d749a83 # format changes from ee0b4ae f7890ae96a3ba900d3de9bf8b23254bcfba18a25 # Format "DisplayClientError.js" (#10909) 0cb68364f2c3828badde8c74de44e9c1864fb6d4 # Format `react` folder, upgrade to prettier 3.0 (#11111) ba3e7d9fa7d46e4c636148bbf01552833db0ceda # Format all non-docs files with prettier (#11170) 352c4a9ad4d140d58850688bd1b2d5513f62c6cb # Format remaining files from #11170 (#11185) 994ae91f16ea4c8ee28818bd7eaac47e4765c660 ================================================ FILE: .gitattributes ================================================ * text=auto eol=lf ================================================ FILE: .github/CODEOWNERS ================================================ * @apollographql/client-typescript /docs/ @apollographql/docs ================================================ FILE: .github/ISSUE_TEMPLATE/bug.yml ================================================ name: Bug description: File a bug report body: - type: markdown attributes: value: "Hello from the Apollo Client team! Hopefully we can help resolve your issue. To increase the chances of us being able to help, please take the time to fill out the form as completely as possible. A minimal, runnable reproduction is the best way to get us to help you quickly and in many cases we simply cannot help without one." - type: textarea attributes: label: Issue Description description: Describe the issue you are experiencing. validations: required: false - type: input attributes: label: Link to Reproduction description: "A link with runnable reproduction. For web projects, you can fork our `react-apollo-error-template` to create one via [GitHub repository](https://github.com/apollographql/react-apollo-error-template) or [CodeSandbox](https://codesandbox.io/s/github/apollographql/react-apollo-error-template). For React Native projects, you can fork our `rn-apollo-client-testbed` via [GitHub respository](https://github.com/apollographql/rn-apollo-client-testbed). Make sure this includes everything necessary (`package.json`, `tsconfig.json`, etc.) so we don't have to guess anything! If a minimal reproduction can't be created, please share a [Replay](https://docs.replay.io/workflows/recording-bug-reports) of the bug (note: you don't have to grant Replay access to a private repo to create a recording, but it will contain source maps for your JavaScript code). Feel free to ask for an email address to send Replays to if they contain sensitive information." validations: required: true - type: textarea attributes: label: Reproduction Steps description: Please provide any additional non-trivial steps required to reproduce the issue. validations: required: false - type: input attributes: label: "`@apollo/client` version" description: "What version of Apollo Client are you running?" placeholder: "ex: 3.8.10" validations: required: true ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request.md ================================================ --- name: 🚀 Feature Request about: Feature requests are managed in the Apollo Feature Request repo (https://github.com/apollographql/apollo-feature-requests). --- Thanks for your interest in helping make Apollo Client better! Feature requests and non-bug related discussions are no longer managed in this repo. Feature requests should be opened in https://github.com/apollographql/apollo-feature-requests. ================================================ FILE: .github/ISSUE_TEMPLATE/question-discussion.md ================================================ --- name: 🤗 Question / Discussion about: Questions / discussions are best posted in our community forums or StackOverflow. --- Need help or want to talk all things Apollo Client? Issues here are reserved for bugs, but one of the following resources should help: - Apollo GraphQL community forums: https://community.apollographql.com - StackOverflow (`apollo-client` tag): https://stackoverflow.com/questions/tagged/apollo-client - Apollo Feature Request repo: https://github.com/apollographql/apollo-feature-requests ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ================================================ FILE: .github/dependabot.yml ================================================ # Please see the documentation for all configuration options: # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "npm" directory: "/" schedule: interval: "weekly" # Disable @dependabot (except for security updates) because we use @renovate instead open-pull-requests-limit: 0 ================================================ FILE: .github/instructions/apollo-client.instructions.md ================================================ --- applyTo: "**" --- # Apollo Client Skill Usage Instructions ## When to Use the Apollo Client Skill Use the `apollo-client` skill when: 1. **Answering questions about Apollo Client** - Any question related to Apollo Client setup, configuration, usage, or troubleshooting 2. **Reviewing documentation** - When reviewing documentation PRs or content related to Apollo Client 3. **Reviewing documentation-like content** - Including: - Markdown files (`.md`, `.mdx`) - JSDoc/TSDoc docblocks (`/** ... */`) - Code comments intended for end users - README files - API documentation 4. **Integration questions** - Questions about integrating Apollo Client with frameworks like Next.js, TanStack Start, or React Router ## Important Notes - The skill is trained on Apollo Client 4.x, so it provides current patterns - The skill is opinionated, so it is a good guide for best practices, but documentation might show alternative approaches - this is valid - Always prefer the skill's guidance over general knowledge for Apollo Client questions - The skill includes official Apollo documentation patterns and best practices - Use the skill even for seemingly simple questions to ensure accuracy ================================================ FILE: .github/workflows/api-extractor.yml ================================================ name: Api Extractor on: pull_request concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: api-extractor: name: Api-Extractor runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 # Builds the library and runs the api extractor - name: Run Api-Extractor run: npm run extract-api ================================================ FILE: .github/workflows/arethetypeswrong.yml ================================================ name: AreTheTypesWrong on: pull_request: branches: - main - release-* concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: arethetypeswrong: name: Are the types wrong runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run build run: npm run build - name: Run AreTheTypesWrong id: attw run: ./node_modules/.bin/attw --format ascii --pack dist > $GITHUB_STEP_SUMMARY ================================================ FILE: .github/workflows/change-prerelease-tag.yml ================================================ name: Change Prerelease Tag on: workflow_dispatch: inputs: branch: description: "Branch name" type: string default: "release-" required: true tag: description: "New tag name" type: string default: "rc" required: true jobs: change_prerelease_tag: name: Changesets Update Prerelease Tag runs-on: ubuntu-latest # Allow GITHUB_TOKEN to have write permissions permissions: contents: write steps: - uses: actions/create-github-app-token@v1 id: github-actions-bot-app-token with: app-id: 819772 private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} # Check out the repository, using the Github Actions Bot app's token so # that we can push later. - name: Checkout repo uses: actions/checkout@v6 with: token: ${{ steps.github-actions-bot-app-token.outputs.token }} # Checkout release branch entered when workflow was kicked off ref: ${{ github.event.inputs.branch }} # Fetch entire git history so Changesets can generate changelogs # with the correct commits fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Write latest version to package.json and package-lock.json run: | version=$(npm show @apollo/client version) npm pkg set version="$version" npm i - name: Update prerelease tag in .changeset/pre.json uses: restackio/update-json-file-action@2.1 with: file: .changeset/pre.json fields: '{"tag": "${{github.event.inputs.tag}}"}' - name: Commit and push changes env: TAG: ${{ github.event.inputs.tag }} run: | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git add -A git commit -m "Prepare for "$TAG" release" git push ================================================ FILE: .github/workflows/cleanup-checks.mjs ================================================ // @ts-check /** @param {import('@actions/github-script').AsyncFunctionArguments} AsyncFunctionArguments */ export function setup({ context, github }) { return { async add_cleanup_label() { await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, labels: ["auto-cleanup"], }); }, }; } ================================================ FILE: .github/workflows/cleanup-checks.yml ================================================ name: Clean up Prettier, Size-limit, and Api-Extractor on: pull_request: pull_request_review: types: [submitted, edited] jobs: add_cleanup_label: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-when-a-pull-request-is-approved if: | github.repository == 'apollographql/apollo-client' && github.event.review.state == 'APPROVED' && github.event.review.author_association == 'MEMBER' && contains(github.event.pull_request.labels.*.name, 'auto-cleanup') == false runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: add label uses: actions/github-script@v8.0.0 with: script: | const script = (await import('${{ github.workspace }}/.github/workflows/cleanup-checks.mjs')).setup({context,core,github,exec,glob,io}) await script.add_cleanup_label() cleanup: if: | github.repository == 'apollographql/apollo-client' && contains(github.event.pull_request.labels.*.name, 'auto-cleanup') runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run Api-Extractor run: npm run extract-api env: CI: "false" - name: Run prettier run: npm run format - name: Run build run: npm run build - name: Update size-limit run: npm run update-size-limits - name: Commit changes back uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: "Clean up Prettier, Size-limit, and Api-Extractor" push_options: "" skip_dirty_check: false ================================================ FILE: .github/workflows/close-stale-issues.yml ================================================ # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. # # You can adjust the behavior by modifying this file. # For more information, see: # https://github.com/actions/stale name: Mark stale issues and pull requests on: schedule: - cron: "15 5 * * *" jobs: stale: # Prevents action from running on forks if: github.repository == 'apollographql/apollo-client' runs-on: ubuntu-latest permissions: issues: write pull-requests: write steps: - name: Close Stale Issues uses: actions/stale@v10.1.0 with: # # Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`. # repo-token: # optional, default is ${{ github.token }} # # The message to post on the issue when tagging it. If none provided, will not mark issues stale. #. stale-issue-message: # optional # # The message to post on the pull request when tagging it. If none provided, will not mark pull requests stale. # stale-pr-message: # optional # The message to post on the issue when closing it. If none provided, will not comment when closing an issue. close-issue-message: "We're closing this issue now but feel free to ping the maintainers or open a new issue if you still need support. Thank you!" # # The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests. # close-pr-message: # optional # The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically. days-before-stale: -1 # The number of days old an issue can be before marking it stale. Set to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding only the issues. days-before-issue-stale: -1 # The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests. days-before-pr-stale: -1 # The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests. days-before-close: -1 # The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues. days-before-issue-close: 30 # The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests. days-before-pr-close: -1 # The label to apply when an issue is stale. stale-issue-label: "🏓 awaiting-contributor-response" # # The label to apply when an issue is closed. # close-issue-label: # optional # # The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2"). # exempt-issue-labels: # optional, default is # The reason to use when closing an issue. close-issue-reason: not_planned # # The label to apply when a pull request is stale. # stale-pr-label: # optional, default is Stale # # The label to apply when a pull request is closed. # close-pr-label: # optional # # The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2"). # exempt-pr-labels: # optional, default is # # The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). # exempt-milestones: # optional, default is # # The milestones that mean an issue is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the issues. # exempt-issue-milestones: # optional, default is # # The milestones that mean a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the pull requests. # exempt-pr-milestones: # optional, default is # # Exempt all issues and pull requests with milestones from being marked as stale. Default to false. # exempt-all-milestones: # optional, default is false # # Exempt all issues with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the issues. # exempt-all-issue-milestones: # optional, default is # # Exempt all pull requests with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the pull requests. # exempt-all-pr-milestones: # optional, default is # # Only issues or pull requests with all of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. # only-labels: # optional, default is # # Only issues or pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. # any-of-labels: # optional, default is # Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the issues. any-of-issue-labels: "🏓 awaiting-contributor-response" # # Only pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the pull requests. # any-of-pr-labels: # optional, default is # # Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the issues. # only-issue-labels: # optional, default is # # Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the pull requests. # only-pr-labels: # optional, default is # The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related). operations-per-run: 500 # optional, default is 30 # Remove stale labels from issues and pull requests when they are updated or commented on. remove-stale-when-updated: false # Remove stale labels from issues when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the issues. remove-issue-stale-when-updated: true # Remove stale labels from pull requests when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the pull requests. remove-pr-stale-when-updated: false # Run the processor in debug mode without actually performing any operations on live issues. debug-only: false # # The order to get issues or pull requests. Defaults to false, which is descending. # ascending: # optional, default is false # Delete the git branch after closing a stale pull request. delete-branch: false # # The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822). # start-date: # optional, default is # # The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). # exempt-assignees: # optional, default is # # The assignees which exempt an issue from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues. # exempt-issue-assignees: # optional, default is # # The assignees which exempt a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the pull requests. # exempt-pr-assignees: # optional, default is # # Exempt all issues and pull requests with assignees from being marked as stale. Default to false. # exempt-all-assignees: # optional, default is false # Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the issues. exempt-all-issue-assignees: true # # Exempt all pull requests with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the pull requests. # exempt-all-pr-assignees: # optional, default is # # Exempt draft pull requests from being marked as stale. Default to false. # exempt-draft-pr: # optional, default is false # # Display some statistics at the end regarding the stale workflow (only when the logs are enabled). enable-statistics: true # # A comma delimited list of labels to add when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it. # labels-to-add-when-unstale: # optional, default is # A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it. labels-to-remove-when-unstale: "🏓 awaiting-contributor-response" # Any update (update/comment) can reset the stale idle time on the issues and pull requests. ignore-updates: false # Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues. ignore-issue-updates: false # Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests. ignore-pr-updates: false # # Only the issues or the pull requests with an assignee will be marked as stale automatically. # include-only-assigned: # optional, default is false ================================================ FILE: .github/workflows/compare-build-output.yml ================================================ name: Compare Build Output on: pull_request: concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: comparebuildoutput: name: Compare Build Output runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 with: # Fetch entire git history so we have the parent commit to compare against fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run comparison script id: attw run: ./config/compare-build-output-to.sh $(git merge-base HEAD origin/${{ github.base_ref }}) | tee $GITHUB_STEP_SUMMARY env: RUNNER_TEMP: ${{ runner.temp }} ================================================ FILE: .github/workflows/copilot-setup-steps.yml ================================================ name: "Copilot Setup Steps" # Automatically run the setup steps when they are changed to allow for easy validation, and # allow manual testing through the repository's "Actions" tab on: workflow_dispatch: push: paths: - .github/workflows/copilot-setup-steps.yml pull_request: paths: - .github/workflows/copilot-setup-steps.yml jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest # Set the permissions to the lowest permissions possible needed for your steps. # Copilot will be given its own token for its operations. permissions: # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. contents: read # You can define any steps you want, and they will run before the agent starts. # If you do not check out your code, Copilot will do this for you. steps: - name: Checkout code uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: "24.x" - name: Get upstream skills repository HEAD id: skills-head run: | SKILLS_SHA=$(git ls-remote https://github.com/apollographql/skills.git HEAD | cut -f1) echo "sha=${SKILLS_SHA}" >> $GITHUB_OUTPUT echo "Upstream skills repository HEAD: ${SKILLS_SHA}" - name: Cache downloaded skills and instructions id: cache-skills uses: actions/cache@v5 with: path: | .agents/skills/apollo-client/ .github/skills/apollo-client/ .github/instructions/docs.instructions.md key: skills-${{ steps.skills-head.outputs.sha }} restore-keys: | skills- - name: Install JavaScript dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Install Apollo Client Skill if: steps.cache-skills.outputs.cache-hit != 'true' run: | echo "Installing Apollo Client skill using npx skills CLI" npx --yes skills add apollographql/skills --skill apollo-client --agent github-copilot --scope project --method copy --yes echo "Apollo Client skill installed successfully" - name: Copy Documentation Instructions if: steps.cache-skills.outputs.cache-hit != 'true' run: | echo "Copying documentation instructions from apollographql/skills" mkdir -p .github/instructions # Download the docs instructions from the skills repository curl -fsSL https://raw.githubusercontent.com/apollographql/skills/main/.github/instructions/docs.instructions.md \ -o .github/instructions/docs.instructions.md echo "Documentation instructions copied to .github/instructions/docs.instructions.md" ================================================ FILE: .github/workflows/devtools-errorcodes.yml ================================================ name: Devtools - Trigger Error Code PR after npm Release on: workflow_dispatch: # for testing workflow_run: workflows: ["Prerelease", "Release"] types: - completed jobs: dispatch: runs-on: ubuntu-latest steps: - uses: actions/create-github-app-token@v1 id: github-actions-bot-app-token with: app-id: 819772 private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} repositories: apollo-client-devtools - uses: benc-uk/workflow-dispatch@v1 with: workflow: update-errorcodes.yml repo: apollographql/apollo-client-devtools token: ${{ steps.github-actions-bot-app-token.outputs.token }} ================================================ FILE: .github/workflows/docmodel.yml ================================================ name: Generate Documentation Model on: push: jobs: docmodel: name: Generate Documentation Model runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Generate documentation model run: npm run docmodel - name: Upload documentation model artifact uses: actions/upload-artifact@v6 with: name: client-api-documentation path: docs/public/client.api.json retention-days: 30 ================================================ FILE: .github/workflows/exit-prerelease.yml ================================================ name: Exit Prerelease Mode on: workflow_dispatch: inputs: branch: description: "Exit prerelease mode on release branch" type: string default: "release-" required: true jobs: exit_prerelease: name: Changesets Exit Prerelease runs-on: ubuntu-latest # Allow GITHUB_TOKEN to have write permissions permissions: contents: write steps: - uses: actions/create-github-app-token@v1 id: github-actions-bot-app-token with: app-id: 819772 private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} # Check out the repository, using the Github Actions Bot app's token so # that we can push later. - name: Checkout repo uses: actions/checkout@v6 with: token: ${{ steps.github-actions-bot-app-token.outputs.token }} # Checkout release branch entered when workflow was kicked off ref: ${{ github.event.inputs.branch }} # Fetch entire git history so Changesets can generate changelogs # with the correct commits fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Write latest version to package.json and package-lock.json run: | version=$(npm show @apollo/client version) npm pkg set version="$version" npm i - name: Remove pre.json run: npx rimraf .changeset/pre.json - name: Commit and push changes run: | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git add -A git commit -m "Exit prerelease mode" git push ================================================ FILE: .github/workflows/issue-close-user-survey.yml ================================================ name: Issue Close User Survey on: issues: types: [closed] jobs: user-survey-comment: permissions: issues: write runs-on: ubuntu-latest if: github.repository == 'apollographql/apollo-client' steps: - run: | if [ "$STATE_REASON" == "completed" ] || [ "$SENDER" != "github-actions" ]; then gh issue comment "$NUMBER" --body "$BODY" else echo "Issue was closed as not planned, skipping comment." fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} NUMBER: ${{ github.event.issue.number }} STATE_REASON: ${{ github.event.issue.state_reason }} SENDER: ${{ github.event.sender.login }} BODY: > Do you have any feedback for the maintainers? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=GitHub+Issue). Your responses will help us understand Apollo Client usage and allow us to serve you better. ================================================ FILE: .github/workflows/knip.yml ================================================ name: Look for dead code and unused dependencies on: push jobs: lint: runs-on: ubuntu-latest name: Ubuntu/Node v20 steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run knip run: npm run knip ================================================ FILE: .github/workflows/lock.yml ================================================ name: "Lock Threads" on: schedule: - cron: "0 0 * * *" permissions: issues: write pull-requests: write concurrency: group: lock jobs: lock: if: github.repository == 'apollographql/apollo-client' runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v6 with: github-token: ${{ github.token }} log-output: true issue-inactive-days: "30" exclude-any-issue-labels: "discussion" issue-comment: > This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. For general questions, we recommend using our [Community Forum](https://community.apollographql.com/) or [Stack Overflow](https://stackoverflow.com/questions/tagged/apollo-client). pr-inactive-days: "30" exclude-any-pr-labels: "discussion" ================================================ FILE: .github/workflows/prerelease.yml ================================================ name: Prerelease on: push: branches: # Target release-x.x branches - "release-*" concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: prerelease: name: Changesets Prerelease # Prevents changesets action from creating a PR on forks if: github.repository == 'apollographql/apollo-client' runs-on: ubuntu-latest # Permissions necessary for Changesets to push a new branch and open PRs # (for automated Version Packages PRs), and request the JWT for provenance. # More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings permissions: contents: write pull-requests: write id-token: write steps: - uses: actions/create-github-app-token@v1 id: github-actions-bot-app-token with: app-id: 819772 private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} # Check out the repository, using the Github Actions Bot app's token so # that we can push later. - name: Checkout repo uses: actions/checkout@v6 with: token: ${{ steps.github-actions-bot-app-token.outputs.token }} # Fetch entire git history so Changesets can generate changelogs # with the correct commits fetch-depth: 0 - name: Check for pre.json file existence id: check_files uses: andstor/file-existence-action@v3.0.0 with: files: ".changeset/pre.json" - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: "24.x" - name: Install dependencies with cache uses: bahmutov/npm-install@v1 - name: Enter prerelease mode (alpha by default) # If .changeset/pre.json does not exist and we did not recently exit # prerelease mode, enter prerelease mode with tag alpha if: steps.check_files.outputs.files_exists == 'false' && !contains(github.event.head_commit.message, 'Exit prerelease') run: | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" npx changeset pre enter alpha git add -A git commit -m 'Enter prerelease mode' git push - name: Create prerelease PR # If .changeset/pre.json exists and we are not currently cutting a # release after merging a Version Packages PR if: steps.check_files.outputs.files_exists == 'true' && !startsWith(github.event.head_commit.message, 'Version Packages') uses: changesets/action@v1 with: version: npm run changeset-version publish: echo "This step should never publish" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/publish-pr-releases.yml ================================================ name: Pull Request Prerelease on: pull_request: push: branches: - "**" tags: - "!**" jobs: prerelease: name: Pull Request Prerelease runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Check if any files in codegen/ changed id: changed-files-codegen uses: karpikpl/list-changed-files-action@1.1.4 with: file-filter: "codegen/**" - name: Check if any files in scripts/codemods/ac3-to-ac4/ changed id: changed-files-codemod uses: karpikpl/list-changed-files-action@1.1.4 with: file-filter: "scripts/codemods/ac3-to-ac4/**" - name: Install dependencies with cache uses: bahmutov/npm-install@v1 - name: Build AC run: npm run build - name: Build Codegen if: steps.changed-files-codegen.outputs.changed_files != '' run: npm run build working-directory: "./codegen" - name: Build Codemod if: steps.changed-files-codemod.outputs.changed_files != '' run: npm run build working-directory: "./scripts/codemods/ac3-to-ac4" - name: Build and publish to pkg.pr.new env: PACKAGE_CODEGEN: ${{ steps.changed-files-codegen.outputs.changed_files != '' && './codegen' || '' }} PACKAGE_CODEMOD: ${{ steps.changed-files-codemod.outputs.changed_files != '' && './scripts/codemods/ac3-to-ac4' || '' }} # skipping --compact for a moment as there is an unreleased package run: npx pkg-pr-new publish --no-template ./dist $PACKAGE_CODEGEN $PACKAGE_CODEMOD ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: push: branches: - main - version-3.x - "release-*" concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: Changesets Release # Prevents action from creating a PR on forks if: github.repository == 'apollographql/apollo-client' runs-on: ubuntu-latest # Permissions necessary for Changesets to push a new branch and open PRs # (for automated Version Packages PRs), and request the JWT for provenance. # More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings permissions: contents: write pull-requests: write id-token: write outputs: published: ${{ steps.changesets.outputs.published || steps.changesets-prerelease.outputs.published }} publishedPackages: ${{ steps.changesets.outputs.publishedPackages || steps.changesets-prerelease.outputs.publishedPackages }} steps: - name: Checkout repo uses: actions/checkout@v6 with: # Fetch entire git history so Changesets can generate changelogs # with the correct commits fetch-depth: 0 - name: Check for pre.json file existence id: check_files uses: andstor/file-existence-action@v3.0.0 with: files: ".changeset/pre.json" - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: "24.x" registry-url: "https://registry.npmjs.org" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: "[main] Create release PR or publish to npm + GitHub" id: changesets if: contains(fromJSON('["main", "version-3.x"]'), github.ref_name) && steps.check_files.outputs.files_exists == 'false' uses: changesets/action@v1 with: version: npm run changeset-version publish: npm run changeset-publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: "" - name: "[prerelease] Publish to npm + GitHub" id: changesets-prerelease # Only run publish if we're still in pre mode and the last commit was # via an automatically created Version Packages PR if: github.ref_name != 'main' && github.ref_name != 'version-3.x' && steps.check_files.outputs.files_exists == 'true' && startsWith(github.event.head_commit.message, 'Version Packages') uses: changesets/action@v1 with: version: echo "This step should never version" publish: npm run changeset-publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: "" slack-notification: name: Postrelease Slack Notification runs-on: ubuntu-latest needs: release if: needs.release.result == 'success' && needs.release.outputs.published == 'true' strategy: matrix: package: ${{ fromJSON(needs.release.outputs.publishedPackages) }} steps: - name: Send a Slack notification on publish id: slack uses: slackapi/slack-github-action@v1.27.0 with: # Slack channel id, channel name, or user id to post message # See also: https://api.slack.com/methods/chat.postMessage#channels # You can pass in multiple channels to post to by providing # a comma-delimited list of channel IDs channel-id: "C01PS0CB41G" payload: | { "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "A new version of `{{ matrix.package.name }}` was released :rocket:" } }, { "type": "section", "fields": [ { "type": "mrkdwn", "text": "*Version:*\n`${{ matrix.package.version }}`" }, { "type": "mrkdwn", "text": "*Tag:*\n`${{ github.ref_name == 'main' && 'latest' || 'next' }}`" }, { "type": "mrkdwn", "text": "*GitHub release:*\n" }, { "type": "mrkdwn", "text": "*npm releases:*\n" } ] } ] } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} tag-next: name: Postrelease Tag Next Release runs-on: ubuntu-latest needs: release if: github.ref_name != 'main' && github.ref_name != 'version-3.x' && needs.release.result == 'success' && needs.release.outputs.published == 'true' permissions: id-token: write strategy: matrix: package: ${{ fromJSON(needs.release.outputs.publishedPackages) }} steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: "24.x" registry-url: "https://registry.npmjs.org" - name: Install dependencies with cache uses: bahmutov/npm-install@v1 - name: Tag release with next on npm run: | if NEXT=$(npm show ${{ matrix.package.name }}@next version) node -e 'process.exit(require("semver").gt("${{ matrix.package.version }}",process.env.NEXT)?0:1)'; then npm dist-tag add ${{ matrix.package.name }}@${{ matrix.package.version }} next; fi ================================================ FILE: .github/workflows/scheduled-test-canary.yml ================================================ # a GitHub Action that once a day runs all tests from `main` and `release-*` branches # with the latest `canary` and `experimental` release of `react` and `react-dom` name: Scheduled React Canary Test on: schedule: - cron: "0 0 * * *" workflow_dispatch: inputs: branches: description: "Branches to test" required: true default: '["main", "release-3.13", "release-4.0"]' tags: description: "React and React-DOM versions" required: true default: '["canary", "experimental"]' jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: tag: ${{ fromJson(github.event_name == 'workflow_dispatch' && inputs.tags || '["canary", "experimental"]') }} branch: ${{ fromJson(github.event_name == 'workflow_dispatch' && inputs.branches || '["main", "release-3.13", "release-4.0"]') }} steps: - uses: actions/checkout@v6 with: ref: ${{ matrix.branch }} - uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - uses: bahmutov/npm-install@v1 - run: | npm install react@${{ matrix.tag }} react-dom@${{ matrix.tag }} # tests can be flaky, this runs only once a day and we want to minimize false negatives - retry up to three times - run: | node -e 'console.log("\n\nReact %s, React-DOM %s\n\n", require("react").version, require("react-dom").version)' parallel --line-buffer -j 1 --retries 3 'npm test -- --logHeapUsage --selectProjects ' ::: 'ReactDOM 19' ================================================ FILE: .github/workflows/size-limit.yml ================================================ name: "size" on: pull_request: branches: - main - release-* - pr/* jobs: size: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run size-limit uses: andresz1/size-limit-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ # Installed via Github Copilot Setup Steps, should not be committed .agents/skills/apollo-client .github/instructions/docs.instructions.md .github/skills/apollo-client # fs .DS_Store .rpt2_cache # Logs logs *.log # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Ignore Wallaby.js configuration file wallaby.js # Coverage directory used by tools like istanbul coverage # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules # don't commit compiled files lib benchmark_lib test-lib dist npm !flow-typed/npm # Unpublished output from @apollo/client build, like bundlesize artifacts temp/ # webstorm .idea/ # alm editor .alm yarn.lock # docs db.json docs.json *.log docs/public/* .idea/ junit.xml .rpt2_cache # Local Netlify folder .netlify # Ignore generated test report output reports esbuild-why-*.html .yalc yalc.lock .attest .ignore ================================================ FILE: .npmrc ================================================ legacy-peer-deps=true ================================================ FILE: .prettierignore ================================================ ##### DISCLAIMER ###### # We have disabled the use of prettier in this project for a variety of reasons. # Because much of this project has not been formatted, we don't want to want to # apply formatting to everything and skew `git blame` stats. Instead, we should # only format newly created files that we can guarantee have no existing git # history. For this reason, we have disabled prettier project-wide except for # a handful of files. # # ONLY ADD NEWLY CREATED FILES/PATHS TO THE LIST BELOW. DO NOT ADD EXISTING # PROJECT FILES. # Ignore all mdx & md files: *.har *.snap node_modules/ .api-reports/ .yalc/ .next/ .changeset/ pnpm-lock.yaml scripts/codemods/ac3-to-ac4/src/__testfixtures__ ================================================ FILE: .prettierrc ================================================ { "bracketSpacing": true, "printWidth": 80, "semi": true, "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", "experimentalTernaries": true, "plugins": [ "./config/prettier/format-jsdoc.js", "./config/prettier/format-mdx3.js" ], "overrides": [ { "files": ["*.ts", "*.tsx"], "options": { "parser": "typescript-with-jsdoc" } }, { "files": ["**/__tests__/**/*.ts", "**/__tests__/**/*.tsx"], "options": { "parser": "typescript" } }, { "files": ["*.mdx"], "options": { "parser": "mdx3" } } ] } ================================================ FILE: .semgrepignore ================================================ # semgrep defaults # https://semgrep.dev/docs/ignoring-files-folders-code#defining-ignored-files-and-folders-in-semgrepignore node_modules/ dist/ *.min.js .npm/ .yarn/ .semgrep .semgrep_logs/ # custom paths __tests__/ ./docs/source/data/subscriptions.mdx ./docs/source/development-testing/developer-tooling.mdx ================================================ FILE: .size-limit.cjs ================================================ const limits = require("./.size-limits.json"); const checks = [ { import: { "@apollo/client": "{ ApolloClient, InMemoryCache, HttpLink }" }, conditions: ["require"], }, { import: { "@apollo/client": "{ ApolloClient, InMemoryCache, HttpLink }" }, }, ...[ "ApolloProvider", "useQuery", "useLazyQuery", "useMutation", "useSubscription", "useSuspenseQuery", "useBackgroundQuery", "useLoadableQuery", "useReadQuery", "useFragment", ].map((name) => ({ import: { "@apollo/client/react": `{ ${name} }` } })), ] .map((config) => ({ ...config, name: config.name || config.import ? `import ${Object.values(config.import)[0]} from "${ Object.keys(config.import)[0] }"` : config.path, brotli: true, ignore: [ ...(config.ignore || []), "react", "react-dom", "@graphql-typed-document-node/core", "@wry/caches", "@wry/context", "@wry/equality", "@wry/trie", "graphql-tag", "optimism", "prop-types", "response-iterator", "symbol-observable", "ts-invariant", "tslib", "zen-observable-ts", ], })) .flatMap((value) => [ { ...value, conditions: ["development"].concat( value.conditions || ["module", "browser"] ), }, { ...value, name: `${value.name} (production)`, conditions: ["production"].concat( value.conditions || ["module", "browser"] ), }, ]) .map((value) => { const conditions = value.conditions; delete value.conditions; if (conditions.includes("require")) { value.name = `${value.name} (CJS)`; } value.limit = limits[value.name]; value.modifyEsbuildConfig = (config) => { config.conditions = conditions; return config; }; return value; }); // useful snippet to locally run this with `size-limit --save-bundle /tmp/size --clean-dir` to debug bundle sizes module.exports = checks; //.filter( (limit) => limit.name === Object.keys(limits).at(-1)); ================================================ FILE: .size-limits.json ================================================ { "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 46872, "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 41484, "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 35505, "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 29301 } ================================================ FILE: .vscode/launch.json ================================================ { "version": "0.2.0", "configurations": [ { "name": "NodeJS Attach", "port": 9229, "request": "attach", "skipFiles": ["/**"], "type": "node" }, { "type": "node", "request": "launch", "name": "Jest Attach Node Inspector for Current File", "cwd": "${workspaceFolder}", "runtimeArgs": [ "--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "${relativeFile}", "--config", "./config/jest.config.ts", "--runInBand", "--watch" ], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen" } ] } ================================================ FILE: .vscode/settings.json ================================================ // Place your settings in this file to overwrite default and user settings. { "editor.tabSize": 2, "editor.rulers": [80], "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "typescript.tsdk": "node_modules/typescript/lib", "mdx.server.enable": true, "editor.codeActionsOnSave": { "source.organizeImports": "never" }, "cSpell.enableFiletypes": ["mdx"], "jest.jestCommandLine": "node --expose-gc node_modules/.bin/jest --config ./config/jest.config.ts --ignoreProjects 'ReactDOM 17' --ignoreProjects 'ReactDOM 18' --ignoreProjects 'Core Tests - RxJS min version' --runInBand" } ================================================ FILE: CHANGELOG.md ================================================ # @apollo/client ## 4.1.6 ### Patch Changes - [#13128](https://github.com/apollographql/apollo-client/pull/13128) [`6c0b8e4`](https://github.com/apollographql/apollo-client/commit/6c0b8e4301609b62ed599340589c978e4f51f020) Thanks [@pavelivanov](https://github.com/pavelivanov)! - Fix `useQuery` hydration mismatch when `ssr: false` and `skip: true` are used together When both options were combined, the server would return `loading: false` (because `useSSRQuery` checks `skip` first), but the client's `getServerSnapshot` was returning `ssrDisabledResult` with `loading: true`, causing a hydration mismatch. ## 4.1.5 ### Patch Changes - [#13155](https://github.com/apollographql/apollo-client/pull/13155) [`3ba1583`](https://github.com/apollographql/apollo-client/commit/3ba1583f93c40343501acd9d598ce506537d1c9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where `useQuery` would poll with `pollInterval` when `skip` was initialized to `true`. - [#13135](https://github.com/apollographql/apollo-client/pull/13135) [`fd42142`](https://github.com/apollographql/apollo-client/commit/fd42142495d24859a9bc7145a85bc8f8d857ec88) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where `client.query` would apply options from `defaultOptions.watchQuery`. ## 4.1.4 ### Patch Changes - [#13124](https://github.com/apollographql/apollo-client/pull/13124) [`578081f`](https://github.com/apollographql/apollo-client/commit/578081f2da7f2f54c0dd2711ee4a97530a5c38fc) Thanks [@Re-cool](https://github.com/Re-cool)! - Ensure `PersistedQueryLink` merges `http` and `fetchOptions` context values instead of overwriting them. ## 4.1.3 ### Patch Changes - [#13111](https://github.com/apollographql/apollo-client/pull/13111) [`bf46fe0`](https://github.com/apollographql/apollo-client/commit/bf46fe019b316ea8a87a05981a89fac5411260b4) Thanks [@RogerHYang](https://github.com/RogerHYang)! - Fix `createFetchMultipartSubscription` to support cancellation via `AbortController` Previously, calling `dispose()` or `unsubscribe()` on a subscription created by `createFetchMultipartSubscription` had no effect - the underlying fetch request would continue running until completion. This was because no `AbortController` was created or passed to `fetch()`, and no cleanup function was returned from the Observable. ## 4.1.2 ### Patch Changes - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` or `prioritizeCacheValues` should not override `fetchPolicy: 'cache-only'`, `fetchPolicy: 'no-cache'`, `fetchPolicy: 'standby'`, `skip: true`, or `skipToken` when reading the initial value of an `ObservableQuery`. - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - Fix `skipToken` in `useQuery` with `prerenderStatic` and related SSR functions. - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - Avoid fetches with `fetchPolicy: no-cache` in `useQuery` with `prerenderStatic` and related SSR functions. ## 4.1.1 ### Patch Changes - [#13103](https://github.com/apollographql/apollo-client/pull/13103) [`dee7dcf`](https://github.com/apollographql/apollo-client/commit/dee7dcff4d4baa26d623d1ecace60be88c684c1a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `@client` fields that are children of aliased server fields are resolved correctly. ## 4.1.0 ### Minor Changes - [#13043](https://github.com/apollographql/apollo-client/pull/13043) [`65e66ca`](https://github.com/apollographql/apollo-client/commit/65e66cafb6828b63d14b64877bbad47af95f66e4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Support `headers` transport for enhanced client awareness. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`785e223`](https://github.com/apollographql/apollo-client/commit/785e2232b4f7d9e561611cd4f45b8fdd1e44319e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - You can now provide a callback function as the `context` option on the `mutate` function returned by `useMutation`. The callback function is called with the value of the `context` option provided to the `useMutation` hook. This is useful if you'd like to merge the context object provided to the `useMutation` hook with a value provided to the `mutate` function. ```ts function MyComponent() { const [mutate, result] = useMutation(MUTATION, { context: { foo: true }, }); async function runMutation() { await mutate({ // sends context as { foo: true, bar: true } context: (hookContext) => ({ ...hookContext, bar: true }), }); } // ... } ``` - [#12923](https://github.com/apollographql/apollo-client/pull/12923) [`94ea3e3`](https://github.com/apollographql/apollo-client/commit/94ea3e32c82dd767b62a6907be6c3891864633af) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where deferred payloads that returned arrays with fewer items than the original cached array would retain items from the cached array. This change includes `@stream` arrays where stream arrays replace the cached arrays. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't set the fallback value of a `@client` field to `null` when a `read` function is defined. Instead the `read` function will be called with an `existing` value of `undefined` to allow default arguments to be used to set the returned value. When a `read` function is not defined nor is there a defined resolver for the field, warn and set the value to `null` only in that instance. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `from: null` in `client.watchFragment` and `cache.watchFragment`. When `from` is `null`, the emitted result is: ```ts { data: null, dataState: "complete", complete: true, } ``` - [#12926](https://github.com/apollographql/apollo-client/pull/12926) [`2b7f2c1`](https://github.com/apollographql/apollo-client/commit/2b7f2c167fc4a94e06457777f0c57b6dac7b2f2f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Support the newer incremental delivery format for the `@defer` directive implemented in `graphql@17.0.0-alpha.9`. Import the `GraphQL17Alpha9Handler` to use the newer incremental delivery format with `@defer`. ```ts import { GraphQL17Alpha9Handler } from "@apollo/client/incremental"; const client = new ApolloClient({ // ... incrementalHandler: new GraphQL17Alpha9Handler(), }); ``` > [!NOTE] > In order to use the `GraphQL17Alpha9Handler`, the GraphQL server MUST implement the newer incremental delivery format. You may see errors or unusual behavior if you use the wrong handler. If you are using Apollo Router, continue to use the `Defer20220824Handler` because Apollo Router does not yet support the newer incremental delivery format. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for arrays with `useFragment`, `useSuspenseFragment`, and `client.watchFragment`. This allows the ability to use a fragment to watch multiple entities in the cache. Passing an array to `from` will return `data` as an array where each array index corresponds to the index in the `from` array. ```ts function MyComponent() { const result = useFragment({ fragment, from: [item1, item2, item3], }); // `data` is an array with 3 items console.log(result); // { data: [{...}, {...}, {...}], dataState: "complete", complete: true } } ``` - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `getCurrentResult` function to the observable returned by `client.watchFragment` and `cache.watchFragment` that returns the current value for the watched fragment. ```ts const observable = client.watchFragment({ fragment, from: { __typename: "Item", id: 1 }, }); console.log(observable.getCurrentResult()); // { // data: {...}, // dataState: "complete", // complete: true, // } ``` - [#13038](https://github.com/apollographql/apollo-client/pull/13038) [`109efe7`](https://github.com/apollographql/apollo-client/commit/109efe7e4380b579c6a577982bd9a6e8c6a53892) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the `from` option to `readFragment`, `watchFragment`, and `updateFragment`. - [#12918](https://github.com/apollographql/apollo-client/pull/12918) [`2e224b9`](https://github.com/apollographql/apollo-client/commit/2e224b99894432822f926fdfec36bd46dd73b35e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for the `@stream` directive on both the `Defer20220824Handler` and the `GraphQL17Alpha2Handler`. > [!NOTE] > The implementations of `@stream` differ in the delivery of incremental results between the different GraphQL spec versions. If you upgrading from the older format to the newer format, expect the timing of some incremental results to change. - [#13056](https://github.com/apollographql/apollo-client/pull/13056) [`b224efc`](https://github.com/apollographql/apollo-client/commit/b224efc25515370c68b514405762e68a443e4a4a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `InMemoryCache` no longer filters out explicitly returned `undefined` items from `read` functions for array fields. This now makes it possible to create `read` functions on array fields that return partial data and trigger a fetch for the full list. - [#13058](https://github.com/apollographql/apollo-client/pull/13058) [`121a2cb`](https://github.com/apollographql/apollo-client/commit/121a2cb68820727186ecd74ce1041ef95284682e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` option to `cache.write`, `cache.writeQuery`, and `client.writeQuery`. This makes `extensions` available in cache `merge` functions which can be accessed with the other merge function options. As a result of this change, any `extensions` returned in GraphQL operations are now available in `merge` in the cache writes for these operations. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an abstract `resolvesClientField` function to `ApolloCache` that can be used by caches to tell `LocalState` if it can resolve a `@client` field when a local resolver is not defined. `LocalState` will emit a warning and set a fallback value of `null` when no local resolver is defined and `resolvesClientField` returns `false`, or isn't defined. Returning `true` from `resolvesClientField` signals that a mechanism in the cache will set the field value. In this case, `LocalState` won't set the field value. - [#13078](https://github.com/apollographql/apollo-client/pull/13078) [`bf1e0dc`](https://github.com/apollographql/apollo-client/commit/bf1e0dcb2f6c9b94576dc6d049745f1869cd0043) Thanks [@phryneas](https://github.com/phryneas)! - Use the default stream merge function for `@stream` fields only if stream info is present. This change means that using the older `Defer20220824Handler` will not use the default stream merge function and will instead truncate the streamed array on the first chunk. ### Patch Changes - [#12884](https://github.com/apollographql/apollo-client/pull/12884) [`d329790`](https://github.com/apollographql/apollo-client/commit/d32979070381f1897c90fb276e25a0c8375cc29a) Thanks [@phryneas](https://github.com/phryneas)! - Ensure that `PreloadedQueryRef` instances are unsubscribed when garbage collected - [#13086](https://github.com/apollographql/apollo-client/pull/13086) [`1a1d408`](https://github.com/apollographql/apollo-client/commit/1a1d4088f549088d4af3ff1f2d08d1c8e9af2a4d) Thanks [@phryneas](https://github.com/phryneas)! - Change the returned value from `null` to `{}` when all fields in a query were skipped. This also fixes a bug where `useSuspenseQuery` would suspend indefinitely when all fields were skipped. - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where errors parsed from incremental chunks in `ErrorLink` might throw when using the `GraphQL17Alpha9Handler`. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deduplicate watches created by `useFragment`, `client.watchFragment`, and `cache.watchFragment` that contain the same fragment, variables, and identifier. This should improve performance in situations where a `useFragment` or a `client.watchFragment` is used to watch the same object in multiple places of an application. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`259ae9b`](https://github.com/apollographql/apollo-client/commit/259ae9bafaa8122996b0a52dd99828b2261087e5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `FragmentType` not only to be called as `FragmentType`, but also as `FragmentType`. - [#12925](https://github.com/apollographql/apollo-client/pull/12925) [`5851800`](https://github.com/apollographql/apollo-client/commit/58518000edebb2a4b75c36ed22e9b67b3a254fa0) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where calling `fetchMore` with `@defer` or `@stream` would not rerender incremental results as they were streamed. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`9e55188`](https://github.com/apollographql/apollo-client/commit/9e55188adcb4cf4236b14eb552286a4505650a29) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Truncate `@stream` arrays only on last chunk by default. - [#13083](https://github.com/apollographql/apollo-client/pull/13083) [`f3c2be1`](https://github.com/apollographql/apollo-client/commit/f3c2be1665d8e2e260a4f55ec803d6e609748390) Thanks [@phryneas](https://github.com/phryneas)! - Expose the `ExtensionsWithStreamInfo` type for `extensions` in `Cache.writeQuery`, `Cache.write` and `Cache.update` so other cache implementations also can correctly access them. - [#12923](https://github.com/apollographql/apollo-client/pull/12923) [`94ea3e3`](https://github.com/apollographql/apollo-client/commit/94ea3e32c82dd767b62a6907be6c3891864633af) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Improve the cache data loss warning message when `existing` or `incoming` is an array. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`4631175`](https://github.com/apollographql/apollo-client/commit/46311758f703ec7baa9013a49b897e823fd4edb0) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ignore top-level `data` values on subsequent chunks in incremental responses. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`2be8de2`](https://github.com/apollographql/apollo-client/commit/2be8de26f1bb68d2d6cd0d286565d47455332b47) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Create mechanism to add experimental features to Apollo Client - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `LocalState` doesn't try to read from the cache when using a `no-cache` fetch policy. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`bb8ed7b`](https://github.com/apollographql/apollo-client/commit/bb8ed7b6b7e36e313822e44b230e27031d6fcbd9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure an error is thrown when `@stream` is detected and an `incrementalDelivery` handler is not configured. - [#13053](https://github.com/apollographql/apollo-client/pull/13053) [`23ca0ba`](https://github.com/apollographql/apollo-client/commit/23ca0ba895473b397805e6bcc70e0fcf987547c5) Thanks [@phryneas](https://github.com/phryneas)! - Use memoized observable mapping when using `watchFragment`, `useFragment` or `useSuspenseFragment`. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`44706a2`](https://github.com/apollographql/apollo-client/commit/44706a2e7ae2c977fa917214a1ff5e5fe4a9b3a7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add helper type `QueryRef.ForQuery` - [#13082](https://github.com/apollographql/apollo-client/pull/13082) [`c257418`](https://github.com/apollographql/apollo-client/commit/c2574181f6b0d9ae059dfa3822a7842ec5f8ff1f) Thanks [@phryneas](https://github.com/phryneas)! - Pass `streamInfo` through result extensions as a `WeakRef`. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`4631175`](https://github.com/apollographql/apollo-client/commit/46311758f703ec7baa9013a49b897e823fd4edb0) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the `Defer20220824Handler.SubsequentResult` type to match the `FormattedSubsequentIncrementalExecutionResult` type in `graphql@17.0.0-alpha.2`. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`96b531f`](https://github.com/apollographql/apollo-client/commit/96b531f6b57a158aa2c57da976c6dd22c1a7f4d5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `no-cache` fetch policy without a local resolver defined. `no-cache` queries do not read or write to the cache which meant `no-cache` queries are silently incomplete when the `@client` field value was handled by a cache `read` function. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`5776ea0`](https://github.com/apollographql/apollo-client/commit/5776ea0db1f082663dcf470c3b22b9182a3eea28) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalSpec=v0.2` to ensure the newest incremental delivery format is requested. - [#12927](https://github.com/apollographql/apollo-client/pull/12927) [`45ebb52`](https://github.com/apollographql/apollo-client/commit/45ebb52bcb84b81ce3a066204456c2e20f3d4c98) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `DeepPartial>` now returns `Array>` instead of `Array>`. - [#13071](https://github.com/apollographql/apollo-client/pull/13071) [`99ffe9a`](https://github.com/apollographql/apollo-client/commit/99ffe9a8ede1683d902101c5371807a8442fcdcb) Thanks [@phryneas](https://github.com/phryneas)! - `prerenderStatic`: Expose return value of `renderFunction` to userland, fix `aborted` property. This enables usage of `resumeAndPrerender` with React 19.2. - [#13026](https://github.com/apollographql/apollo-client/pull/13026) [`05eee67`](https://github.com/apollographql/apollo-client/commit/05eee67e91b480252923879987534e81d2866aba) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reduce the number of observables created by `watchFragment` by reusing existing observables as much as possible. This should improve performance when watching the same item in the cache multiple times after a cache update occurs. - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Handle `@stream` payloads that send multiple items in the same chunk when using the `Defer20220824Handler`. - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Handle an edge case with the `Defer20220824Handler` where an error for a `@stream` item that bubbles to the `@stream` boundary (such as an item returning `null` for a non-null array item) would write items from future chunks to the wrong array index. In these cases, the `@stream` field is no longer processed and future updates to the field are ignored. This prevents runtime errors that TypeScript would otherwise not be able to catch. - [#13081](https://github.com/apollographql/apollo-client/pull/13081) [`1e06ad7`](https://github.com/apollographql/apollo-client/commit/1e06ad7399716139fcfbec7423697eafc5750f5e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Avoid calling `merge` functions more than once for the same incremental chunk. ## 4.1.0-rc.1 ### Patch Changes - [#13086](https://github.com/apollographql/apollo-client/pull/13086) [`1a1d408`](https://github.com/apollographql/apollo-client/commit/1a1d4088f549088d4af3ff1f2d08d1c8e9af2a4d) Thanks [@phryneas](https://github.com/phryneas)! - Change the returned value from `null` to `{}` when all fields in a query were skipped. This also fixes a bug where `useSuspenseQuery` would suspend indefinitely when all fields were skipped. - [#13071](https://github.com/apollographql/apollo-client/pull/13071) [`99ffe9a`](https://github.com/apollographql/apollo-client/commit/99ffe9a8ede1683d902101c5371807a8442fcdcb) Thanks [@phryneas](https://github.com/phryneas)! - `prerenderStatic`: Expose return value of `renderFunction` to userland, fix `aborted` property. This enables usage of `resumeAndPrerender` with React 19.2. ## 4.1.0-rc.0 ### Minor Changes - [#13078](https://github.com/apollographql/apollo-client/pull/13078) [`bf1e0dc`](https://github.com/apollographql/apollo-client/commit/bf1e0dcb2f6c9b94576dc6d049745f1869cd0043) Thanks [@phryneas](https://github.com/phryneas)! - Use the default stream merge function for `@stream` fields only if stream info is present. This change means that using the older `Defer20220824Handler` will not use the default stream merge function and will instead truncate the streamed array on the first chunk. ### Patch Changes - [#13083](https://github.com/apollographql/apollo-client/pull/13083) [`f3c2be1`](https://github.com/apollographql/apollo-client/commit/f3c2be1665d8e2e260a4f55ec803d6e609748390) Thanks [@phryneas](https://github.com/phryneas)! - Expose the `ExtensionsWithStreamInfo` type for `extensions` in `Cache.writeQuery`, `Cache.write` and `Cache.update` so other cache implementations also can correctly access them. - [#13082](https://github.com/apollographql/apollo-client/pull/13082) [`c257418`](https://github.com/apollographql/apollo-client/commit/c2574181f6b0d9ae059dfa3822a7842ec5f8ff1f) Thanks [@phryneas](https://github.com/phryneas)! - Pass `streamInfo` through result extensions as a `WeakRef`. - [#13081](https://github.com/apollographql/apollo-client/pull/13081) [`1e06ad7`](https://github.com/apollographql/apollo-client/commit/1e06ad7399716139fcfbec7423697eafc5750f5e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Avoid calling `merge` functions more than once for the same incremental chunk. ## 4.0.12-beta.0 ### Patch Changes - [#12884](https://github.com/apollographql/apollo-client/pull/12884) [`d329790`](https://github.com/apollographql/apollo-client/commit/d32979070381f1897c90fb276e25a0c8375cc29a) Thanks [@phryneas](https://github.com/phryneas)! - Ensure that `PreloadedQueryRef` instances are unsubscribed when garbage collected - [#13069](https://github.com/apollographql/apollo-client/pull/13069) [`9cad04a`](https://github.com/apollographql/apollo-client/commit/9cad04a4228a5059ea330ac9d284407a363fc10d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Truncate @stream arrays only on last chunk by default ## 4.1.0-alpha.9 ### Minor Changes - [#13056](https://github.com/apollographql/apollo-client/pull/13056) [`b224efc`](https://github.com/apollographql/apollo-client/commit/b224efc25515370c68b514405762e68a443e4a4a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `InMemoryCache` no longer filters out explicitly returned `undefined` items from `read` functions for array fields. This now makes it possible to create `read` functions on array fields that return partial data and trigger a fetch for the full list. - [#13058](https://github.com/apollographql/apollo-client/pull/13058) [`121a2cb`](https://github.com/apollographql/apollo-client/commit/121a2cb68820727186ecd74ce1041ef95284682e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` option to `cache.write`, `cache.writeQuery`, and `client.writeQuery`. This makes `extensions` available in cache `merge` functions which can be accessed with the other merge function options. As a result of this change, any `extensions` returned in GraphQL operations are now available in `merge` in the cache writes for these operations. ### Patch Changes - [#13053](https://github.com/apollographql/apollo-client/pull/13053) [`23ca0ba`](https://github.com/apollographql/apollo-client/commit/23ca0ba895473b397805e6bcc70e0fcf987547c5) Thanks [@phryneas](https://github.com/phryneas)! - Use memoized observable mapping when using `watchFragment`, `useFragment` or `useSuspenseFragment`. ## 4.1.0-alpha.10 ### Patch Changes - [#13053](https://github.com/apollographql/apollo-client/pull/13053) [`23ca0ba`](https://github.com/apollographql/apollo-client/commit/23ca0ba895473b397805e6bcc70e0fcf987547c5) Thanks [@phryneas](https://github.com/phryneas)! - Use memoized observable mapping when using `watchFragment`, `useFragment` or `useSuspenseFragment`. ## 4.1.0-alpha.9 ### Minor Changes - [#13056](https://github.com/apollographql/apollo-client/pull/13056) [`b224efc`](https://github.com/apollographql/apollo-client/commit/b224efc25515370c68b514405762e68a443e4a4a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `InMemoryCache` no longer filters out explicitly returned `undefined` items from `read` functions for array fields. This now makes it possible to create `read` functions on array fields that return partial data and trigger a fetch for the full list. ## 4.1.0-alpha.8 ### Minor Changes - [#13043](https://github.com/apollographql/apollo-client/pull/13043) [`65e66ca`](https://github.com/apollographql/apollo-client/commit/65e66cafb6828b63d14b64877bbad47af95f66e4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Support `headers` transport for enhanced client awareness. ## 4.1.0-alpha.7 ### Minor Changes - [#13038](https://github.com/apollographql/apollo-client/pull/13038) [`109efe7`](https://github.com/apollographql/apollo-client/commit/109efe7e4380b579c6a577982bd9a6e8c6a53892) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the `from` option to `readFragment`, `watchFragment`, and `updateFragment`. ## 4.1.0-alpha.6 ### Patch Changes - [#13026](https://github.com/apollographql/apollo-client/pull/13026) [`05eee67`](https://github.com/apollographql/apollo-client/commit/05eee67e91b480252923879987534e81d2866aba) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reduce the number of observables created by `watchFragment` by reusing existing observables as much as possible. This should improve performance when watching the same item in the cache multiple times after a cache update occurs. ## 4.1.0-alpha.5 ### Patch Changes - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where errors parsed from incremental chunks in `ErrorLink` might throw when using the `GraphQL17Alpha9Handler`. - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Handle `@stream` payloads that send multiple items in the same chunk when using the `Defer20220824Handler`. - [#13010](https://github.com/apollographql/apollo-client/pull/13010) [`7627000`](https://github.com/apollographql/apollo-client/commit/76270002254b0c6acb18872a39ab180f9f1e4067) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Handle an edge case with the `Defer20220824Handler` where an error for a `@stream` item that bubbles to the `@stream` boundary (such as an item returning `null` for a non-null array item) would write items from future chunks to the wrong array index. In these cases, the `@stream` field is no longer processed and future updates to the field are ignored. This prevents runtime errors that TypeScript would otherwise not be able to catch. ## 4.1.0-alpha.4 ### Patch Changes - [#13009](https://github.com/apollographql/apollo-client/pull/13009) [`259ae9b`](https://github.com/apollographql/apollo-client/commit/259ae9bafaa8122996b0a52dd99828b2261087e5) Thanks [@phryneas](https://github.com/phryneas)! - Allow `FragmentType` not only to be called as `FragmentType`, but also as `FragmentType`. - [#13012](https://github.com/apollographql/apollo-client/pull/13012) [`44706a2`](https://github.com/apollographql/apollo-client/commit/44706a2e7ae2c977fa917214a1ff5e5fe4a9b3a7) Thanks [@phryneas](https://github.com/phryneas)! - Add helper type `QueryRef.ForQuery` ## 4.1.0-alpha.3 ### Minor Changes - [#12971](https://github.com/apollographql/apollo-client/pull/12971) [`d11eb40`](https://github.com/apollographql/apollo-client/commit/d11eb40aa41d90ac664705bac01158d58bf55e9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `from: null` in `client.watchFragment` and `cache.watchFragment`. When `from` is `null`, the emitted result is: ```ts { data: null, dataState: "complete", complete: true, } ``` - [#12971](https://github.com/apollographql/apollo-client/pull/12971) [`d11eb40`](https://github.com/apollographql/apollo-client/commit/d11eb40aa41d90ac664705bac01158d58bf55e9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for arrays with `useFragment`, `useSuspenseFragment`, and `client.watchFragment`. This allows the ability to use a fragment to watch multiple entities in the cache. Passing an array to `from` will return `data` as an array where each array index corresponds to the index in the `from` array. ```ts function MyComponent() { const result = useFragment({ fragment, from: [item1, item2, item3], }); // `data` is an array with 3 items console.log(result); // { data: [{...}, {...}, {...}], dataState: "complete", complete: true } } ``` - [#12971](https://github.com/apollographql/apollo-client/pull/12971) [`d11eb40`](https://github.com/apollographql/apollo-client/commit/d11eb40aa41d90ac664705bac01158d58bf55e9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `getCurrentResult` function to the observable returned by `client.watchFragment` and `cache.watchFragment` that returns the current value for the watched fragment. ```ts const observable = client.watchFragment({ fragment, from: { __typename: "Item", id: 1 }, }); console.log(observable.getCurrentResult()); // { // data: {...}, // dataState: "complete", // complete: true, // } ``` ### Patch Changes - [#12971](https://github.com/apollographql/apollo-client/pull/12971) [`d11eb40`](https://github.com/apollographql/apollo-client/commit/d11eb40aa41d90ac664705bac01158d58bf55e9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deduplicate watches created by `useFragment`, `client.watchFragment`, and `cache.watchFragment` that contain the same fragment, variables, and identifier. This should improve performance in situations where a `useFragment` or a `client.watchFragment` is used to watch the same object in multiple places of an application. - [#12982](https://github.com/apollographql/apollo-client/pull/12982) [`5c56b32`](https://github.com/apollographql/apollo-client/commit/5c56b3210a2c03e247ec9e600f1e27eb71df5e96) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ignore top-level `data` values on subsequent chunks in incremental responses. - [#12982](https://github.com/apollographql/apollo-client/pull/12982) [`5c56b32`](https://github.com/apollographql/apollo-client/commit/5c56b3210a2c03e247ec9e600f1e27eb71df5e96) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the `Defer20220824Handler.SubsequentResult` type to match the `FormattedSubsequentIncrementalExecutionResult` type in `graphql@17.0.0-alpha.2`. - [#12973](https://github.com/apollographql/apollo-client/pull/12973) [`072da24`](https://github.com/apollographql/apollo-client/commit/072da24a8daec3a646ef0cce30de32f95ea0bb23) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update the `accept` header used with the `GraphQL17Alpha9Handler` to `multipart/mixed;incrementalSpec=v0.2` to ensure the newest incremental delivery format is requested. - [#12971](https://github.com/apollographql/apollo-client/pull/12971) [`d11eb40`](https://github.com/apollographql/apollo-client/commit/d11eb40aa41d90ac664705bac01158d58bf55e9b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `DeepPartial>` now returns `Array>` instead of `Array>`. ## 4.1.0-alpha.2 ### Minor Changes - [#12959](https://github.com/apollographql/apollo-client/pull/12959) [`556e837`](https://github.com/apollographql/apollo-client/commit/556e83781069d925a7e8f99e49023f6f858c6438) Thanks [@jerelmiller](https://github.com/jerelmiller)! - You can now provide a callback function as the `context` option on the `mutate` function returned by `useMutation`. The callback function is called with the value of the `context` option provided to the `useMutation` hook. This is useful if you'd like to merge the context object provided to the `useMutation` hook with a value provided to the `mutate` function. ```ts function MyComponent() { const [mutate, result] = useMutation(MUTATION, { context: { foo: true }, }); async function runMutation() { await mutate({ // sends context as { foo: true, bar: true } context: (hookContext) => ({ ...hookContext, bar: true }), }); } // ... } ``` ### Patch Changes - [#12954](https://github.com/apollographql/apollo-client/pull/12954) [`1c82eaf`](https://github.com/apollographql/apollo-client/commit/1c82eafe4921a9e30128202623be6c5a3d4df803) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure an error is thrown when `@stream` is detected and an `incrementalDelivery` handler is not configured. ## 4.1.0-alpha.1 ### Minor Changes - [#12934](https://github.com/apollographql/apollo-client/pull/12934) [`54ab6d9`](https://github.com/apollographql/apollo-client/commit/54ab6d994692dad9f06d3d0b84c84d021d126577) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't set the fallback value of a `@client` field to `null` when a `read` function is defined. Instead the `read` function will be called with an `existing` value of `undefined` to allow default arguments to be used to set the returned value. When a `read` function is not defined nor is there a defined resolver for the field, warn and set the value to `null` only in that instance. - [#12934](https://github.com/apollographql/apollo-client/pull/12934) [`54ab6d9`](https://github.com/apollographql/apollo-client/commit/54ab6d994692dad9f06d3d0b84c84d021d126577) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an abstract `resolvesClientField` function to `ApolloCache` that can be used by caches to tell `LocalState` if it can resolve a `@client` field when a local resolver is not defined. `LocalState` will emit a warning and set a fallback value of `null` when no local resolver is defined and `resolvesClientField` returns `false`, or isn't defined. Returning `true` from `resolvesClientField` signals that a mechanism in the cache will set the field value. In this case, `LocalState` won't set the field value. ### Patch Changes - [#12915](https://github.com/apollographql/apollo-client/pull/12915) [`c97b145`](https://github.com/apollographql/apollo-client/commit/c97b145188d39d754ff098ff399a80cae5b10cc0) Thanks [@phryneas](https://github.com/phryneas)! - Create mechanism to add experimental features to Apollo Client - [#12934](https://github.com/apollographql/apollo-client/pull/12934) [`54ab6d9`](https://github.com/apollographql/apollo-client/commit/54ab6d994692dad9f06d3d0b84c84d021d126577) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `LocalState` doesn't try to read from the cache when using a `no-cache` fetch policy. - [#12934](https://github.com/apollographql/apollo-client/pull/12934) [`54ab6d9`](https://github.com/apollographql/apollo-client/commit/54ab6d994692dad9f06d3d0b84c84d021d126577) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `no-cache` fetch policy without a local resolver defined. `no-cache` queries do not read or write to the cache which meant `no-cache` queries are silently incomplete when the `@client` field value was handled by a cache `read` function. ## 4.1.0-alpha.0 ### Minor Changes - [#12923](https://github.com/apollographql/apollo-client/pull/12923) [`2aa31c7`](https://github.com/apollographql/apollo-client/commit/2aa31c718155e88814551afb14fd7a0035acc57d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where deferred payloads that reteurned arrays with fewer items than the original cached array would retain items from the cached array. This change includes `@stream` arrays where stream arrays replace the cached arrays. - [#12926](https://github.com/apollographql/apollo-client/pull/12926) [`c7fba99`](https://github.com/apollographql/apollo-client/commit/c7fba99e16da522fdbc35b9c16cdb8df0dda4c2c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Support the newer incremental delivery format for the `@defer` directive implemented in `graphql@17.0.0-alpha.9`. Import the `GraphQL17Alpha9Handler` to use the newer incremental delivery format with `@defer`. ```ts import { GraphQL17Alpha9Handler } from "@apollo/client/incremental"; const client = new ApolloClient({ // ... incrementalHandler: new GraphQL17Alpha9Handler(), }); ``` > [!NOTE] > In order to use the `GraphQL17Alpha9Handler`, the GraphQL server MUST implement the newer incremental delivery format. You may see errors or unusual behavior if you use the wrong handler. If you are using Apollo Router, continue to use the `Defer20220824Handler` because Apollo Router does not yet support the newer incremental delivery format. - [#12918](https://github.com/apollographql/apollo-client/pull/12918) [`562e219`](https://github.com/apollographql/apollo-client/commit/562e2191a4b38e05edb3da9074e2958db3c7b6b9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for the `@stream` directive on both the `Defer20220824Handler` and the `GraphQL17Alpha2Handler`. > [!NOTE] > The implementations of `@stream` differ in the delivery of incremental results between the different GraphQL spec versions. If you upgrading from the older format to the newer format, expect the timing of some incremental results to change. ### Patch Changes - [#12925](https://github.com/apollographql/apollo-client/pull/12925) [`f538a83`](https://github.com/apollographql/apollo-client/commit/f538a83621e1d110286c056dd8e91611dfd9a1d3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where calling `fetchMore` with `@defer` or `@stream` would not rerender incremental results as they were streamed. - [#12923](https://github.com/apollographql/apollo-client/pull/12923) [`01cace0`](https://github.com/apollographql/apollo-client/commit/01cace0a6d4faf79e8a4188b93c7d13c4b26d6d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Improve the cache data loss warning message when `existing` or `incoming` is an array. ## 4.0.13 ### Patch Changes - [#13094](https://github.com/apollographql/apollo-client/pull/13094) [`9cbe2c2`](https://github.com/apollographql/apollo-client/commit/9cbe2c2dd2282ac861327d3c394578db7706df05) Thanks [@phryneas](https://github.com/phryneas)! - Ensure that `compact` and `mergeOptions` preserve symbol keys. This fixes an issue where the change introduced in 4.0.11 via #13049 would not be applied if `defaultOptions` for `watchQuery` were declared. Please note that `compact` and `mergeOptions` are considered internal utilities and they might have similar behavior changes in future releases. Do not use them in your application code - a change like this is not considered breaking and will not be announced as such. ## 4.0.12 ### Patch Changes - [#13077](https://github.com/apollographql/apollo-client/pull/13077) [`f322460`](https://github.com/apollographql/apollo-client/commit/f322460fe9baae82c0980dd082c1b6b4956a4951) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential memory leak where Trie nodes would remain in memory too long. ## 4.0.11 ### Patch Changes - [#13050](https://github.com/apollographql/apollo-client/pull/13050) [`8020829`](https://github.com/apollographql/apollo-client/commit/8020829d8a3bdb3219a37e8d1f7b89179f721037) Thanks [@phryneas](https://github.com/phryneas)! - Replace usage of `findLast` with more backwards-compatible methods. - [#13049](https://github.com/apollographql/apollo-client/pull/13049) [`05638de`](https://github.com/apollographql/apollo-client/commit/05638deaf598c5bf5d03b82d7deaf57468546229) Thanks [@phryneas](https://github.com/phryneas)! - Fixes an issue where queries starting with `skipToken` or lazy queries from `useLazyQuery` were included in `client.refetchQueries()` before they had been executed for the first time. While generally queries with a `standby` `fetchPolicy` should be included in refetch, these queries never had `variables` passed in, so they should be excluded until they have run once and received their actual variables. These queries are now properly excluded from refetch operations until after their initial execution. This change adds a new hidden option to `client.watchQuery`, `[variablesUnknownSymbol]`, which may be set `true` for queries starting with a `fetchPolicy` of `standby`. It will only be applied when creating the `ObservableQuery` instance and cannot be changed later. This flag indicates that the query's variables are not yet known, and thus it should be excluded from refetch operations until they are. **This option is not meant for everyday use and is intended for framework integrations only.** ## 4.0.10 ### Patch Changes - [#13045](https://github.com/apollographql/apollo-client/pull/13045) [`af4acdc`](https://github.com/apollographql/apollo-client/commit/af4acdc88bd3bac0d697ab300816241e4065842c) Thanks [@phryneas](https://github.com/phryneas)! - Fix memory leak #13036 ## 4.0.9 ### Patch Changes - [#12993](https://github.com/apollographql/apollo-client/pull/12993) [`8f3bc9b`](https://github.com/apollographql/apollo-client/commit/8f3bc9b7253a737062dc0d652cd4f8b354f68ccc) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where switching from options with `variables` to `skipToken` with `useSuspenseQuery` and `useBackgroundQuery` would create a new `ObservableQuery`. This could cause unintended refetches where `variables` were absent in the request when the query was referenced with `refetchQueries`. ## 4.0.8 ### Patch Changes - [#12983](https://github.com/apollographql/apollo-client/pull/12983) [`f6d0efa`](https://github.com/apollographql/apollo-client/commit/f6d0efac4d99375c67255aee6d9b2981753b6f55) Thanks [@CarsonF](https://github.com/CarsonF)! - Fix cache.modify() mapping readonly arrays to singular reference ## 4.0.7 ### Patch Changes - [#12950](https://github.com/apollographql/apollo-client/pull/12950) [`5b4f36a`](https://github.com/apollographql/apollo-client/commit/5b4f36a2b249d15e2e8165bd32d9b2fca7e70217) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't send `operationType` in the payload sent by `GraphQLWsLink`. ## 4.0.6 ### Patch Changes - [#12937](https://github.com/apollographql/apollo-client/pull/12937) [`3b0d89b`](https://github.com/apollographql/apollo-client/commit/3b0d89bc9dde3eaee9ddf0aec387da43fe71abc0) Thanks [@phryneas](https://github.com/phryneas)! - Fix a problem with `fetchMore` where the loading state wouldn't reset if the result wouldn't result in a data update. ## 4.0.5 ### Patch Changes - [#12920](https://github.com/apollographql/apollo-client/pull/12920) [`e2fc385`](https://github.com/apollographql/apollo-client/commit/e2fc3850ddb2aa756fc44420390ae357daf31948) Thanks [@phryneas](https://github.com/phryneas)! - Fix an invariance type error in the `MockedResponse` type. ## 4.0.4 ### Patch Changes - [#12892](https://github.com/apollographql/apollo-client/pull/12892) [`db8a04b`](https://github.com/apollographql/apollo-client/commit/db8a04b193c157d57d6fe0f187b1892afdda1b7d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent unhandled rejections from the promise returned by calling the `mutate` function from the `useMutation` hook. - [#12899](https://github.com/apollographql/apollo-client/pull/12899) [`5352c12`](https://github.com/apollographql/apollo-client/commit/5352c1208e19c93678fef7860a1a87841653eb64) Thanks [@phryneas](https://github.com/phryneas)! - Fix an issue when `invariant` is called by external libraries when no dev error message handler is loaded. - [#12895](https://github.com/apollographql/apollo-client/pull/12895) [`71f2517`](https://github.com/apollographql/apollo-client/commit/71f2517132a34563a14934f3971666b3691710f9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Support `skipToken` with `useQuery` to provide a more type-safe way to skip query execution. ```ts import { skipToken, useQuery } from "@apollo/client/react"; // Use `skipToken` in place of `skip: true` for better type safety // for required variables const { data } = useQuery(QUERY, id ? { variables: { id } } : skipToken); ``` Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the `skip` option more difficult. - [#12900](https://github.com/apollographql/apollo-client/pull/12900) [`c0d5be7`](https://github.com/apollographql/apollo-client/commit/c0d5be7cbbb1b1f7771962eb2ae0e173de743265) Thanks [@phryneas](https://github.com/phryneas)! - Use named export `equal` instead of default from `"@wry/equality"` ## 4.0.3 ### Patch Changes - [#12887](https://github.com/apollographql/apollo-client/pull/12887) [`6f6ca47`](https://github.com/apollographql/apollo-client/commit/6f6ca47e9f5e80ee9c98fca2639b5cba6317fbbf) Thanks [@phryneas](https://github.com/phryneas)! - Fix accidental deep re-export from `/react` out of `/react/internals` - [#12890](https://github.com/apollographql/apollo-client/pull/12890) [`019b422`](https://github.com/apollographql/apollo-client/commit/019b4224147a5a8709de54c4474e126619dd2469) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `variables` option for `useMutation` provides proper IntelliSense suggestions. ## 4.0.2 ### Patch Changes - [#12880](https://github.com/apollographql/apollo-client/pull/12880) [`56fac52`](https://github.com/apollographql/apollo-client/commit/56fac522549eaed5494097dc0098ea7a558382a0) Thanks [@phryneas](https://github.com/phryneas)! - restore `getMemoryInternals` access in dev builds ## 4.0.1 ### Patch Changes - [#12876](https://github.com/apollographql/apollo-client/pull/12876) [`b00f231`](https://github.com/apollographql/apollo-client/commit/b00f231e5f10a23178cf7a2c69a4e13cd959ab45) Thanks [@phryneas](https://github.com/phryneas)! - Fix CJS build output for `invariantErrorCodes` - [#12866](https://github.com/apollographql/apollo-client/pull/12866) [`0d1614a`](https://github.com/apollographql/apollo-client/commit/0d1614a9dfca2b1bcf4ea40095cc9018d6314532) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `isNetworkStatusInFlight` from `@apollo/client/utilities`. Add `isNetworkStatusSettled` to `@apollo/client/utilities` and re-export it from `@apollo/client` with a deprecation. ## 4.0.0 # Apollo Client 4.0 Release Notes Apollo Client 4.0 delivers a more modern, efficient, and type-safe GraphQL client experience through various architectural improvements and API refinements. This release focuses on developer experience, bundle size optimization, and framework flexibility. ## Key Improvements ### 🎯 Framework-Agnostic Core Apollo Client 4.0 separates React functionality from the core library, making `@apollo/client` truly framework-agnostic. React exports now live in `@apollo/client/react`, allowing developers to use Apollo Client with any JavaScript framework without React dependencies. ### 📦 Smaller Bundle Sizes - **Opt-in Local State Management**: The `@client` directive functionality is now opt-in via the `LocalState` class, reducing bundle size when not using local state - **Modern Build Target**: Transpiled to target `since 2023, node >= 20, not dead`, leveraging modern JavaScript features for better performance - **Improved Tree-Shaking**: Proper `exports` field in package.json enables better dead code elimination ### 💥 Unified Error Handling Apollo Client 4.0 completely reimagines error handling for better clarity and debugging: - `ApolloError` removed in favor of specific error classes - Unification of errors to a single `error` property - Network errors now respect `errorPolicy` settings - External errors passed through without wrapping - New, more granular error classes with static `.is()` methods for robust type narrowing ### 🔧 Enhanced TypeScript Support - **Namespaced Types**: Types are now colocated with their APIs (e.g., `useQuery.Options` instead of `QueryHookOptions`) - **Precise Return Types**: Return types accurately reflect the options passed (e.g., `returnPartialData` makes `data` type `DeepPartial`) - **Stricter Type Safety**: Required variables are now enforced more consistently throughout the client - **New `dataState` Property**: Enables accurate type narrowing of query results - **Module Augmentation**: Custom context types via declaration merging instead of fragile generics - **Customizable Type Implementations**: Select types can now be customized to provide your own type implementation to seamlessly integrate with external tools such as GraphQL Codegen or `gql.tada` ### ⚡ Modern Observable Implementation Apollo Client 4.0 migrates from `zen-observable` to **RxJS**, providing the industry-standard Observable implementation backed by a rich ecosystem of utilities. ## Major Features ### Unified Error Handling Apollo Client 4.0 completely reimagines error handling for better clarity and debugging: **Key Changes:** - `ApolloError` removed in favor of specific error classes - Network errors now respect `errorPolicy` settings - External errors passed through without wrapping - New error classes with static `.is()` methods for type checking **Error Classes:** - `CombinedGraphQLErrors` - GraphQL errors from the server - `ServerError` - Non-GraphQL server errors - `ServerParseError` - Server response parsing errors - `UnconventionalError` - Wrapper for non-error thrown values - `LinkError` - Errors from the link chain (via `.is()` check) **Migration Example:** ```typescript // Apollo Client 3 if (error instanceof ApolloError) { console.log(error.graphQLErrors); console.log(error.networkError); } // Apollo Client 4 import { CombinedGraphQLErrors } from "@apollo/client"; if (CombinedGraphQLErrors.is(error)) { console.log(error.errors); // GraphQL errors } else if (error) { console.log(error.message); // Other errors } ``` ### The `dataState` Property A new property that clearly indicates the completeness of query results: **Values:** - `empty` - No data available (`data` is `undefined`) - `partial` - Incomplete data from cache when `returnPartialData` is `true` - `streaming` - Incomplete data from a deferred query still streaming - `complete` - Fully satisfied query result **Benefits:** - Accurate TypeScript type narrowing - Clear loading state distinction - Better handling of partial results ```typescript const { data, dataState } = useQuery(MY_QUERY); if (dataState === "complete") { // TypeScript knows data is fully populated console.log(data.allFields); } else if (dataState === "partial") { // TypeScript knows data might be missing fields console.log(data?.someField); } ``` ### Pluggable Incremental Delivery (`@defer` Support) Apollo Client 4.0 makes incremental delivery configurable and future-proof: ```typescript import { Defer20220824Handler } from "@apollo/client/incremental"; const client = new ApolloClient({ // ... incrementalHandler: new Defer20220824Handler(), }); ``` **Available Handlers:** - `NotImplementedHandler` - Default, throws if `@defer` is used - `Defer20220824Handler` - Apollo Router format support (also aliased as `GraphQL17Alpha2Handler`) ### Local State Management Improvements Local state is now opt-in via the `LocalState` class: ```typescript import { LocalState } from "@apollo/client/local-state"; const client = new ApolloClient({ cache, localState: new LocalState({ resolvers: { Query: { myField: () => "Hello World", }, }, }), }); ``` **Resolver Context Changes:** ```typescript // Apollo Client 3 const resolver = (parent, args, context, info) => { const { cache } = context; }; // Apollo Client 4 const resolver = (parent, args, context, info) => { const { client, requestContext, phase } = context; const cache = client.cache; }; ``` ## React-Specific Improvements ### More Predictable Hooks **`useLazyQuery` Overhaul:** - No longer accepts `variables` or `context` options (pass to `execute` instead) - `execute` function only accepts `variables` and `context` - Cannot be called during render or SSR - Automatic cancellation of in-flight queries when new ones start **`useMutation` Changes:** - Removed `ignoreResults` option - use `client.mutate` directly for fire-and-forget mutations **`useQuery` Changes:** - `notifyOnNetworkStatusChange` now defaults to `true` - Removed deprecated `onCompleted` and `onError` callbacks ### New SSR API The new `prerenderStatic` API replaces deprecated SSR functions: ```typescript import { prerenderStatic } from "@apollo/client/react/ssr"; // Works with React 19's prerender APIs const html = await prerenderStatic(, { client, }); ``` ### React Compiler Support Pre-compiled React hooks optimized by the React Compiler: ```typescript // Use compiled hooks for potential performance improvements import { useQuery } from "@apollo/client/react/compiled"; ``` The compiled hooks are built with React Compiler v19.1.0-rc.2 and include a runtime polyfill for compatibility with React 17+. ## Link System Evolution ### All Links Now Classes Migration from creator functions to classes: ```typescript // Apollo Client 3 import { createHttpLink, setContext } from "@apollo/client"; const httpLink = createHttpLink({ uri: "/graphql" }); const authLink = setContext((operation, prevContext) => { /*...*/ }); // Apollo Client 4 import { HttpLink, SetContextLink } from "@apollo/client"; const httpLink = new HttpLink({ uri: "/graphql" }); const authLink = new SetContextLink((prevContext, operation) => { /*...*/ }); ``` ### ErrorLink Changes ```typescript // Apollo Client 3 onError(({ graphQLErrors, networkError }) => { // Handle errors separately }); // Apollo Client 4 new ErrorLink(({ error }) => { if (CombinedGraphQLErrors.is(error)) { // Handle GraphQL errors } else if (error) { // Handle other errors } }); ``` ## Migration Tools ### Automated Codemod Apollo Client 4.0 provides a comprehensive codemod to automate migration: ```bash # Basic usage npx @apollo/client-codemod-migrate-3-to-4 src # TypeScript projects (run separately) npx @apollo/client-codemod-migrate-3-to-4 --parser ts --extensions ts src npx @apollo/client-codemod-migrate-3-to-4 --parser tsx --extensions tsx src ``` The codemod handles: 1. **Import updates** - Moves React imports to `@apollo/client/react` 2. **Type migrations** - Updates types to new namespaced locations 3. **Link updates** - Converts creator functions to classes 4. **Removed exports** - Moves to `@apollo/client/v4-migration` with migration instructions ## Breaking Changes Summary ### Installation ```bash # RxJS is now a peer dependency npm install @apollo/client graphql rxjs ``` ### ApolloClient Constructor - `link` option is now required (no more implicit `HttpLink` creation) - `uri`, `headers`, `credentials` removed - use `HttpLink` directly - `name` and `version` moved to `clientAwareness` option - `resolvers` moved to `LocalState` constructor - `connectToDevTools` replaced with `devtools.enabled` - `disableNetworkFetches` renamed to `prioritizeCacheValues` ### Type System - Removed `TContext` and `TCacheShape` generics - Types moved to namespaces (see migration guide for full list) - Custom context via module augmentation ### Observable Changes - Requires calling `.pipe()` for transformations - Use RxJS operators instead of method chaining ### Testing - `MockedProvider` now has realistic delays by default (20-50ms) - `createMockClient` removed - use `MockLink` directly ## Performance & Build Improvements - **Modern JavaScript**: No downlevel transpilation for modern features - **No Polyfills**: Cleaner bundles, bring your own if needed - **Development Mode**: Controlled via export conditions, not global `__DEV__` - **ESM Support**: Proper `exports` field for better module resolution - **Source Maps**: Fixed and improved for better debugging ## Deprecations & Removals ### Removed Packages/Exports - React render prop components (`@apollo/client/react/components`) - Higher-order components (`@apollo/client/react/hoc`) - `@apollo/client/react/parser` - `@apollo/client/utilities/globals` ## Upgrade Path 1. **Update to Apollo Client 3.14** first for deprecation warnings 2. **Install peer dependencies**: `npm install rxjs` 3. **Run the codemod** to automate import and type updates 4. **Update ApolloClient initialization** (explicit `HttpLink`, `LocalState` if needed) 5. **Review error handling** - update to use new error classes 6. **Test thoroughly** - especially SSR, error handling, and local state ## Resources - [Migration Guide](https://www.apollographql.com/docs/react/migrating/apollo-client-4-migration) - [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md) ## Acknowledgments Apollo Client 4.0 represents years of community feedback and contributions. Thank you to all our contributors, early adopters, and the entire GraphQL community for making this release possible.
### Major Changes - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Replace the `result` property on `ServerError` with `bodyText`. `bodyText` is set to the raw string body. `HttpLink` and `BatchHttpLink` no longer try and parse the response body as JSON when a `ServerError` is thrown. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `includeExtensions` option of `HttpLink` and `BatchHttpLink` now defaults to `true`. If `includeExtensions` is `true`, but `extensions` is not set or empty, extensions will not be included in outgoing requests. - [#12686](https://github.com/apollographql/apollo-client/pull/12686) [`dc4b1d0`](https://github.com/apollographql/apollo-client/commit/dc4b1d0d2479a37067113b7bd161a550fb8e4df6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - A `@defer` query that has not yet finished streaming is now considered loading and thus the `loading` flag will be `true` until the response has completed. A new `NetworkStatus.streaming` value has been introduced and will be set as the `networkStatus` while the response is streaming. - [#12539](https://github.com/apollographql/apollo-client/pull/12539) [`dd0d6d6`](https://github.com/apollographql/apollo-client/commit/dd0d6d6d96d8b810e30dc2fdee2ac8a2477d0017) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `onError` link now uses a single `error` property to report the error that caused the link callback to be called. This will be an instance of `CombinedGraphQLErrors` in the event GraphQL errors were emitted from the terminating link, `CombinedProtocolErrors` if the terminating link emitted protocol errors, or the unwrapped error type if any other non-GraphQL error was thrown or emitted. ```diff - const errorLink = onError(({ graphQLErrors, networkError, protocolErrors }) => { - graphQLErrors.forEach(error => console.log(error.message)); + const errorLink = onError(({ error }) => { + if (error.name === 'CombinedGraphQLErrors') { + error.errors.forEach(rawError => console.log(rawError.message)); + } }); ``` - [#12586](https://github.com/apollographql/apollo-client/pull/12586) [`605db8e`](https://github.com/apollographql/apollo-client/commit/605db8e94fe2ce74c0a395f38f6873d40f431365) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `typeDefs` option from `ApolloClient`. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `asyncMap` utility function. Instead use one of the RxJS operators that creates Observables from promises, such as `from`. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `isApolloError` utility function to check if the error object is an `ApolloError` instance. Use `instanceof` to check for more specific error types that replace `ApolloError`. - [#12379](https://github.com/apollographql/apollo-client/pull/12379) [`ef892b4`](https://github.com/apollographql/apollo-client/commit/ef892b4dc505b02049525f9aba32c51f1c00c922) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `addTypename` option from `InMemoryCache` and `MockedProvider`. `__typename` is now always added to the outgoing query document when using `InMemoryCache` and cannot be disabled. If you are using `` with `addTypename={false}`, ensure that your mocked responses include a `__typename` field. This will ensure cache normalization kicks in and behaves more like production. - [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `errors` property from `useQuery` and `useLazyQuery`. Read errors from the `error` property instead. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.getContext` now returns a `Readonly` type. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ApolloLink.Request` (i.e. `GraphQLRequest`) passed to `ApolloLink.execute` no longer accepts `operationName` and `operationType` options. These properties are derived from the `query` and set on the returned `ApolloLink.Operation` type. - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An error is now thrown when trying to call `fetchMore` on a `cache-only` query. - [#12222](https://github.com/apollographql/apollo-client/pull/12222) [`d1a9054`](https://github.com/apollographql/apollo-client/commit/d1a905461d4378522c3257de00afba2ae8decd22) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop support for React 16. - [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Remove `DataProxy` namespace and interface. - [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TSerialized` generic argument to `ApolloCache`. The `ApolloCache` base cache abstraction now returns `unknown` for `cache.extract` which can be overridden by a cache subclass. - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `getCacheKey` function is no longer available from `operation.getContext()` in the link chain. Use `operation.client.cache.identify(obj)` in the link chain instead. - [#12376](https://github.com/apollographql/apollo-client/pull/12376) [`a0c996a`](https://github.com/apollographql/apollo-client/commit/a0c996a816fbb6a2323231c0422d1c8a3e20cbaf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `ignoreResults` option from `useMutation`. If you don't want to synchronize component state with the mutation, use `useApolloClient` to access your client instance and use `client.mutate` directly. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - More strictly adhere to the [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http/draft/). This change adds support for the `application/graphql-response+json` media type and modifies the behavior of the `application/json` media type. - The client will parse the response as a well-formed GraphQL response when the server encodes `content-type` using `application/graphql-response+json` with a non-200 status code. - The client will now throw a `ServerError` when the server encodes `content-type` using `application/json` and returns a non-200 status code. - The client will now throw a `ServerError` when the server encodes using any other `content-type` and returns a non-200 status code. NOTE: If you use a testing utility to mock requests in your test, you may experience different behavior than production if your testing utility responds as `application/json` but your production server responds as `application/graphql-response+json`. If a `content-type` header is not set, the client interprets the response as `application/json`. - [#12600](https://github.com/apollographql/apollo-client/pull/12600) [`34ff6aa`](https://github.com/apollographql/apollo-client/commit/34ff6aa25b47c3e84d0b18e2c69bc995814bf2f2) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move most of the utilities in `@apollo/client/utilities` to `@apollo/client/utilities/internal`. Many of the utilities exported from the `@apollo/client/utilities` endpoint were not considered stable. As a result of this change, utilities or types exported from `@apollo/client/utilities` are now documented and considered stable and will not undergo breaking changes. - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/context` and `@apollo/client/react/hooks` entry points. Please use `@apollo/client/react` instead. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unusubscribing from `ObservableQuery` while a request is in flight will no longer terminate the request by unsubscribing from the link observable. - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead. ```diff const observable = client.watchQuery(options); // Use reobserve to set new options and reevaluate the query - observable.setOptions(newOptions); + observable.reobserve(newOptions); ``` As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change. - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `variables` from the result returned from `useSubscription`. - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `resultCacheMaxSize` option from `InMemoryCache` options. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `ApolloClient` constructor options `name` and `version` that are used to configure the client awareness feature have moved onto a `clientAwareness` key. ```diff const client = new ApolloClient({ // .. - name: "my-app", - version: "1.0.0", + clientAwareness: { + name: "my-app", + version: "1.0.0", + }, }); ``` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `previousData` property on `useLazyQuery` will now change only when `data` changes. Previously `previousData` would change to the same value as `data` while the query was loading. - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing any other field to `__typename` is now forbidden. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now keep previous `data` around when emitting a `loading` state, unless `query` or `variables` changed. Note that `@exports` variables are not taken into account for this, so `data` will stay around even if they change. - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Report masked fragments as complete even when a nested masked fragment contains partial data. - [#12788](https://github.com/apollographql/apollo-client/pull/12788) [`4179446`](https://github.com/apollographql/apollo-client/commit/417944677d2e79606b0f6cabd8d5d8b2063c876b) Thanks [@phryneas](https://github.com/phryneas)! - `TVariables` now always `extends OperationVariables` in all interfaces. - [#12224](https://github.com/apollographql/apollo-client/pull/12224) [`51e6c0f`](https://github.com/apollographql/apollo-client/commit/51e6c0f8657d20cedc570c6e9a244f877047dd61) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `partialRefetch` option. - [#12407](https://github.com/apollographql/apollo-client/pull/12407) [`8b1390b`](https://github.com/apollographql/apollo-client/commit/8b1390bf0050c6bd4d5a32b67c3b96369d0552d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Calling `refetch` with new variables will now set the `networkStatus` to `refetch` instead of `setVariables`. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`. - [#12457](https://github.com/apollographql/apollo-client/pull/12457) [`32e85ea`](https://github.com/apollographql/apollo-client/commit/32e85ea9eb93c1ffb10d6f70e9e2775e1326e9aa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Network errors triggered by queries now adhere to the `errorPolicy`. This means that GraphQL errors and network errors now behave the same way. Previously promise-based APIs, such as `client.query`, would reject the promise with the network error even if `errorPolicy` was set to `ignore`. The promise is now resolved with the `error` property set to the network error instead. - [#12840](https://github.com/apollographql/apollo-client/pull/12840) [`83e132a`](https://github.com/apollographql/apollo-client/commit/83e132ab1bacb3293da61dd4519379e36a1fb090) Thanks [@phryneas](https://github.com/phryneas)! - If you use an incremental delivery handler, you now have to explicitly opt into adding the chunk types to the `ApolloLink.Result` type. ```ts title="apollo-client.d.ts import { Defer20220824Handler } from "@apollo/client/incremental"; declare module "@apollo/client" { export interface TypeOverrides extends Defer20220824Handler.TypeOverrides {} } ``` - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are no longer refetched when calling `client.reFetchObservableQueries` when `includeStandby` is `true`. - [#12808](https://github.com/apollographql/apollo-client/pull/12808) [`8e31a23`](https://github.com/apollographql/apollo-client/commit/8e31a2303b18f6fc4d8ec1cf4c01bf26b90f3f0b) Thanks [@phryneas](https://github.com/phryneas)! - HTTP Multipart handling will now throw an error if the connection closed before the final boundary has been received. Data after the final boundary will be ignored. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `iterateObserversSafely` utility function. - [#12825](https://github.com/apollographql/apollo-client/pull/12825) [`292b949`](https://github.com/apollographql/apollo-client/commit/292b949e9e1d10a715e0fd403737361f91432fbf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `serializeFetchParameter` helper is no longer exported and `JSON.stringify` is used directly. As such, the `ClientParseError` type has also been removed in favor of throwing any JSON serialize errors directly. - [#12595](https://github.com/apollographql/apollo-client/pull/12595) [`60bb49c`](https://github.com/apollographql/apollo-client/commit/60bb49ccea9aecf3e6a212b5a1f71907e60af886) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/experimental` test utilities. Use [GraphQL Testing Library](https://github.com/apollographql/graphql-testing-library) instead. - [#12718](https://github.com/apollographql/apollo-client/pull/12718) [`ecfc02a`](https://github.com/apollographql/apollo-client/commit/ecfc02a37908b58d1f799f0e817cdeab98482720) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. - [#12470](https://github.com/apollographql/apollo-client/pull/12470) [`d32902f`](https://github.com/apollographql/apollo-client/commit/d32902f26a4c5dea30421ee52aeea52df3e5334e) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked: Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery` while one of those were active would permanently be changed from a `fetchPolicy` of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way even long after `disableNetworkFetches` would have been deactivated. Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement at request time, just for that one request. `ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` can now be reset back to empty when calling `reobserve` with `variables: undefined`. Previously the `variables` key would be ignored so `variables` would remain unchanged. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `never` is no longer supported as a valid `TVariables` generic argument for APIs that require `variables` as part of its type. Use `Record` instead. - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `connectToDevtools` option from `ApolloClientOptions`. Use `devtools.enabled` instead. - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `cache` and `forceFetch` properties are no longer available on context when calling `operation.getContext()`. `cache` can be accessed through the `operation` with `operation.client.cache` instead. `forceFetch` has been replaced with `queryDeduplication` which specifies whether `queryDeduplication` was enabled for the request or not. - [#12533](https://github.com/apollographql/apollo-client/pull/12533) [`73221d8`](https://github.com/apollographql/apollo-client/commit/73221d87bd5640986f86fe3ee50c63ed49834cbb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onError` and `setOnError` methods from `ApolloLink`. `onError` was only used by `MockLink` to rewrite errors if `setOnError` was used. - [#12485](https://github.com/apollographql/apollo-client/pull/12485) [`d338303`](https://github.com/apollographql/apollo-client/commit/d3383033d306b7d66e90f5f3170c24453cd76464) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error for queries and mutations if the link chain completes without emitting a value. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Removed `getLastResult`, `getLastError` and `resetLastResults` from `ObservableQuery` - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unsubscribing from an `ObservableQuery` before a value has been emitted will remove the query from the tracked list of queries and will no longer be eligible for query deduplication. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationType` is now a non-null `OperationTypeNode`. It is now safe to compare this value without having to check for `undefined`. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer wraps errors in `ApolloError`. `ApolloError` has been replaced with separate error classes depending on the cause of the error. As such, APIs that return an `error` property have been updated to use the generic `Error` type. Use `instanceof` to check for more specific error types. ## Migration guide `ApolloError` encapsulated 4 main error properties. The type of error would determine which property was set: - `graphqlErrors` - Errors returned from the `errors` field by the GraphQL server - `networkError` - Any non-GraphQL error that caused the query to fail - `protocolErrors` - Transport-level errors that occur during [multipart HTTP subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) - `clientErrors` - A space to define custom errors. Mostly unused. These errors were mutally exclusive, meaning both `networkError` and `graphqlErrors` were never set simultaneously. The following replaces each of these fields from `ApolloError`. ### `graphqlErrors` GraphQL errors are now encapsulated in a `CombinedGraphQLErrors` instance. You can access the raw GraphQL errors via the `errors` property. ```js import { CombinedGraphQLErrors } from "@apollo/client"; // ... const { error } = useQuery(query); if (error && error instanceof CombinedGraphQLErrors) { console.log(error.errors); } ``` ### `networkError` Network errors are no longer wrapped and are instead passed through directly. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { observer.error(new Error("Test error")); }); }), }); // ... const { error } = useQuery(query); // error is `new Error('Test error')`; ``` ### `protocolErrors` Protocol errors are now encapsulated in a `CombinedProtocolErrors` instance. You can access the raw protocol errors via the `errors` property. ```js import { CombinedProtocolErrors } from "@apollo/client"; // ... const { error } = useSubscription(subscription); if (error && error instanceof CombinedProtocolErrors) { console.log(error.errors); } ``` ### `clientErrors` These were unused by the client and have no replacement. Any non-GraphQL or non-protocol errors are now passed through unwrapped. ### Strings as errors If the link sends a string error, Apollo Client will wrap this in an `Error` instance. This ensures `error` properties are guaranteed to be of type `Error`. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { // Oops we sent a string instead of wrapping it in an `Error` observer.error("Test error"); }); }), }); // ... const { error } = useQuery(query); // The error string is wrapped and returned as `new Error('Test error')`; ``` ### Non-error types If the link chain sends any other object type as an error, Apollo Client will wrap this in an `UnknownError` instance with the [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) set to the original object. This ensures `error` properties are guaranteed to be of type `Error`. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { observer.error({ message: "Not a proper error type" }); }); }), }); // ... const { error } = useQuery(query); // error is an `UnknownError` instance. error.cause returns the original object. ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationName` is now set as `string | undefined` where `undefined` represents an anonymous query. Previously `operationName` would return an empty string as the `operationName` for anonymous queries. - [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TCacheShape` generic argument to `ApolloClient`. `client.extract()` now returns `unknown` by default. You will either need to type-cast this to the expected serialized shape, or use the `cache.extract()` directly from the subclass to get more specific types. - [#12774](https://github.com/apollographql/apollo-client/pull/12774) [`511b4f3`](https://github.com/apollographql/apollo-client/commit/511b4f3e792a75aa5aa27b335e8119dbc2a9c254) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apply document transforms before reading data from the cache for `client.readQuery`, `client.readFragment`, `client.watchFragment`, `useFragment`, and `useSuspenseFragment`. NOTE: This change does not affect the equivalent `cache.*` APIs. To read data from the cache without first running document transforms, run `cache.readQuery`, `cache.readFragment`, etc. - [#12705](https://github.com/apollographql/apollo-client/pull/12705) [`a60f411`](https://github.com/apollographql/apollo-client/commit/a60f411e58cc67730d0dc4513e4045f004027ded) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries will now initialize with `loading: false` and `networkStatus: NetworkStatus.ready` when there is no data in the cache. This means `useQuery` will no longer render a short initial loading state before rendering `loading: false` and `ObservableQuery.getCurrentResult()` will now return `loading: false` immediately. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromError` utility function. Use [`throwError`](https://rxjs.dev/api/index/function/throwError) instead. - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `TData` generic provided to types that return a `dataState` property is now modified by the given `DataState` generic instead of passing a modified `TData` type. For example, a `QueryRef` that could return partial data was defined as `QueryRef, TVariables>`. Now `TData` should be provided unmodified and a set of allowed states should be given instead: `QueryRef`. To migrate, use the following guide to replace your type with the right set of states (all types listed below are changed the same way): ```diff - QueryRef // `QueryRef`'s default is 'complete' | 'streaming' so this can also be left alone if you prefer // All other types affected by this change default to all states + QueryRef + QueryRef - QueryRef + QueryRef - QueryRef, TVariables> + QueryRef - QueryRef | undefined, TVariables> + QueryRef ``` The following types are affected. Provide the allowed `dataState` values to the `TDataState` generic: - `ApolloQueryResult` - `QueryRef` - `PreloadedQueryRef` - `useLazyQuery.Result` - `useQuery.Result` - `useReadQuery.Result` - `useSuspenseQuery.Result` All `*QueryRef` types default to `complete | streaming` states while the rest of the types default to `'complete' | 'streaming' | 'partial' | 'empty'` states. You shouldn't need to provide the states unless you need to either allow for partial data/empty values (`*QueryRef`) or a restricted set of states. - [#12850](https://github.com/apollographql/apollo-client/pull/12850) [`268cd80`](https://github.com/apollographql/apollo-client/commit/268cd800a2d73305c0df8dd38b6bd1cee98f0fec) Thanks [@phryneas](https://github.com/phryneas)! - Introduce a versioning policy. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `concat`, `from`, and `split` functions on `ApollLink` no longer support a plain request handler function. Please wrap the request handler with `new ApolloLink`. ```diff const link = new ApolloLink(/* ... */); link.concat( - (operation, forward) => forward(operation), + new ApolloLink((operation, forward) => forward(operation)), ); ``` - [#12802](https://github.com/apollographql/apollo-client/pull/12802) [`e2b51b3`](https://github.com/apollographql/apollo-client/commit/e2b51b30acbd360253100f9d2a91fe7e0c57be4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Disallow the `mutation` option for the `mutate` function returned from `useMutation`. - [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `graphql`, `withQuery`, `withMutation`, `withSubscription`, and `withApollo` hoc components. Use the provided React hooks instead. - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing a field to an alias beginning with `__ac_` is now forbidden - this namespace is now reserved for internal use. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - When passing a `variables` key with the value `undefined`, the value will be replaced by the default value in the query, if it is provided, rather than leave it as `undefined`. ```ts // given this query const query = gql` query PaginatedQuery($limit: Int! = 10, $offset: Int) { list(limit: $limit, offset: $offset) { id } } `; const observable = client.query({ query, variables: { limit: 5, offset: 0 }, }); console.log(observable.variables); // => { limit: 5, offset: 0 } observable.reobserve({ variables: { limit: undefined, offset: 10 } }); // limit is now `10`. This would previously be `undefined` console.log(observable.variables); // => { limit: 10, offset: 10 } ``` - [#12262](https://github.com/apollographql/apollo-client/pull/12262) [`10ef733`](https://github.com/apollographql/apollo-client/commit/10ef7338cdcbbaf75d806f426e9708c9e095c2da) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `itAsync` test utility. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Adds enhanced client awareness to the client. `HttpLink` and `BatchHttpLink` will now per default send information about the client library you are using in `extensions`. This could look like this: ```json { "query": "query GetUser($id: ID!) { user(id: $id) { __typename id name } }", "variables": { "id": 5 }, "extensions": { "clientLibrary": { "name": "@apollo/client", "version": "4.0.0" } } } ``` This feature can be disabled by passing `enhancedClientAwareness: { transport: false }` to your `ApolloClient`, `HttpLink` or `BatchHttpLink` constructor options. - [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The new `SetContextLink` flips the `prevContext` and `operation` arguments in the callback. The `setContext` function has remained unchanged. ```diff - new SetContextLink((operation, prevContext) => { + new SetContextLink((prevContext, operation) => { // ... }) ``` - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`. - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include: - `BaseMutationOptions` - `BaseQueryOptions` - `BaseSubscriptionOptions` - `ObservableQueryFields` - `MutationSharedOptions` - `QueryFunctionOptions` - [#12675](https://github.com/apollographql/apollo-client/pull/12675) [`8f1d974`](https://github.com/apollographql/apollo-client/commit/8f1d974881ff54339b6b6593a219ba6d5fd013c0) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` no longer has a `queryId` property. `ApolloClient.getObservableQueries` no longer returns a `Map`, but a `Set`. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Updates the `ServerError` and `ServerParseError` types to be proper `Error` subclasses. Perviously these were plain `Error` intances with additional properties added at runtime. All properties are retained, but `instanceof` checks now work correctly. ```js import { ServerError, ServerParseError } from "@apollo/client"; if (error instanceof ServerError) { // ... } if (error instanceof ServerParseError) { // ... } ``` - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are now excluded from `client.refetchQueries` in all situations. `cache-only` queries affected by `updateCache` are also excluded from `refetchQueries` when `onQueryUpdated` is not provided. - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports SSR environments and will now throw if the `execute` function is called in SSR. If you need to run a query in an SSR environment, use `useQuery` instead. - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `resolvers` option from `ApolloClient`. Local resolvers have instead been moved to the new `LocalState` instance which is assigned to the `localState` option in `ApolloClient`. To migrate, move the `resolvers` values into a `LocalState` instance and assign that instance to `localState`. ```diff new ApolloClient({ - resolvers: { /* ... */ } + localState: new LocalState({ + resolvers: { /* ... */ } + }), }); ``` - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server. `useMutation` now also returns a `MutateResult` instead of a `FetchResult`. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The execute function returned from `useLazyQuery` now only supports the `context` and `variables` options. This means that passing options supported by the hook no longer override the hook value. To change options, rerender the component with new options. These options will take effect with the next query execution. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery` will no longer terminate on errors and will instead emit a `next` value with an `error` property. This ensures that `ObservableQuery` instances can continue to receive updates after errors are returned in requests without the need to resubscribe to the observable. - [#12681](https://github.com/apollographql/apollo-client/pull/12681) [`b181f98`](https://github.com/apollographql/apollo-client/commit/b181f98476e635ba3eccab170c09d91f5408060c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changing most options when rerendering `useQuery` will no longer trigger a `reobserve` which may cause network fetches. Instead, the changed options will be applied to the next cache update or fetch. Options that now trigger a `reobserve` when changed between renders are: - `query` - `variables` - `skip` - Changing `fetchPolicy` to or from `standby` - [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Generic arguments for `Cache.ReadOptions` were flipped from `TVariables, TData` to `TData, TVariables`. - [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - You must now opt in to use GraphQL Codegen data masking types when using Apollo Client's data masking feature. By default, Apollo Client now uses an identity type to apply to masked/unmasked types. If you're using GraphQL Codegen to generate masked types, opt into the GraphQL Codegen masked types using declaration merging on the `TypeOverides` interface. ```ts title="apollo-client.d.ts import { GraphQLCodegenDataMasking } from "@apollo/client/masking"; declare module "@apollo/client" { export interface TypeOverrides extends GraphQLCodegenDataMasking.TypeOverrides {} } ``` - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `error` argument for the `delay` and `attempts` functions on `RetryLink` are an `ErrorLike`. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `throwServerError` utility function. Now that `ServerError` is an `Error` subclass, you can throw these errors directly: ```js import { ServerError } from "@apollo/client"; // instead of throwServerError(response, result, "error message"); // Use throw new ServerError("error message", { response, result }); ``` - [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The types mode for data masking has been removed. Adding a types mode to the `DataMasking` interface has no effect. Remove the `mode` key in the module where you declare the `DataMasking` type for the `@apollo/client` module. As a result, the `Masked` and `MaskedDocumentNode` types have also been removed since these have no effect when types are preserved. - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `Cache.DiffResult` type is now a union type with better type safety for both complete and partial results. Checking `diff.complete` will now narrow the type of `result` depending on whether the value is `true` or `false`. When `true`, `diff.result` will be a non-null value equal to the `T` generic type. When `false`, `diff.result` now reports `result` as `DeepPartial | null` indicating that fields in the result may be missing (`DeepPartial`) or empty entirely (`null`). - [#12731](https://github.com/apollographql/apollo-client/pull/12731) [`0198870`](https://github.com/apollographql/apollo-client/commit/0198870107eab7ad0bc69a549cb069fa41b3280f) Thanks [@phryneas](https://github.com/phryneas)! - Ship React Compiler compiled React hooks in `@apollo/client/react/compiled`. We now ship a React-Compiler compiled version of the React hooks in `@apollo/client/react/compiled`. This entry point contains everything that `@apollo/client/react` does, so you can use it as a drop-in replacement in your whole application if you choose to use the compiled hooks. - [#12446](https://github.com/apollographql/apollo-client/pull/12446) [`ab920d2`](https://github.com/apollographql/apollo-client/commit/ab920d2701aa276482dbc78b44a1c25c76467bc9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `defaultOptions` option from `useQuery`. Use options directly or use the global `ApolloClient` `defaultOptions`. - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `QueryReference` type. Please use `QueryRef` instead. - [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `errors` property from the results emitted from `ObservableQuery` or returned from `client.query`. Read errors from the `error` property instead. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The result resolved from the promise returned from the execute function in `useLazyQuery` is now an `ApolloQueryResult` type and no longer includes all the fields returned from the `useLazyQuery` hook tuple. If you need access to the additional properties such as `called`, `refetch`, etc. not included in `ApolloQueryResult`, read them from the hook instead. - [#12531](https://github.com/apollographql/apollo-client/pull/12531) [`7784b46`](https://github.com/apollographql/apollo-client/commit/7784b46117a4f91a270a020ed1a24f042cb9ee17) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mocked responses passed to `MockLink` now accept a callback for the `request.variables` option. This is used to determine if the mock should be matched for a set of request variables. With this change, the `variableMatcher` option has been removed in favor of passing a callback to `variables`. Update by moving the callback function from `variableMatcher` to `request.variables`. ```diff new MockLink([ { request: { query, + variables: (requestVariables) => true }, - variableMatcher: (requestVariables) => true } ]); ``` - [#12793](https://github.com/apollographql/apollo-client/pull/12793) [`24e98a1`](https://github.com/apollographql/apollo-client/commit/24e98a16648d4c21f37ba51a678a8849f88174ea) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloConsumer` has been removed - please use `useApolloClient` instead. - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Rework option handling for `fetchMore`. - Previously, if the `query` option was specified, no options would be inherited from the underlying `ObservableQuery`. Now, even if `query` is specified, all unspecified options except for `variables` will be inherited from the underlying `ObservableQuery`. - If `query` is not specified, `variables` will still be shallowly merged with the `variables` of the underlying `ObservableQuery`. If a `query` option is specified, the `variables` passed to `fetchMore` are used instead. - `errorPolicy` of `fetchMore` will now always default to `"none"` instead of inherited from the `ObservableQuery` options. This can prevent accidental cache writes of partial data for a paginated query. To opt into receive partial data that may be written to the cache, pass an `errorPolicy` to `fetchMore` to override the default. - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove local resolvers APIs from `ApolloClient` in favor of `localState`. Methods removed are: - `addResolvers` - `getResolvers` - `setResolvers` - `setLocalStateFragmentMatcher` - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink.execute` now requires a third argument which provides the `client` that initiated the request to the link chain. If you use `execute` directly, add a third argument with a `client` property: ```ts ApolloLink.execute(link, operation, { client }); // or if you import the `execute` function directly: execute(link, operation, { client }); ``` - [#12526](https://github.com/apollographql/apollo-client/pull/12526) [`391af1d`](https://github.com/apollographql/apollo-client/commit/391af1dd733219b7e1e14cfff9d5e3ce3967242f) Thanks [@phryneas](https://github.com/phryneas)! - The `@apollo/client` and `@apollo/client/core` entry points are now equal. In the next major, the `@apollo/client/core` entry point will be removed. Please change imports over from `@apollo/client/core` to `@apollo/client`. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `Streaming` type that will mark `data` in results while `dataState` is `"streaming"`. `Streaming` defaults to `TData`, but can be overwritten in userland to integrate with different codegen dialects. You can override this type globally - this example shows how to override it with `DeepPartial`: ```ts import { HKT, DeepPartial } from "@apollo/client/utilities"; type StreamingOverride = DeepPartial; interface StreamingOverrideHKT extends HKT { return: StreamingOverride; } declare module "@apollo/client" { export interface TypeOverrides { Streaming: StreamingOverrideHKT; } } ``` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will no longer rerender with the loading state when calling the execute function the first time unless the `notifyOnNetworkStatusChange` option is set to `true` (which is the new default). If you prefer the behavior from 3.x, rerender the component with `notifyOnNetworkStatusChange` set to `false` after the execute function is called the first time. ```ts function MyComponent() { const [notifyOnNetworkStatusChange, setNotifyOnNetworkStatusChange] = useState(true); const [execute] = useLazyQuery(query, { notifyOnNetworkStatusChange }); async function runExecute() { await execute(); // Set to false after the initial fetch to stop receiving notifications // about changes to the loading states. setNotifyOnNetworkStatusChange(false); } // ... } ``` - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors. - [#12254](https://github.com/apollographql/apollo-client/pull/12254) [`0028ac0`](https://github.com/apollographql/apollo-client/commit/0028ac0147aaea9ab559f15630200a132b43da42) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the default `Accept` header to `application/graphql-response+json`. - [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - If the `execute` function of `useLazyQuery` is executed, previously started queries from the same `useLazyQuery` usage will be rejected with an `AbortError` unless `.retain()` is called on the promise returned by previous `execute` calls. Please keep in mind that `useLazyQuery` is primarily meant as a means to synchronize your component to the status of a query and that it's purpose it not to make a series of network calls. If you plan on making a series of network calls without the need to synchronize the result with your component, consider using `ApolloClient.query` instead. - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/parser` entry point. There is no replacement. - [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setVariables` will now resolve with the last emitted result instead of `undefined` when either the variables match the current variables or there are no subscribers to the query. - [#12685](https://github.com/apollographql/apollo-client/pull/12685) [`3b74800`](https://github.com/apollographql/apollo-client/commit/3b748003df89ec69a6ad045fb47bbe9c3e62104c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the check and warning for `cache.fragmentMatches` when applying data masking. `cache.fragmentMatches` is a required API and data masking may crash when `cache.fragmentMatches` does not exist. - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client now defaults to production mode, not development mode, if the environment cannot be determined. In modern bundlers, this should automatically be handled by the bundler loading the bundler with the `development` export condition. If neither the `production` nor the `development` export condition are used by the bundler/runtime, Apollo Client will fall back to `globalThis.__DEV__` to determine if it should run in production or development mode. Unlike Apollo Client 3 though, if `globalThis.__DEV__` is not set to `true`, Apollo Client will now default to `production`, not to `development`, behaviour. This switch to _explicilty_ requiring `true` also resolves a situation where an HTML element with `id="__DEV__"` would create a global `__DEV__` variable with a referent to the DOM element, which in the past was picked up as "truthy" and would have triggered development mode. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the default `Accept` header to `application/graphql-response+json,application/json;q=0.9`. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback. - [#12499](https://github.com/apollographql/apollo-client/pull/12499) [`ce35ea2`](https://github.com/apollographql/apollo-client/commit/ce35ea2b3a87d6dd6757e9be50ecc42837bebe56) Thanks [@phryneas](https://github.com/phryneas)! - Enable React compiler for hooks in ESM builds. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `reobserve` option is no longer available in the result returned from `useLazyQuery`. This was considered an internal API and should not be used directly. - [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `data` property on `ApolloQueryResult`. Previously this field was non-optional, non-null `TData`, however at runtime this value could be set to `undefined`. This field is now reported as `TData | undefined`. This will affect you in a handful of places: - The `data` property emitted from the result passed to the `next` callback from `client.watchQuery` - Fetch-based APIs that return an `ApolloQueryResult` type such as `observableQuery.refetch`, `observableQuery.fetchMore`, etc. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `HttpLink` and `BatchHttpLink` no longer emit a `next` notification with the JSON-parsed response body when a well-formed GraphQL response is returned and a `ServerError` is thrown. - [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `operation` argument to the callback passed to `SetContextLink` is now of type `SetContextLink.SetContextOperation` which is an `Operation` without the `getContext` or `setContext` functions. Previously the type of `operation` was `GraphQLRequest` which had access to a `context` property. The `context` property was always `undefined` and could result in bugs when using it instead of the `prevContext` argument. This change means the `operation` argument now contains an accessible `client` property. - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move internal testing utilities in `@apollo/client/testing` to `@apollo/client/testing/internal` and remove deprecated testing utilities. Some of the testing utilities exported from the `@apollo/client/testing` endpoint were not considered stable. As a result of this change, testing utilities or types exported from `@apollo/client/testing` are now considered stable and will not undergo breaking changes. The following APIs were removed. To migrate, update usages of the following APIs as such: **`createMockClient`** ```diff - const client = createMockClient(data, query, variables); + const client = new ApolloClient({ + cache: new InMemoryCache(), + link: new MockLink([ + { + request: { query, variables }, + result: { data }, + } + ]), + }); ``` **`mockObservableLink`** ```diff - const link = mockObservableLink(); + const link = new MockSubscriptionLink(); ``` **`mockSingleLink`** ```diff - const link = mockSingleLink({ - request: { query, variables }, - result: { data }, - }); + const link = new MockLink([ + { + request: { query, variables }, + result: { data }, + } + ]); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Third-party caches must now implement the `fragmentMatches` API. Additionally `fragmentMatches` must be able to handle both `InlineFragmentNode` and `FragmentDefinitionNode` nodes. ```ts class MyCache extends ApolloCache { // This is now required public fragmentMatches( fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string ): boolean { return; // ... logic to determine if typename matches fragment } } ``` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The promise returned when calling the execute function from `useLazyQuery` will now reject when using an `errorPolicy` of `none` when GraphQL errors are returned from the result. - [#12684](https://github.com/apollographql/apollo-client/pull/12684) [`e697431`](https://github.com/apollographql/apollo-client/commit/e697431a9995fd1900e625c30a9065edd71111d9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `context` from `useLazyQuery` hook options. If used, `context` must now be provided to the `execute` function. `context` will reset to `{}` if not provided as an option to `execute`. - [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ErrorResponse` object passed to the `disable` and `retry` callback options provided to `createPersistedQueryLink` no longer provides separate `graphQLErrors` and `networkError` properties and instead have been combined to a single `error` property of type `ErrorLike`. ```diff // The following also applies to the `retry` function since it has the same signature createPersistedQueryLink({ - disable: ({ graphQLErrors, networkError }) => { + disable: ({ error }) => { - if (graphQLErrors) { + if (CombinedGraphQLErrors.is(error)) { // ... handle GraphQL errors } - if (networkError) { + if (error) { // ... handle link errors } // optionally check for a specific kind of error - if (networkError) { + if (ServerError.is(error)) { // ... handle a server error } }); ``` The `response` property has also been renamed to `result`. ```diff createPersistedQueryLink({ - disable: ({ response }) => { + disable: ({ result }) => { // ... handle GraphQL errors } } }); ``` - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move all 1st party link types into a namespace. - [#12223](https://github.com/apollographql/apollo-client/pull/12223) [`69c1cb6`](https://github.com/apollographql/apollo-client/commit/69c1cb6f831941598987185238a299b050a364bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `subscribeAndCount` testing utility from `@apollo/client/testing`. - [#12300](https://github.com/apollographql/apollo-client/pull/12300) [`4d581e4`](https://github.com/apollographql/apollo-client/commit/4d581e4f5a3c5409e5f06a5f164beabdada150f1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Moves all React-related exports to the `@apollo/client/react` entrypoint and out of the main `@apollo/client` entrypoint. This prevents the need to install React in order to use the core client. The following is a list of exports available in `@apollo/client` that should now import from `@apollo/client/react`. - `ApolloConsumer` - `ApolloProvider` - `createQueryPreloader` - `getApolloContext` - `skipToken` - `useApolloClient` - `useBackgroundQuery` - `useFragment` - `useLazyQuery` - `useLoadableQuery` - `useMutation` - `useQuery` - `useQueryRefHandlers` - `useReactiveVar` - `useReadQuery` - `useSubscription` - `useSuspenseQuery` The following is a list of exports available in `@apollo/client/testing` that should now import from `@apollo/client/testing/react`: - `MockedProvider` - [#12525](https://github.com/apollographql/apollo-client/pull/12525) [`8785186`](https://github.com/apollographql/apollo-client/commit/87851863b94eebbc208671b17aeca73748ac41f6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error when a client-only query is used in a mocked response passed to `MockLink`. - [#12588](https://github.com/apollographql/apollo-client/pull/12588) [`eed825a`](https://github.com/apollographql/apollo-client/commit/eed825a2549f1d21fff2ec179815206b3baf0fcb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TContext` generic argument from all types that use it. `TContext` is replaced with `DefaultContext` which can be modified using declaration merging. - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery`s will now only be registered with the `ApolloClient` while they have subscribers. That means that `ApolloClient.getObservableQueries` and `ApolloClient.refetchQueries` will only be able to return/refetch queries that have at least one subscriber. This changes the previous meaning of `active` and `inactive` queries: - `inactive` queries are queries with a subscriber that are skipped from a React hook or have a `fetchPolicy` of `standby` - `active` queries are queries with at least one subscriber that are not skipped or in `standby`. `ObservableQuery`s without subscribers but with an active ongoing network request (e.g. caused by calling `reobserve`) will be handled as if they had a subscriber for the duration of the query. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `transformOperation` and `validateOperation` have been removed and are no longer exported from `@apollo/client/link/utils`. These utilities have been merged into the implementation of `createOperation`. As a result, `createOperation` now returns a well-formed `Operation` object. Previously `createOperation` relied on an external call to `transformOperation` to provide a well-formed `Operation` type. If you use `createOperation` directly, remove the calls to `transformOperation` and `validateOperation` and pass the request directly. - [#12428](https://github.com/apollographql/apollo-client/pull/12428) [`abed922`](https://github.com/apollographql/apollo-client/commit/abed92225fd2a5d2a0a2298893a1170df1cd7400) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `urql` multipart subscriptions utilities. Use the native multipart subscriptions support in `urql` instead. - [#12590](https://github.com/apollographql/apollo-client/pull/12590) [`a005e82`](https://github.com/apollographql/apollo-client/commit/a005e822de7b24783f85be45df142ffbb9bc561b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop `graphql` v15 as a valid peer dependency. - [#12678](https://github.com/apollographql/apollo-client/pull/12678) [`91a876b`](https://github.com/apollographql/apollo-client/commit/91a876b059042828e431931e7a3c2e0365c387b8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `queryRef`s created by `preloadQuery` no longer have a `.toPromise()` function. Instead `preloadQuery` now has a `toPromise` function that accepts a queryRef and will resolve when the underlying promise has been resolved. ```diff const queryRef = preloadQuery(query, options); - await queryRef.toPromise(); + await preloadQuery.toPromise(queryRef); ``` - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Reworked the logic for then a loading state is triggered. If the link chain responds synchronously, a loading state will be omitted, otherwise it will be triggered. If local resolvers are used, the time window for "sync vs async" starts as soon as `@exports` variables are resolved. - [#12637](https://github.com/apollographql/apollo-client/pull/12637) [`d2a60d4`](https://github.com/apollographql/apollo-client/commit/d2a60d45e734a2518dad2443f85d82553cd6456a) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery`: only advance `previousData` if `data` actually changed - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Switch to [RxJS](https://rxjs.dev/) as the observable implementation. `rxjs` is now a peer dependency of Apollo Client which means you will now need to install `rxjs` in addition to `@apollo/client`. This change is mostly transparent, however transforming values on observables, common in link implementations, differs in RxJS vs `zen-observable`. For example, you could modify values in the link chain emitted from a downstream link by using the `.map` function. In RxJS, this is done with the `.pipe` function and passing a `map` operator instead. ```ts import { map } from "rxjs"; const link new ApolloLink((operation, forward) => { return forward(operation).pipe( map((result) => performTransform(result)) ); }); ``` For a full list of operators and comprehensive documentation on the capabilities of RxJS, check out the [documentation](https://rxjs.dev/). - [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `canonizeResults` option. It was prone to memory leaks. As such, some results that were referentially equal when `canonizeResults` option was set to `true` no longer retain the same object identity. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The request handler provided to `ApolloLink` must now return an `Observable`. `null` is no longer supported as a valid return value. If you rely on `null` so that `ApolloLink` provides an empty observable, use the `EMPTY` observable from RxJS instead: ```diff import { ApolloLink } from "@apollo/client"; + import { EMPTY } from "rxjs"; const link = new ApolloLink((operation, forward) => { - return null; + return EMPTY; }); ``` If you have a custom link that overrides the `request` method, remove `null` from the return signature: ```diff class MyCustomLink extends ApolloLink { request( operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction, - ): Observable | null { + ): Observable { // implementation } } ``` - [#12329](https://github.com/apollographql/apollo-client/pull/12329) [`61febe4`](https://github.com/apollographql/apollo-client/commit/61febe4ef8712a2035d7ac89ea7283138db5229d) Thanks [@phryneas](https://github.com/phryneas)! - Rework package publish format (#12329, #12382) We have reworked the way Apollo Client is packaged. - shipping ESM and CJS - fixing up source maps - the build targets a modern runtime environment (browserslist query: `"since 2023, node >= 20, not dead"`) - removed the "proxy directory" `package.json` files, e.g. `cache/core/package.json` and `react/package.json`. While these helped with older build tools, modern build tooling uses the `exports` field in the root `package.json` instead and the presence of these files can confuse modern build tooling. If your build tooling still relies on those, please update your imports to import from e.g. `@apollo/client/cache/core/index.js` instead of `@apollo/client/cache/core` - but generally, this should not be necessary. - added an `exports` field to `package.json` to expose entry points - instead of `globalThis.__DEV__`, Apollo Client now primarily relies on the `development` and `production` exports conditions. It falls back to `globalThis.__DEV__` if the bundler doesn't know these, though. - [#12566](https://github.com/apollographql/apollo-client/pull/12566) [`ce4b488`](https://github.com/apollographql/apollo-client/commit/ce4b488bef13f2f5ce1b348d8c3196e198165dd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't `broadcastQueries` when a query is torn down. - [#12397](https://github.com/apollographql/apollo-client/pull/12397) [`2545a54`](https://github.com/apollographql/apollo-client/commit/2545a5415b06283be83eb9c4a03a3a8a39b8bcde) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `ObservableQuery.resetQueryStoreErrors` method. This method reset some internal state that was not consumed elsewhere in the client and resulted in a no-op. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromPromise` utility function. Use [`from`](https://rxjs.dev/api/index/function/from) instead. - [#12388](https://github.com/apollographql/apollo-client/pull/12388) [`0d825be`](https://github.com/apollographql/apollo-client/commit/0d825bef533b41f2e99ef22e620d9f9472825057) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require environments that support `WeakMap`, `WeakSet` and symbols. Apollo Client would fallback to `Map` and `Set` if the weak versions were not available. This has been removed and expects that these features are available in the source environment. If you are running in an environment without `WeakMap`, `WeakSet` or symbols, you will need to find appropriate polyfills. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports calling the execute function in render and will now throw. If you need to execute the query immediately, use `useQuery` instead or move the call to a `useEffect`. - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now return a `loading: false` state for `fetchPolicy` `standby`, even before subscription - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/core` entrypoint in favor of `@apollo/client/testing`. - [#12591](https://github.com/apollographql/apollo-client/pull/12591) [`a7e7383`](https://github.com/apollographql/apollo-client/commit/a7e738328951f5dac25a5fe48d28b3640a3e0eb9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename the `@apollo/client/link/core` entrypoint to `@apollo/client/link`. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `defaultOptions` and `initialFetchPolicy` options are no longer supported with `useLazyQuery`. If you use `defaultOptions`, pass those options directly to the hook instead. If you use `initialFetchPolicy`, use `fetchPolicy` instead. - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `OperationBatcher` class is no longer exported from `@apollo/client/link/batch`. It is an implementation detail of `BatchLink` and should not be relied on directly. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `createOperation` no longer accepts `context` as the first argument. Instead make sure `context` is set as the `context` property on the request passed to `createOperation`. ```diff createOperation( - startingContext, - { query }, + { query, context: startingContext }, { client } ); ``` - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Dropped the `saveAsLastResult` argument from `ObservableQuery.getCurrentResult` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports `variables` in the hook options and therefore no longer performs variable merging. The execute function must now be called with `variables` instead. ```ts function MyComponent() { const [execute] = useLazyQuery(query); function runExecute() { execute({ variables: { ... }}); } } ``` This change means the execute function returned from `useLazyQuery` is more type-safe. The execute function will require you to pass a `variables` option if the query type includes required variables. - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The resolver function's `context` argument (the 3rd argument) has changed to provide additional information without the possibility of name clashes. Previously the `context` argument would spread request context and override the `client` and `cache` properties to give access to both inside of a resolver. The `context` argument takes now takes the following shape: ```ts { // the request context. By default `TContextValue` is of type `DefaultContext`, // but can be changed if a `context` function is provided. requestContext: TContextValue, // The client instance making the request client: ApolloClient, // Whether the resolver is run as a result of gathering exported variables // or resolving the value as part of the result phase: "exports" | "resolve" } ``` To migrate, pull any request context from `requestContext` and the `cache` from the `client` property: ```diff new LocalState({ resolvers: { Query: { - myResolver: (parent, args, { someValue, cache }) => { + myResolver: (parent, args, { requestContext, client }) => { + const someValue = requestContext.someValue; + const cache = client.cache; } } } }); ``` - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries no longer poll when a `pollInterval` is set. Instead a warning is now emitted that polling has no effect. If the `fetchPolicy` is changed to `cache-only` after polling is already active, polling is stopped. - [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `response` property in `onError` link has been renamed to `result`. ```diff - onError(({ response }) => { + onError(({ result }) => { // ... }); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer ships with support for `@client` fields out-of-the-box and now must be opt-in. To opt in to use `@client` fields, pass an instantiated `LocalState` instance to the `localState` option. If a query contains `@client` and local state hasn't been configured, an error will be thrown. ```ts import { LocalState } from "@apollo/client/local-state"; new ApolloClient({ localState: new LocalState(), }); ``` - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `delay` for all mocked responses passed to `MockLink` using `realisticDelay`. This ensures your test handles loading states by default and is not reliant on a specific timing. If you would like to restore the old behavior, use a global default delay of `0`. ```ts MockLink.defaultOptions = { delay: 0, }; ``` - [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `resetResultIdentities` option from `InMemoryCache.gc()`. This affected object canonization which has been removed. - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` `cache.diff` now returns `null` instead of an empty object (`{}`) when `returnPartialData` is `true` and the result is empty. If you use `cache.diff` directly with `returnPartialData: true`, you will need to check for `null` before accessing any other fields on the `result` property. A non-null value indicates that at least one field was present in the cache for the given query document. ### Changes for third-party cache implementations The client now expects `cache.diff` to return `null` instead of an empty object when there is no data that can be fulfilled from the cache and `returnPartialData` is `true`. If your cache implementation returns an empty object, please update this to return `null`. - [#12433](https://github.com/apollographql/apollo-client/pull/12433) [`b86e50b`](https://github.com/apollographql/apollo-client/commit/b86e50b1dc121cd67fe73655256b6c61afc18cb4) Thanks [@phryneas](https://github.com/phryneas)! - Remove workarounds for streaming with non-WhatWG response bodies to reduce bundle size. This removes support for `fetch` implementations that return Node Streams, Async Iterators or Blob instances as `Response.body`. In the WhatWG Fetch specification, [`Response.body`](https://fetch.spec.whatwg.org/#body) is specified as a WhatWG [ReadableStream](https://streams.spec.whatwg.org/#readablestream). At this point in time, this is natively supported in browsers, `node` and React Native (via [react-native-fetch-api](https://www.npmjs.com/package/react-native-fetch-api), see our [setup instructions for React Native](https://www.apollographql.com/docs/react/integrations/react-native#consuming-multipart-http-via-text-streaming)). If you are using an older `fetch` polyfill that deviates from the spec, this might not be compatible - for example, [node-fetch](https://github.com/node-fetch/node-fetch?tab=readme-ov-file#interface-body) returns a node `Readable` instead of a `ReadableStream`. In those cases, please switch to a compatible alternative such as the `node`-native `fetch`, or `undici`. - [#12484](https://github.com/apollographql/apollo-client/pull/12484) [`9a8b9ce`](https://github.com/apollographql/apollo-client/commit/9a8b9cebbcf290984a4f154f261a4090e636e50e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `loading`, `networkStatus`, and `partial` properties on all promise-based query APIs. These properties were mostly static and were unnecessary since promise resolution guaranteed that the query was not longer loading. This affects the following APIs: - `client.query` - `client.refetchQueries` - `client.reFetchObservableQueries` - `client.resetStore` - `observableQuery.fetchMore` - `observableQuery.refetch` - `observableQuery.reobserve` - `observableQuery.setVariables` - The `useLazyQuery` `execute` function - [#12512](https://github.com/apollographql/apollo-client/pull/12512) [`e809b71`](https://github.com/apollographql/apollo-client/commit/e809b71aa9a02917a286afdbb03d5be8e5947c53) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`. ```ts new ApolloClient({ defaultOptions: { watchQuery: { // Use the v3 default notifyOnNetworkStatusChange: false, }, }, }); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `fragmentMatcher` option from `ApolloClient`. Custom fragment matchers used with local state are no longer supported. Fragment matching is now performed by the configured `cache` via the `cache.fragmentMatches` API. - [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes `ObservableQuery.result()` method. If you use this method and need similar functionality, use the `firstValueFrom` helper in RxJS. ```ts import { firstValueFrom, from } from "rxjs"; // The `from` is necessary to turn `observableQuery` into an RxJS observable const result = await firstValueFrom(from(observableQuery)); ``` - [#12359](https://github.com/apollographql/apollo-client/pull/12359) [`ebb4d96`](https://github.com/apollographql/apollo-client/commit/ebb4d9644104244fb066b93a32df778928f2f8a9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onCompleted` and `onError` callbacks from `useQuery` and `useLazyQuery`. See [#12352](https://github.com/apollographql/apollo-client/issues/12352) for more context on this change. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions are no longer eagerly started after calling `client.subscribe`. To kick off the subscription, you will now need to subscribe to the returned observable. ```ts // Subscriptions are no longer started when calling subscribe on its own. const subscriptionObservable = client.subscribe(...); // Instead, subscribe to the returned observable to kick off the subscription. subscriptionObservable.subscribe({ next: (value) => console.log(value) }); ``` - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will now only execute the query when the execute function is called. Previously `useLazyQuery` would behave like `useQuery` after the first call to the execute function which means changes to options might perform network requests. You can now safely rerender `useLazyQuery` with new options which will take effect the next time you manually trigger the query. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TVariables` generic argument on the `GraphQLRequest` type. - [#12464](https://github.com/apollographql/apollo-client/pull/12464) [`0595f39`](https://github.com/apollographql/apollo-client/commit/0595f39deba52ac43fa0780b742564134ec7ab89) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `called` property from `useQuery`. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `toPromise` utility function. Use [`firstValueFrom`](https://rxjs.dev/api/index/function/firstValueFrom) instead. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open. When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead. - [#12841](https://github.com/apollographql/apollo-client/pull/12841) [`65b503f`](https://github.com/apollographql/apollo-client/commit/65b503fe4bfcf942e8f66f36f622f5f6448d6731) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `DataMasking` interface exported from `@apollo/client` and `@apollo/client/masking`. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The context object returned from `operation.getContext()` is now frozen to prevent mutable changes to the object which could result in subtle bugs. This applies to the `previousContext` object passed to the `operation.setContext()` callback as well. - [#12715](https://github.com/apollographql/apollo-client/pull/12715) [`0be0b3f`](https://github.com/apollographql/apollo-client/commit/0be0b3f54a1b533c95c69d3698c5c3bdbd6279fe) Thanks [@phryneas](https://github.com/phryneas)! - All links are now available as classes. The old creator functions have been deprecated. Please migrate these function calls to class creations: ```diff import { - setContext + SetContextLink } from "@apollo/client/link/context" -const link = setContext(...) +const link = new SetContextLink(...) ``` ```diff import { - createHttpLink + HttpLink } from "@apollo/client/link/http" -const link = createHttpLink(...) +const link = new HttpLink(...) ``` ```diff import { - createPersistedQueryLink + PersistedQueryLink } from "@apollo/client/link/persisted-queries" -const link = createPersistedQueryLink(...) +const link = new PersistedQueryLink(...) ``` ```diff import { - removeTypenameFromVariables + RemoveTypenameFromVariablesLink } from "@apollo/client/link/remove-typename" -const link = removeTypenameFromVariables(...) +const link = new RemoveTypenameFromVariablesLink(...) ``` - [#12530](https://github.com/apollographql/apollo-client/pull/12530) [`2973e2a`](https://github.com/apollographql/apollo-client/commit/2973e2a6e6fd81fa59b769d84c252c98ca69440d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `newData` option for mocked responses passed to `MockLink` or the `mocks` option on `MockedProvider`. This option was undocumented and was nearly identical to using the `result` option as a callback. To replicate the old behavior of `newData`, use `result` as a callback and add the `maxUsageCount` option with a value set to `Number.POSITIVE_INFINITY`. **with `MockLink`** ```diff new MockLink([ { request: { query, variables }, - newData: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + maxUsageCount: Number.POSITIVE_INFINITY, } ]) ``` **with `MockedProvider`** ```diff ({ data: { greeting: "Hello " + variables.greeting } }), + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + maxUsageCount: Number.POSITIVE_INFINITY, } ]} /> ``` - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - A call to `ObservableQuery.setVariables` with different variables or a `ObservableQuery.refetch` call will always now guarantee that a value will be emitted from the observable, even if it is deep equal to the previous value. - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloClient.stop()` now cleans up more agressively to prevent memory leaks: - It will now unsubscribe all active `ObservableQuery` instances by emitting a `completed` event. - It will now reject all currently running queries with `"QueryManager stopped while query was in flight"`. - It will remove all queryRefs from the suspense cache. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `forward` function passed to the request handler is now always provided to `request` and no longer optional. If you create custom links by subclassing `ApolloLink`, the `forward` function no longer needs to be optional: ```ts class CustomLink extends ApolloLink { request( operation: ApolloLink.Operation, // This no longer needs to be typed as optional forward: ApolloLink.ForwardFunction ) { // ... } } ``` As a result of this change, `ApolloLink` no longer detects terminating links by checking function arity on the request handler. This means using methods such as `concat` on a terminating link no longer emit a warning. On the flip side, if the terminating link calls the `forward` function, a warning is emitted and an observable that immediately completes is returned which will result in an error from Apollo Client. - [#12589](https://github.com/apollographql/apollo-client/pull/12589) [`15f5a1c`](https://github.com/apollographql/apollo-client/commit/15f5a1c29ac05015387a7bbc2dbe9a91d09fedfa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require the `link` option when instantiating `ApolloClient`. This removes the `uri`, `credentials` and `headers` options from `ApolloClient` in favor of passing an instantiated `HttpLink` directly. To migrate: **If using `uri`, `credentials`, or `headers` options** ```diff new ApolloClient({ // ... - uri, - credentials, - headers, + link: new HttpLink({ uri, credentials, headers }), // or if you prefer the function call approach: + link: createHttpLink({ uri, credentials, headers }), }); ``` **If creating a client without the `link` option** ```diff new ApolloClient({ // ... + link: ApolloLink.empty() }); ``` - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` `cache.diff` no longer throws when `returnPartialData` is set to `false` without a complete result. Instead, `cache.diff` will return `null` when it is unable to read a full cache result. If you use `cache.diff` directly with `returnPartialData: false`, remove the `try`/`catch` block and replace with a check for `null`. ### Changes for third-party cache implementations The client now expects `cache.diff` to return `null` instead of throwing when the cache returns an incomplete result and `returnPartialData` is `false`. The internal `try`/`catch` blocks have been removed around `cache.diff`. If your cache implementation throws for incomplete results, please update this to return `null`. - [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `TData` generic type to `unknown` in all APIs that use a `TData` generic argument such as `useQuery`, `client.query`, etc. - [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports a `fetchPolicy` of `standby`. `standby` does not fetch and did not return `data`. `standby` is meant for watched queries where fetching should be on hold. - [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `Query`, `Mutation`, and `Subscription` components. Use the provided React hooks instead.
### Minor Changes - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow mocked responses passed to `MockLink` to accept a callback for the `delay` option. The `delay` callback will be given the current operation which can be used to determine what delay should be used for the mock. - [#12711](https://github.com/apollographql/apollo-client/pull/12711) [`f730f83`](https://github.com/apollographql/apollo-client/commit/f730f83346d4e3c20116da6f55fdd1381114416c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` property to `CombinedGraphQLErrors` to capture any extensions from the original response. - [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Drop `rehackt` dependency. We can now directly import from `react` without causing build errors in RSC. - [#12437](https://github.com/apollographql/apollo-client/pull/12437) [`4779dc7`](https://github.com/apollographql/apollo-client/commit/4779dc7badaba10d8c7a271eb0da6a079049b65d) Thanks [@phryneas](https://github.com/phryneas)! - Remove polyfills for Object.freeze,seal and preventExtensions in React Native These polyfills were only necessary until React Native 0.59, which [patched the problem](https://github.com/facebook/react-native/pull/21492) on the React Native side. With React Native 0.61, the `Map` function was [completely replaced](https://github.com/facebook/react-native/commit/93b9ac74e59bbe84ea388d7c1879857b4acab114) with a native implementation that never had the problems we guarded against. - [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify message formatter for `CombinedGraphQLErrors` and `CombinedProtocolErrors`. To provide your own message formatter, override the static `formatMessage` property on these classes. ```ts CombinedGraphQLErrors.formatMessage = ( errors, { result, defaultFormatMessage } ) => { return "Some formatted message"; }; CombinedProtocolErrors.formatMessage = (errors, { defaultFormatMessage }) => { return "Some formatted message"; }; ``` - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `dataState` to the value emitted from `client.watchFragment`. - [#12670](https://github.com/apollographql/apollo-client/pull/12670) [`0a880ea`](https://github.com/apollographql/apollo-client/commit/0a880ea4c2360a985fdd2edadb94fcc4b82bad73) Thanks [@phryneas](https://github.com/phryneas)! - Provide a mechanism to override the DataMasking types. Up until now, our types `Masked`, `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` would assume that you are stictly using the type output format of GraphQL Codegen. With this change, you can now modify the behaviour of those types if you use a different form of codegen that produces different types for your queries. A simple implementation that would override the `Masked` type to remove all fields starting with `_` from a type would look like this: ```ts // your actual implementation of `Masked` type CustomMaskedImplementation = { [K in keyof TData as K extends `_${string}` ? never : K]: TData[K]; }; import { HKT } from "@apollo/client/utilities"; // transform this type into a higher kinded type that can be evaulated at a later time interface CustomMaskedType extends HKT { arg1: unknown; // TData return: CustomMaskedImplementation; } // create an "implementation interface" for the types you want to override export interface CustomDataMaskingImplementation { Masked: CustomMaskedType; // other possible keys: `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` } ``` then you would use that `CustomDataMaskingImplementation` interface in your project to extend the `TypeOverrides` interface exported by `@apollo/client` with it's functionality: ```ts declare module "@apollo/client" { export interface TypeOverrides extends CustomDataMaskingImplementation {} } ``` After that, all internal usage of `Masked` in Apollo Client as well as all usage in your code base will use the new `CustomMaskedType` implementation. If you don't specify overrides, Apollo Client will still default to the GraphQL Codegen data masking implementation. The types for that are also explicitly exported as the `GraphQLCodegenDataMasking` namespace in `@apollo/client/masking`. - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new `realisticDelay` helper function for use with the `delay` callback for mocked responses used with `MockLink`. `realisticDelay` will generate a random value between 20 and 50ms to provide an experience closer to unpredictable network latency. `realisticDelay` can be configured with a `min` and `max` to set different thresholds if the defaults are not sufficient. ```ts import { realisticDelay } from "@apollo/client/testing"; new MockLink([ { request: { query }, result: { data: { greeting: "Hello" } }, delay: realisticDelay(), }, { request: { query }, result: { data: { greeting: "Hello" } }, delay: realisticDelay({ min: 10, max: 100 }), }, ]); ``` - [#12844](https://github.com/apollographql/apollo-client/pull/12844) [`18a0cad`](https://github.com/apollographql/apollo-client/commit/18a0cad773257e540ec8dc8e90f7a875a0ccf99f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an entrypoint at `@apollo/client/v4-migration` that includes removed values and types. Each export includes doc blocks on how to migrate away from the removed type. - [#12546](https://github.com/apollographql/apollo-client/pull/12546) [`5dffbbe`](https://github.com/apollographql/apollo-client/commit/5dffbbe407eb1d9adbcb0fff89f2d3a75dc1ad2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a static `is` method to error types defined by Apollo Client. `is` makes it simpler to determine whether an error is a specific type, which can be helpful in cases where you'd like to narrow the error type in order to use specific properties from that error. This change applies to the following error types: - `CombinedGraphQLErrors` - `CombinedProtocolErrors` - `ServerError` - `ServerParseError` - `UnconventionalError` **Example** ```ts import { CombinedGraphQLErrors } from "@apollo/client"; if (CombinedGraphQLErrors.is(error)) { console.log(error.message); error.errors.forEach((graphQLError) => console.log(graphQLError.message)); } ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Revamp local resolvers and fix several issues from the existing `resolvers` option. - Throwing errors in a resolver will set the field value as `null` and add an error to the response's `errors` array. - Remote results are dealiased before they are passed as the parent object to a resolver so that you can access fields by their field name. - You can now specify a `context` function that you can use to customize the `requestContext` given to resolvers. - The `LocalState` class accepts a `Resolvers` generic that provides autocompletion and type checking against your resolver types to ensure your resolvers are type-safe. - `data: null` is now handled correctly and does not call your local resolvers when the server does not provide a result. - Additional warnings have been added to provide hints when resolvers behave unexpectedly. ```ts import { LocalState } from "@apollo/client/local-state"; import { Resolvers } from "./path/to/local-resolvers-types.ts"; // LocalState now accepts a `Resolvers` generic. const localState = new LocalState({ // The return value of this funciton context: (options) => ({ // ... }), resolvers: { // ... }, }); // You may also pass a `ContextValue` generic used to ensure the `context` // function returns the correct type. This type is inferred from your resolvers // if not provided. new LocalState({ // ... }); ``` - [#12828](https://github.com/apollographql/apollo-client/pull/12828) [`81b03d8`](https://github.com/apollographql/apollo-client/commit/81b03d86ad7e7384124708477829bcbf63d4fa2c) Thanks [@phryneas](https://github.com/phryneas)! - `invariant.error` will now also log in production builds, not only dev builds - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The callback function that can be passed to the `ApolloClient.mutate` `refetchQueries` option will now receive a `FormattedExecutionResult` with an additional `dataState` option that describes if the result is `"streaming"` or `"complete"`. This indicates whether the `data` value is of type - `Unmasked` (if `"complete"`) - `Streaming>` (if `"streaming"`) - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client is no longer using `ts-invariant`, but ships with a modified variant of it. The existing export `setLogVerbosity` from `@apollo/client` is still available and now points to this new integration. **In most cases, you should be using this export.** It will no longer adjust the verbosity of `ts-invariant` and as such no longer influence other packages relying on `ts-invariant`. The new entry point `@apollo/client/utilities/invariant` now exports `invariant`, `InvariantError` and `setVerbosity`. (Note that these tools are mostly meant to be used by Apollo Client and libraries directly based on Apollo Client like the `@apollo/client-integration-*` packages.) - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide an extension to define types for `context` passed to the link chain. To define your own types, use [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) to add properties to the `DefaultContext` type. ```ts // @apollo-client.d.ts // This import is necessary to ensure all Apollo Client imports // are still available to the rest of the application. import "@apollo/client"; declare module "@apollo/client" { interface DefaultContext extends Record { myProperty: string; } } ``` Links that provide context options can be used with this type to add those context types to `DefaultContext`. For example, to add context options from `HttpLink`, add the following code: ```ts import { HttpLink } from "@apollo/client"; declare module "@apollo/client" { interface DefaultContext extends HttpLink.ContextOptions { myProperty: string; } } ``` At this time, the following built-in links support context options: - `HttpLink.ContextOptions` - `BatchHttpLink.ContextOptions` - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Allow passing `errorPolicy` option to `fetchMore` and change default value to "none". - [#12497](https://github.com/apollographql/apollo-client/pull/12497) [`ff2cbe1`](https://github.com/apollographql/apollo-client/commit/ff2cbe1db1815c30f5fda7f6c07091663e065582) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `data` property to `CombinedGraphQLErrors` that captures any partial data returned by the GraphQL response when `errors` are also returned. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink`'s `concat` method now accepts multiple links to concatenate together. ```ts const first = new ApolloLink(); const link = first.concat(second, third, fouth); ``` - [#12753](https://github.com/apollographql/apollo-client/pull/12753) [`b85818d`](https://github.com/apollographql/apollo-client/commit/b85818dcc66d3ed8b1c3a7e5e37b2875d6bf9d03) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Renamed `client.reFetchObservableQueries` to `client.refetchObservableQueries`. `client.reFetchObservableQueries` is still available as an alias, but is now deprecated and will be removed in a future major version. - [#12561](https://github.com/apollographql/apollo-client/pull/12561) [`99d72bf`](https://github.com/apollographql/apollo-client/commit/99d72bfdb38e3d9679f60b9acb065a84e3b42fd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to detect if an error was an error was emitted from the link chain. This is useful if your application throws custom errors in other areas of the application and you'd like to differentiate them from errors emitted by the link chain itself. To detect if an error was emitted from the link chain, use `LinkError.is`. ```ts import { LinkError } from "@apollo/client"; client.query({ query }).catch((error) => { if (LinkError.is(error)) { // This error originated from the link chain } }); ``` - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adjusted the accept header for multipart requests according to the new GraphQL over HTTP spec with these changes: ```diff -multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json +multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/graphql-response+json,application/json;q=0.9 ``` ```diff -multipart/mixed;deferSpec=20220824,application/json +multipart/mixed;deferSpec=20220824,application/graphql-response+json,application/json;q=0.9 ``` - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions created by `client.subscribe()` can now be restarted. Restarting a subscription will terminate the connection with the link chain and recreate the request. Restarts also work across deduplicated subscriptions so calling `restart` on an `observable` who's request is deduplicated will restart the connection for each observable. ```ts const observable = client.subscribe({ query: subscription }); // Restart the connection to the link observable.restart(); ``` - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `MockLink` types to `MockLink` namespace. This affects the `MockedResponse`, `MockLinkOptions`, and `ResultFunction` types. These types are still exported but are deprecated in favor of the namespace. To migrate, use the types on the `MockLink` namespace instead. ```diff import { - MockedResponse, - MockLinkOptions, - ResultFunction, + MockLink } from "@apollo/client/testing"; - const mocks: MockedResponse = []; + const mocks: MockLink.MockedResponse = []; - const result: ResultFunction = () => {/* ... */ } + const result: MockLink.ResultFunction = () => {/* ... */ } - const options: MockLinkOptions = {} + const options: MockLink.Options = {} ``` - [#12201](https://github.com/apollographql/apollo-client/pull/12201) [`1c6e03c`](https://github.com/apollographql/apollo-client/commit/1c6e03c9c74a9fad2a1c2e1c3ae61a9560038238) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Overridable types for `dataState: "complete"`, `dataState: "streaming"` and `dataState: "partial"` responses. This adds the `DataValue` namespace exported from Apollo Client with the three types `DataValue.Complete`, `DataValue.Streaming` and `DataValue.Partial`. These types will be used to mark `TData` in the respective states. - `Complete` defaults to `TData` - `Streaming` defaults to `TData` - `Partial` defaults to `DeepPartial` All three can be overwritten, e.g. to be `DeepReadonly` using higher kinded types by following this pattern: ```ts import { HKT, DeepPartial } from "@apollo/client/utilities"; import { DeepReadonly } from "some-type-helper-library"; interface CompleteOverride extends HKT { return: DeepReadonly; } interface StreamingOverride extends HKT { return: DeepReadonly; } interface PartialOverride extends HKT { return: DeepReadonly>; } declare module "@apollo/client" { export interface TypeOverrides { Complete: CompleteOverride; Streaming: StreamingOverride; Partial: PartialOverride; } } ``` - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deduplicating subscription operations is now supported. Previously it was possible to deduplicate a subscription only if the new subscription was created before a previously subscribed subscription emitted any values. As soon as a value was emitted from a subscription, new subscriptions would create new connections. Deduplication is now active for as long as a subscription connection is open (i.e. the source observable hasn't emitted a `complete` or `error` notification yet.) To disable deduplication and force a new connection, use the `queryDeduplication` option in `context` like you would a query operation. As a result of this change, calling the `restart` function returned from `useSubscription` will now restart the connection on deduplicated subscriptions. - [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Add `react-server` entry point with stubs for normal exports. - [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecate the `partial` flag on `ApolloQueryResult` and make it a non-optional property. Previously `partial` was only set conditionally if the result emitted was partial. This value is now available with all results that return an `ApolloQueryResult`. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Add the new `ClientAwarenessLink`. This link is already included in `HttpLink` and `BatchHttpLink` to enable the "client awareness" and "enhanced client awareness" features, but you can also use `ClientAwarenessLink` directly in your link chain to combine it with other terminating links. If you want to save the bundle size that `ClientAwarenessLink` adds to `HttpLink` and `BatchHttpLink`, you can use `BaseHttpLink` or `BaseBatchHttpLink` instead. These links come without the `ClientAwarenessLink` included. For example: ```diff import { ApolloClient, - HttpLink, } from "@apollo/client"; +import { BaseHttpLink } from "@apollo/client/link/http"; const client = new ApolloClient({ - link: new HttpLink({ + link: new BaseHttpLink({ uri, }), cache: new InMemoryCache(), }); ``` - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `.stop` function on `ObservableQuery`. Calling this method will unsubscribe all current subscribers by sending a `complete` event from the observable and tear down the `ObservableQuery`. - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `client` property to the `operation` passed to the link chain. This `client` is set as the `client` making the request to the link chain. - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify a default `delay` for all mocked responses passed to `MockLink`. This `delay` can be configured globally (all instances of `MockLink` will use the global defaults), or per-instance (all mocks in a single instance will use the defaults). A `delay` defined on a single mock will supercede all default delays. Per-instance defaults supercede global defaults. **Global defaults** ```ts MockLink.defaultOptions = { // Use a default delay of 20ms for all mocks in all instances without a specified delay delay: 20, // altenatively use a callback which will be executed for each mock delay: () => getRandomNumber(), // or use the built-in `realisticDelay`. This is the default delay: realisticDelay(), }; ``` **Per-instance defaults** ```ts new MockLink( [ // Use the default delay { request: { query }, result: { data: { greeting: "Hello" } }, }, { request: { query }, result: { data: { greeting: "Hello" } }, // Override the default for this mock delay: 10, }, ], { defaultOptions: { // Use a default delay of 20ms for all mocks without a specified delay delay: 20, // altenatively use a callback which will be executed for each mock delay: () => getRandomNumber(), // or use the built-in `realisticDelay`. This is the default delay: realisticDelay(), }, } ); ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Many of the types exported from `@apollo/client/link` now live on the `ApolloLink` namespace. The old types are now deprecated in favor of the namespaced types. - `FetchResult` -> `ApolloLink.Result` - `GraphQLRequest` -> `ApolloLink.Request` - `NextLink` -> `ApolloLink.ForwardFunction` - `Operation` -> `ApolloLink.Operation` - `RequestHandler` -> `ApolloLink.RequestHandler` - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - The `FetchMoreQueryOptions` type has been inlined into `FetchMoreOptions`, and `FetchMoreQueryOptions` has been removed. - [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add `dataState` and overridable `DataValue` types to `useFragment` - [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add overridable `DataValue` types to `useSuspenseFragment` - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Prioritize usage of `FormattedExecutionResult` over `FetchResult` where applicable. Many APIs used `FetchResult` in place of `FormattedExecutionResult`, which could cause inconsistencies. - `FetchResult` is now used to refer to an unhandled "raw" result as returned from a link. This can also include incremental results that use a different format. - `FormattedExecutionResult` from the `graphql` package is now used to represent the execution of a standard GraphQL request without incremental results. If your custom links access the `data` property, you might need to first check if the result is a standard GraphQL result by using the `isFormattedExecutionResult` helper from `@apollo/client/utilities`. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The static `ApolloLink.concat` method is now deprecated in favor of `ApolloLink.from`. `ApolloLink.concat` is now an alias for `ApolloLink.from` so prefer `ApolloLink.from` instead. - [#12488](https://github.com/apollographql/apollo-client/pull/12488) [`c98b633`](https://github.com/apollographql/apollo-client/commit/c98b6335de5b15e546aa5db79a8cf2dc9d914dcf) Thanks [@phryneas](https://github.com/phryneas)! - Add a new method for static SSR of React components, `prerenderStatic`. The old methods, `getDataFromTree`, `getMarkupFromTree` and `renderToStringWithData` have been deprecated in favor of `prerenderStatic`. If used with React 19 and the `prerender` or `prerenderToNodeStream` apis from `react-dom/static`, this method can now be used to SSR-prerender suspense-enabled hook APIs. - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adds an `accept` option to `HttpOptions` that allows to add additional `Accept` headers to be merged in without overriding user-specified or default accept headers. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The `mutationResult` option passed to the `updateQueries` callback now has an additional property, `dataState` with possible values of `"complete"` and `"streaming"`. This indicates whether the `data` value is of type - `Unmasked` (if `"complete"`) - `Streaming>` (if `"streaming"`) - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - Split out SSR-specific code from useQuery hook, remove RenderPromises - [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `operationType` to `operation` in `ApolloLink`. This means that determining whether a `query` is a specific operation type can now be compared with this property instead of using `getMainDefinition`. ```diff - import { getMainDefinition } from "@apollo/client/utilities"; + import { OperationTypeNode } from "graphql"; ApolloLink.split( - ({ query }) => { - const definition = getMainDefinition(query); - return ( - definition.kind === 'OperationDefinition' && - definition.operation === 'subscription' - ); - return - }, + ({ operationType }) => { + return operationType === OperationTypeNode.SUBSCRIPTION; + }, conditionTrueLink, conditionFalseLink, ); ``` - [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery.refetch` and `ObservableQuery.reobserve` and the `execute` function of `useLazyQuery` now return a `ResultPromise` with an additional `.retain` method. If this method is called, the underlying network operation will be kept running even if the `ObservableQuery` itself does not require the result anymore, and the Promise will resolve with the final result instead of resolving with an intermediate result in the case of early cancellation. - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a new `dataState` property that determines the completeness of the `data` property. `dataState` helps narrow the type of `data`. `dataState` is now emitted from `ObservableQuery` and returned from all React hooks that return a `data` property. The `dataState` values are: - `empty`: No data could be fulfilled from the cache or the result is incomplete. `data` is `undefined`. - `partial`: Some data could be fulfilled from the cache but `data` is incomplete. This is only possible when `returnPartialData` is `true`. - `streaming`: `data` is incomplete as a result of a deferred query and the result is still streaming in. - `complete`: `data` is a fully satisfied query result fulfilled either from the cache or network. Example: ```ts const { data, dataState } = useQuery(query); if (dataState === "empty") { expectTypeOf(data).toEqualTypeOf(); } if (dataState === "partial") { expectTypeOf(data).toEqualTypeOf>(); } if (dataState === "streaming") { expectTypeOf(data).toEqualTypeOf(); } if (dataState === "complete") { expectTypeOf(data).toEqualTypeOf(); } ```
### Patch Changes - [#12574](https://github.com/apollographql/apollo-client/pull/12574) [`0098ec9`](https://github.com/apollographql/apollo-client/commit/0098ec9f860e4e08a2070823f723dce401ae588a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `gql` from the `@apollo/client/react` entrypoint. - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - When updating `skip` from `false` to `true` in `useQuery`, retain `data` if it is available rather than setting it to `undefined`. - [#12822](https://github.com/apollographql/apollo-client/pull/12822) [`103664d`](https://github.com/apollographql/apollo-client/commit/103664dc93c0a7097eaec1a5144e769eb4fb7a31) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `HttpLink.ContextOptions` and `BatchHttpLink.ContextOptions` include `ClientAwarenessLink.ContextOptions`. - [#12291](https://github.com/apollographql/apollo-client/pull/12291) [`ae5d06a`](https://github.com/apollographql/apollo-client/commit/ae5d06ac45ca6584d3c79aa417dae22f37a7d3b6) Thanks [@phryneas](https://github.com/phryneas)! - Remove deprecated `resetApolloContext` export - [#12728](https://github.com/apollographql/apollo-client/pull/12728) [`07a0c8c`](https://github.com/apollographql/apollo-client/commit/07a0c8c52774793b254ecc91e5d4632bfdf48093) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export the `IgnoreModifier` type from `@apollo/client/cache`. - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache.watchFragment` now returns an `Unmasked` result since `cache.watchFragment` does not mask fragment spreads. - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the `unsafePreviousData` argument on `UpdateQueryMapFn` and `SubscribeToMoreQueryFn` to a `DeepPartial` since the result may contain partial data. - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables. - [#12748](https://github.com/apollographql/apollo-client/pull/12748) [`e1ca85e`](https://github.com/apollographql/apollo-client/commit/e1ca85eab181d8e16d945e849dfb13352902f197) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where the new `operationType` property wasn't passed into `operation`. - [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Remove these incremental-format-specific types: - `ExecutionPatchIncrementalResult` - `ExecutionPatchInitialResult` - `ExecutionPatchResult` - `IncrementalPayload` - `Path` - [#12618](https://github.com/apollographql/apollo-client/pull/12618) [`e4a3ecf`](https://github.com/apollographql/apollo-client/commit/e4a3ecfe50bc5b462067574a0ffb1951549fb60f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove code that strips `@client` fields in `HttpLink` and `BatchHttpLink`. This was unused code since core handles removing `@client` fields and should have no observable change. - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume. - [#12677](https://github.com/apollographql/apollo-client/pull/12677) [`94e58ed`](https://github.com/apollographql/apollo-client/commit/94e58ed75fc547ff037d9efeeba929fd61b20c4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Downgrade minimum supported `rxjs` peer dependency version to 7.3.0. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `variables` option used with various APIs are now enforced more consistently across the client when `TVariables` contains required variables. If required `variables` are not provided, TypeScript will now complain that it requires a `variables` option. This change affects the following APIs: - `client.query` - `client.mutate` - `client.subscribe` - `client.watchQuery` - `useBackgroundQuery` - `useQuery` - `useSubscription` - `useSuspenseQuery` - [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default `TVariables` generic type to `OperationVariables` instead of `any` throughout the client in areas that did not yet have the default as such. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `variables` returned from `useLazyQuery`. When `called` is `false`, `variables` is now `Partial` instead of `TVariables`. - [#12402](https://github.com/apollographql/apollo-client/pull/12402) [`903c3ef`](https://github.com/apollographql/apollo-client/commit/903c3ef9f77280492c298b4d8e5f96f110e3cda1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Use an an empty object (`{}`) rather than an object with `null` prototype (`Object.create(null)`) in all areas that instantiate objects. - [#12734](https://github.com/apollographql/apollo-client/pull/12734) [`037979d`](https://github.com/apollographql/apollo-client/commit/037979dc47ffb7125429707471d901a08db49283) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't warn about a missing resolver if a `@client` does not have a configured resolver. It is possible the cache contains a `read` function for the field and the warning added confusion. Note that `read` functions without a defined resolver will receive the `existing` argument as `null` instead of `undefined` even when data hasn't been written to the cache. This is because `LocalState` sets a default value of `null` when a resolver is not defined to ensure that the field contains a value in case a `read` function is not defined rather than omitting the field entirely. - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`. - [#12370](https://github.com/apollographql/apollo-client/pull/12370) [`0517163`](https://github.com/apollographql/apollo-client/commit/05171634404a44231329bf63eee960db52d08b25) Thanks [@phryneas](https://github.com/phryneas)! - `InMemoryCache`: Fields with an empty argument object are now saved the same way as fields without arguments. Previously, it was possible that the reponses for these two queries would be stored differently in the cache: ```gql query PlainAccess { myField } ``` would be stored as `myField` and ```gql query AccessWithoutOptionalArgument($optional: String) { myField(optional: $optional) } ``` would be stored as `myField({"optional":"Foo"})` if called with `{optional: "Foo"}` and as `myField({})` if called without the optional argument. The cases `myField` and `myField({})` are equivalent from the perspective of a GraphQL server, and so in the future both of these will be stored as `myField` in the cache. - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - \* dropped the deprecated `DEV` export from `@apollo/client/utilities` and `@apollo/client/utilities/globals` - moved the `__DEV__` export from `@apollo/client/utilities/globals` to `@apollo/client/utilities/environment` - moved the `invariant`, `newInvariantError` and `InvariantError` exports from `@apollo/client/utilities/globals` to `@apollo/client/utilities/invariant` - [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Slightly rework multipart response parsing. This removes last incremental-protocol-specific details from `HttpLink` and `BatchHttpLink`. - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `RetryLink` now emits a `next` event instead of an `error` event when encountering a protocol errors for multipart subscriptions when the operation is not retried. This ensures the observable notification remains the same as when `RetryLink` is not used. - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`). This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set. - [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `getMainDefinition` from `@apollo/client/utilities`. - [#12716](https://github.com/apollographql/apollo-client/pull/12716) [`ad88976`](https://github.com/apollographql/apollo-client/commit/ad889766882b4817e50e8e819044bc5ed772173b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`. - [#12542](https://github.com/apollographql/apollo-client/pull/12542) [`afb4fce`](https://github.com/apollographql/apollo-client/commit/afb4fce08859b2c6eebf288230a7c35b7acf2da6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type. - [#12432](https://github.com/apollographql/apollo-client/pull/12432) [`c7c2f61`](https://github.com/apollographql/apollo-client/commit/c7c2f6122c874eed16d5621be26992f86d9756eb) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery: implement the `rxjs` `InteropObservable` interface to ensure `from(observableQuery)` stays possible - [#12775](https://github.com/apollographql/apollo-client/pull/12775) [`454ec78`](https://github.com/apollographql/apollo-client/commit/454ec78b751853da07243174a6f9bdc4535e7e8f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead. - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - `@apollo/client`, `@apollo/client/core` and `@apollo/client/cache` no longer export an empty `Cache` runtime object. This is meant to be a type-only namespace. - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `parser` cache. The functionality has been replaced in a way that doesn't need caching. - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5. - [#12739](https://github.com/apollographql/apollo-client/pull/12739) [`b184754`](https://github.com/apollographql/apollo-client/commit/b184754d08810df9a7838615990e90a960966037) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `error` argument on the `onError` option for `subscribeToMore` to `ErrorLike`. - [#12572](https://github.com/apollographql/apollo-client/pull/12572) [`3dc50e6`](https://github.com/apollographql/apollo-client/commit/3dc50e6476dcedf82ed3856bf9f4571a32a760a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adjust `useMutation` types to better handle required variables. When required variables are missing, TypeScript will now complain if they are not provided either to the hook or the returned `mutate` function. Providing required variables to `useMutation` will make them optional in the returned `mutate` function. - [#12819](https://github.com/apollographql/apollo-client/pull/12819) [`7ff548d`](https://github.com/apollographql/apollo-client/commit/7ff548dab0f38bfe315fce6cc51105c93d112271) Thanks [@jerelmiller](https://github.com/jerelmiller)! - update type of `HttpLink.Options.fetchOptions` to `RequestInit` - [#12761](https://github.com/apollographql/apollo-client/pull/12761) [`db6f7c3`](https://github.com/apollographql/apollo-client/commit/db6f7c3823aaf58ee403ef45f0e817241b1c56a2) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate second argument to `readFragment` and `readQuery` - `optimistic` should be passed as part of the object in the first argument instead. - [#12820](https://github.com/apollographql/apollo-client/pull/12820) [`fba3d9e`](https://github.com/apollographql/apollo-client/commit/fba3d9ec96cce9f1a89908e4f33361e27d1f52b4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `fetchOptions` option provided to `HttpLink` and `BatchHttpLink` is now `RequestInit` instead of `any`. The `credentials` option is now a `RequestCredentials` type instead of a `string`. - [#12650](https://github.com/apollographql/apollo-client/pull/12650) [`2a32ac6`](https://github.com/apollographql/apollo-client/commit/2a32ac6d38de2be0be6891a969ee4f5e3bbca629) Thanks [@phryneas](https://github.com/phryneas)! - Fix a situation where a passed-in `AbortSignal` would override internal unsubscription cancellation behaviour. - [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports `notifyOnNetworkStatusChange` in options. An error will be thrown if this option is set. The effects of this option were not observable by `client.query` since `client.query` emits a single result. - [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update format of the error message for `CombinedGraphQLErrors` and `CombinedProtocolErrors` to be more like v3.x. ```diff console.log(error.message); - `The GraphQL server returned with errors: - - Email not found - - Username already in use` + `Email not found + Username already in use` ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The individual `empty`, `concat`, `from` and `split` functions exported from `@apollo/client/link` are now deprecated in favor of using the static functions instead. ```diff import { ApolloLink, - concat, - empty, - from, - split, } from "@apollo/client/link"; - concat(first, second); + ApolloLink.concat(first, second); - empty(); + ApolloLink.empty(); - from([first, second]); + ApolloLink.from([first, second]); - split( + ApolloLink.split( (operation) => /* */, first, second ); ``` - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The incremental delivery (`@defer` support) implementation is now pluggable. `ApolloClient` now per default ships without an incremental format implementation and allows you to swap in the format that you want to use. Usage looks like this: ```ts import { // this is the default NotImplementedHandler, // this implements the `@defer` transport format that ships with Apollo Router Defer20220824Handler, // this implements the `@defer` transport format that ships with GraphQL 17.0.0-alpha.2 GraphQL17Alpha2Handler, } from "@apollo/client/incremental"; const client = new ApolloClient({ cache: new InMemoryCache({ /*...*/ }), link: new HttpLink({ /*...*/ }), incrementalHandler: new Defer20220824Handler(), }); ``` We will add handlers for other response formats that can be swapped this way during the lifetime of Apollo Client 4.0. - [#12454](https://github.com/apollographql/apollo-client/pull/12454) [`925548a`](https://github.com/apollographql/apollo-client/commit/925548a9baadb19b7bb78ee84c6f9e64b55c39e9) Thanks [@phryneas](https://github.com/phryneas)! - Fix up the 4.0 CommonJS build - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't emit a partial cache result from `cache-only` queries when `returnPartialData` is `false`. - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - The `error` property is no longer present when `skip` is `true` in `useQuery`. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` has been updated to return `TVariables` rather than `TVariables | undefined`. This is more consistent with the runtime value where an empty object (`{}`) will be returned when the `variables` option is not provided. - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the type of the argument for the `sha256` function for `PersistedQueryLink` from `...any[]` to `string`. - [#12729](https://github.com/apollographql/apollo-client/pull/12729) [`699c830`](https://github.com/apollographql/apollo-client/commit/699c8305639ff69bab36fd2214defbe1ac6f0b18) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useQuery` rerenders when `notifyOnNetworkStatusChange` is `false` and a `refetch` that changes variables returns a result deeply equal to previous variables. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type. - [#12821](https://github.com/apollographql/apollo-client/pull/12821) [`223a409`](https://github.com/apollographql/apollo-client/commit/223a4094f401bbe7fd3e4c249fa405843b63ba2e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a deprecation warning to `WebSocketLink`. - [#12782](https://github.com/apollographql/apollo-client/pull/12782) [`742b3a0`](https://github.com/apollographql/apollo-client/commit/742b3a0ed65d28818974e56225c86ab7e350e677) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `ApolloClient`, `ObservableQuery`, and `ApolloCache.watchFragment` method options and result types into namespaces. The old types are now exported as deprecated. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Fixed a bug in `PersistedQueryLink` where the `persistedQuery` extension would still be sent after a `PersistedQueryNotSupported` if `includeExtensions` was enabled on `HttpLink`.
## 4.0.0-rc.13 ### Major Changes - [#12850](https://github.com/apollographql/apollo-client/pull/12850) [`268cd80`](https://github.com/apollographql/apollo-client/commit/268cd800a2d73305c0df8dd38b6bd1cee98f0fec) Thanks [@phryneas](https://github.com/phryneas)! - Introduce a versioning policy. ## 4.0.0-rc.12 ### Minor Changes - [#12838](https://github.com/apollographql/apollo-client/pull/12838) [`b005561`](https://github.com/apollographql/apollo-client/commit/b0055613c1f4837e994d2d0756348d553e2f302f) Thanks [@phryneas](https://github.com/phryneas)! - Add an entrypoint at `@apollo/client/v4-migration` that includes removed values and types. Each export includes doc blocks on how to migrate away from the removed type. ## 4.0.0-rc.11 ### Major Changes - [#12840](https://github.com/apollographql/apollo-client/pull/12840) [`83e132a`](https://github.com/apollographql/apollo-client/commit/83e132ab1bacb3293da61dd4519379e36a1fb090) Thanks [@phryneas](https://github.com/phryneas)! - If you use an incremental delivery handler, you now have to explicitly opt into adding the chunk types to the `ApolloLink.Result` type. ```ts title="apollo-client.d.ts import { Defer20220824Handler } from "@apollo/client/incremental"; declare module "@apollo/client" { export interface TypeOverrides extends Defer20220824Handler.TypeOverrides {} } ``` - [#12841](https://github.com/apollographql/apollo-client/pull/12841) [`65b503f`](https://github.com/apollographql/apollo-client/commit/65b503fe4bfcf942e8f66f36f622f5f6448d6731) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `DataMasking` interface exported from `@apollo/client` and `@apollo/client/masking`. ## 4.0.0-rc.10 ### Major Changes - [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - You must now opt in to use GraphQL Codegen data masking types when using Apollo Client's data masking feature. By default, Apollo Client now uses an identity type to apply to masked/unmasked types. If you're using GraphQL Codegen to generate masked types, opt into the GraphQL Codegen masked types using declaration merging on the `TypeOverides` interface. ```ts title="apollo-client.d.ts import { GraphQLCodegenDataMasking } from "@apollo/client/masking"; declare module "@apollo/client" { export interface TypeOverrides extends GraphQLCodegenDataMasking.TypeOverrides {} } ``` - [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The types mode for data masking has been removed. Adding a types mode to the `DataMasking` interface has no effect. Remove the `mode` key in the module where you declare the `DataMasking` type for the `@apollo/client` module. As a result, the `Masked` and `MaskedDocumentNode` types have also been removed since these have no effect when types are preserved. ## 4.0.0-rc.9 ### Minor Changes - [#12828](https://github.com/apollographql/apollo-client/pull/12828) [`81b03d8`](https://github.com/apollographql/apollo-client/commit/81b03d86ad7e7384124708477829bcbf63d4fa2c) Thanks [@phryneas](https://github.com/phryneas)! - `invariant.error` will now also log in production builds, not only dev builds ### Patch Changes - [#12822](https://github.com/apollographql/apollo-client/pull/12822) [`103664d`](https://github.com/apollographql/apollo-client/commit/103664dc93c0a7097eaec1a5144e769eb4fb7a31) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `HttpLink.ContextOptions` and `BatchHttpLink.ContextOptions` include `ClientAwarenessLink.ContextOptions`. - [#12650](https://github.com/apollographql/apollo-client/pull/12650) [`2a32ac6`](https://github.com/apollographql/apollo-client/commit/2a32ac6d38de2be0be6891a969ee4f5e3bbca629) Thanks [@phryneas](https://github.com/phryneas)! - Fix a situation where a passed-in `AbortSignal` would override internal unsubscription cancellation behaviour. ## 4.0.0-rc.8 ### Major Changes - [#12825](https://github.com/apollographql/apollo-client/pull/12825) [`292b949`](https://github.com/apollographql/apollo-client/commit/292b949e9e1d10a715e0fd403737361f91432fbf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `serializeFetchParameter` helper is no longer exported and `JSON.stringify` is used directly. As such, the `ClientParseError` type has also been removed in favor of throwing any JSON serialize errors directly. - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `error` argument for the `delay` and `attempts` functions on `RetryLink` are an `ErrorLike`. - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move all 1st party link types into a namespace. - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `OperationBatcher` class is no longer exported from `@apollo/client/link/batch`. It is an implementation detail of `BatchLink` and should not be relied on directly. ### Patch Changes - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `RetryLink` now emits a `next` event instead of an `error` event when encountering a protocol errors for multipart subscriptions when the operation is not retried. This ensures the observable notification remains the same as when `RetryLink` is not used. - [#12819](https://github.com/apollographql/apollo-client/pull/12819) [`7ff548d`](https://github.com/apollographql/apollo-client/commit/7ff548dab0f38bfe315fce6cc51105c93d112271) Thanks [@jerelmiller](https://github.com/jerelmiller)! - update type of `HttpLink.Options.fetchOptions` to `RequestInit` - [#12820](https://github.com/apollographql/apollo-client/pull/12820) [`fba3d9e`](https://github.com/apollographql/apollo-client/commit/fba3d9ec96cce9f1a89908e4f33361e27d1f52b4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `fetchOptions` option provided to `HttpLink` and `BatchHttpLink` is now `RequestInit` instead of `any`. The `credentials` option is now a `RequestCredentials` type instead of a `string`. - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the type of the argument for the `sha256` function for `PersistedQueryLink` from `...any[]` to `string`. - [#12821](https://github.com/apollographql/apollo-client/pull/12821) [`223a409`](https://github.com/apollographql/apollo-client/commit/223a4094f401bbe7fd3e4c249fa405843b63ba2e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a deprecation warning to `WebSocketLink`. ## 4.0.0-rc.7 ### Major Changes - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.getContext` now returns a `Readonly` type. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ApolloLink.Request` (i.e. `GraphQLRequest`) passed to `ApolloLink.execute` no longer accepts `operationName` and `operationType` options. These properties are derived from the `query` and set on the returned `ApolloLink.Operation` type. - [#12808](https://github.com/apollographql/apollo-client/pull/12808) [`8e31a23`](https://github.com/apollographql/apollo-client/commit/8e31a2303b18f6fc4d8ec1cf4c01bf26b90f3f0b) Thanks [@phryneas](https://github.com/phryneas)! - HTTP Multipart handling will now throw an error if the connection closed before the final boundary has been received. Data after the final boundary will be ignored. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationType` is now a non-null `OperationTypeNode`. It is now safe to compare this value without having to check for `undefined`. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationName` is now set as `string | undefined` where `undefined` represents an anonymous query. Previously `operationName` would return an empty string as the `operationName` for anonymous queries. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `concat`, `from`, and `split` functions on `ApollLink` no longer support a plain request handler function. Please wrap the request handler with `new ApolloLink`. ```diff const link = new ApolloLink(/* ... */); link.concat( - (operation, forward) => forward(operation), + new ApolloLink((operation, forward) => forward(operation)), ); ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `transformOperation` and `validateOperation` have been removed and are no longer exported from `@apollo/client/link/utils`. These utilities have been merged into the implementation of `createOperation`. As a result, `createOperation` now returns a well-formed `Operation` object. Previously `createOperation` relied on an external call to `transformOperation` to provide a well-formed `Operation` type. If you use `createOperation` directly, remove the calls to `transformOperation` and `validateOperation` and pass the request directly. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The request handler provided to `ApolloLink` must now return an `Observable`. `null` is no longer supported as a valid return value. If you rely on `null` so that `ApolloLink` provides an empty observable, use the `EMPTY` observable from RxJS instead: ```diff import { ApolloLink } from "@apollo/client"; + import { EMPTY } from "rxjs"; const link = new ApolloLink((operation, forward) => { - return null; + return EMPTY; }); ``` If you have a custom link that overrides the `request` method, remove `null` from the return signature: ```diff class MyCustomLink extends ApolloLink { request( operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction, - ): Observable | null { + ): Observable { // implementation } } ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `createOperation` no longer accepts `context` as the first argument. Instead make sure `context` is set as the `context` property on the request passed to `createOperation`. ```diff createOperation( - startingContext, - { query }, + { query, context: startingContext }, { client } ); ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TVariables` generic argument on the `GraphQLRequest` type. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The context object returned from `operation.getContext()` is now frozen to prevent mutable changes to the object which could result in subtle bugs. This applies to the `previousContext` object passed to the `operation.setContext()` callback as well. - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `forward` function passed to the request handler is now always provided to `request` and no longer optional. If you create custom links by subclassing `ApolloLink`, the `forward` function no longer needs to be optional: ```ts class CustomLink extends ApolloLink { request( operation: ApolloLink.Operation, // This no longer needs to be typed as optional forward: ApolloLink.ForwardFunction ) { // ... } } ``` As a result of this change, `ApolloLink` no longer detects terminating links by checking function arity on the request handler. This means using methods such as `concat` on a terminating link no longer emit a warning. On the flip side, if the terminating link calls the `forward` function, a warning is emitted and an observable that immediately completes is returned which will result in an error from Apollo Client. ### Minor Changes - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink`'s `concat` method now accepts multiple links to concatenate together. ```ts const first = new ApolloLink(); const link = first.concat(second, third, fouth); ``` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Many of the types exported from `@apollo/client/link` now live on the `ApolloLink` namespace. The old types are now deprecated in favor of the namespaced types. - `FetchResult` -> `ApolloLink.Result` - `GraphQLRequest` -> `ApolloLink.Request` - `NextLink` -> `ApolloLink.ForwardFunction` - `Operation` -> `ApolloLink.Operation` - `RequestHandler` -> `ApolloLink.RequestHandler` - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The static `ApolloLink.concat` method is now deprecated in favor of `ApolloLink.from`. `ApolloLink.concat` is now an alias for `ApolloLink.from` so prefer `ApolloLink.from` instead. ### Patch Changes - [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The individual `empty`, `concat`, `from` and `split` functions exported from `@apollo/client/link` are now deprecated in favor of using the static functions instead. ```diff import { ApolloLink, - concat, - empty, - from, - split, } from "@apollo/client/link"; - concat(first, second); + ApolloLink.concat(first, second); - empty(); + ApolloLink.empty(); - from([first, second]); + ApolloLink.from([first, second]); - split( + ApolloLink.split( (operation) => /* */, first, second ); ``` ## 4.0.0-rc.6 ### Major Changes - [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Remove `DataProxy` namespace and interface. - [#12788](https://github.com/apollographql/apollo-client/pull/12788) [`4179446`](https://github.com/apollographql/apollo-client/commit/417944677d2e79606b0f6cabd8d5d8b2063c876b) Thanks [@phryneas](https://github.com/phryneas)! - `TVariables` now always `extends OperationVariables` in all interfaces. - [#12802](https://github.com/apollographql/apollo-client/pull/12802) [`e2b51b3`](https://github.com/apollographql/apollo-client/commit/e2b51b30acbd360253100f9d2a91fe7e0c57be4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Disallow the `mutation` option for the `mutate` function returned from `useMutation`. - [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Generic arguments for `Cache.ReadOptions` were flipped from `TVariables, TData` to `TData, TVariables`. - [#12793](https://github.com/apollographql/apollo-client/pull/12793) [`24e98a1`](https://github.com/apollographql/apollo-client/commit/24e98a16648d4c21f37ba51a678a8849f88174ea) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloConsumer` has been removed - please use `useApolloClient` instead. ### Patch Changes - [#12782](https://github.com/apollographql/apollo-client/pull/12782) [`742b3a0`](https://github.com/apollographql/apollo-client/commit/742b3a0ed65d28818974e56225c86ab7e350e677) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `ApolloClient`, `ObservableQuery`, and `ApolloCache.watchFragment` method options and result types into namespaces. The old types are now exported as deprecated. ## 4.0.0-rc.5 ### Major Changes - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Report masked fragments as complete even when a nested masked fragment contains partial data. - [#12774](https://github.com/apollographql/apollo-client/pull/12774) [`511b4f3`](https://github.com/apollographql/apollo-client/commit/511b4f3e792a75aa5aa27b335e8119dbc2a9c254) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apply document transforms before reading data from the cache for `client.readQuery`, `client.readFragment`, `client.watchFragment`, `useFragment`, and `useSuspenseFragment`. NOTE: This change does not affect the equivalent `cache.*` APIs. To read data from the cache without first running document transforms, run `cache.readQuery`, `cache.readFragment`, etc. ### Minor Changes - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `dataState` to the value emitted from `client.watchFragment`. ### Patch Changes - [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache.watchFragment` now returns an `Unmasked` result since `cache.watchFragment` does not mask fragment spreads. - [#12370](https://github.com/apollographql/apollo-client/pull/12370) [`0517163`](https://github.com/apollographql/apollo-client/commit/05171634404a44231329bf63eee960db52d08b25) Thanks [@phryneas](https://github.com/phryneas)! - `InMemoryCache`: Fields with an empty argument object are now saved the same way as fields without arguments. Previously, it was possible that the reponses for these two queries would be stored differently in the cache: ```gql query PlainAccess { myField } ``` would be stored as `myField` and ```gql query AccessWithoutOptionalArgument($optional: String) { myField(optional: $optional) } ``` would be stored as `myField({"optional":"Foo"})` if called with `{optional: "Foo"}` and as `myField({})` if called without the optional argument. The cases `myField` and `myField({})` are equivalent from the perspective of a GraphQL server, and so in the future both of these will be stored as `myField` in the cache. - [#12775](https://github.com/apollographql/apollo-client/pull/12775) [`454ec78`](https://github.com/apollographql/apollo-client/commit/454ec78b751853da07243174a6f9bdc4535e7e8f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead. - [#12761](https://github.com/apollographql/apollo-client/pull/12761) [`db6f7c3`](https://github.com/apollographql/apollo-client/commit/db6f7c3823aaf58ee403ef45f0e817241b1c56a2) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate second argument to `readFragment` and `readQuery` - `optimistic` should be passed as part of the object in the first argument instead. ## 4.0.0-rc.4 ### Minor Changes - [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add `dataState` and overridable `DataValue` types to `useFragment` - [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add overridable `DataValue` types to `useSuspenseFragment` ## 4.0.0-rc.3 ### Major Changes - [#12731](https://github.com/apollographql/apollo-client/pull/12731) [`0198870`](https://github.com/apollographql/apollo-client/commit/0198870107eab7ad0bc69a549cb069fa41b3280f) Thanks [@phryneas](https://github.com/phryneas)! - Ship React Compiler compiled React hooks in `@apollo/client/react/compiled`. We now ship a React-Compiler compiled version of the React hooks in `@apollo/client/react/compiled`. This entry point contains everything that `@apollo/client/react` does, so you can use it as a drop-in replacement in your whole application if you choose to use the compiled hooks. ### Minor Changes - [#12753](https://github.com/apollographql/apollo-client/pull/12753) [`b85818d`](https://github.com/apollographql/apollo-client/commit/b85818dcc66d3ed8b1c3a7e5e37b2875d6bf9d03) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Renamed `client.reFetchObservableQueries` to `client.refetchObservableQueries`. `client.reFetchObservableQueries` is still available as an alias, but is now deprecated and will be removed in a future major version. ## 4.0.0-rc.2 ### Major Changes - [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The new `SetContextLink` flips the `prevContext` and `operation` arguments in the callback. The `setContext` function has remained unchanged. ```diff - new SetContextLink((operation, prevContext) => { + new SetContextLink((prevContext, operation) => { // ... }) ``` - [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `operation` argument to the callback passed to `SetContextLink` is now of type `SetContextLink.SetContextOperation` which is an `Operation` without the `getContext` or `setContext` functions. Previously the type of `operation` was `GraphQLRequest` which had access to a `context` property. The `context` property was always `undefined` and could result in bugs when using it instead of the `prevContext` argument. This change means the `operation` argument now contains an accessible `client` property. ### Minor Changes - [#12740](https://github.com/apollographql/apollo-client/pull/12740) [`1c6e03c`](https://github.com/apollographql/apollo-client/commit/1c6e03c9c74a9fad2a1c2e1c3ae61a9560038238) Thanks [@phryneas](https://github.com/phryneas)! - Overridable types for `dataState: "complete"`, `dataState: "streaming"` and `dataState: "partial"` responses. This adds the `DataValue` namespace exported from Apollo Client with the three types `DataValue.Complete`, `DataValue.Streaming` and `DataValue.Partial`. These types will be used to mark `TData` in the respective states. - `Complete` defaults to `TData` - `Streaming` defaults to `TData` - `Partial` defaults to `DeepPartial` All three can be overwritten, e.g. to be `DeepReadonly` using higher kinded types by following this pattern: ```ts import { HKT, DeepPartial } from "@apollo/client/utilities"; import { DeepReadonly } from "some-type-helper-library"; interface CompleteOverride extends HKT { return: DeepReadonly; } interface StreamingOverride extends HKT { return: DeepReadonly; } interface PartialOverride extends HKT { return: DeepReadonly>; } declare module "@apollo/client" { export interface TypeOverrides { Complete: CompleteOverride; Streaming: StreamingOverride; Partial: PartialOverride; } } ``` ### Patch Changes - [#12748](https://github.com/apollographql/apollo-client/pull/12748) [`e1ca85e`](https://github.com/apollographql/apollo-client/commit/e1ca85eab181d8e16d945e849dfb13352902f197) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where the new `operationType` property wasn't passed into `operation`. - [#12739](https://github.com/apollographql/apollo-client/pull/12739) [`b184754`](https://github.com/apollographql/apollo-client/commit/b184754d08810df9a7838615990e90a960966037) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `error` argument on the `onError` option for `subscribeToMore` to `ErrorLike`. ## 4.0.0-rc.1 ### Major Changes - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `resultCacheMaxSize` option from `InMemoryCache` options. - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `connectToDevtools` option from `ApolloClientOptions`. Use `devtools.enabled` instead. ### Minor Changes - [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `operationType` to `operation` in `ApolloLink`. This means that determining whether a `query` is a specific operation type can now be compared with this property instead of using `getMainDefinition`. ```diff - import { getMainDefinition } from "@apollo/client/utilities"; + import { OperationTypeNode } from "graphql"; ApolloLink.split( - ({ query }) => { - const definition = getMainDefinition(query); - return ( - definition.kind === 'OperationDefinition' && - definition.operation === 'subscription' - ); - return - }, + ({ operationType }) => { + return operationType === OperationTypeNode.SUBSCRIPTION; + }, conditionTrueLink, conditionFalseLink, ); ``` ### Patch Changes - [#12728](https://github.com/apollographql/apollo-client/pull/12728) [`07a0c8c`](https://github.com/apollographql/apollo-client/commit/07a0c8c52774793b254ecc91e5d4632bfdf48093) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export the `IgnoreModifier` type from `@apollo/client/cache`. - [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the `unsafePreviousData` argument on `UpdateQueryMapFn` and `SubscribeToMoreQueryFn` to a `DeepPartial` since the result may contain partial data. - [#12734](https://github.com/apollographql/apollo-client/pull/12734) [`037979d`](https://github.com/apollographql/apollo-client/commit/037979dc47ffb7125429707471d901a08db49283) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't warn about a missing resolver if a `@client` does not have a configured resolver. It is possible the cache contains a `read` function for the field and the warning added confusion. Note that `read` functions without a defined resolver will receive the `existing` argument as `null` instead of `undefined` even when data hasn't been written to the cache. This is because `LocalState` sets a default value of `null` when a resolver is not defined to ensure that the field contains a value in case a `read` function is not defined rather than omitting the field entirely. - [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `getMainDefinition` from `@apollo/client/utilities`. - [#12729](https://github.com/apollographql/apollo-client/pull/12729) [`699c830`](https://github.com/apollographql/apollo-client/commit/699c8305639ff69bab36fd2214defbe1ac6f0b18) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useQuery` rerenders when `notifyOnNetworkStatusChange` is `false` and a `refetch` that changes variables returns a result deeply equal to previous variables. ## 4.0.0-rc.0 ### Major Changes - [#12718](https://github.com/apollographql/apollo-client/pull/12718) [`ecfc02a`](https://github.com/apollographql/apollo-client/commit/ecfc02a37908b58d1f799f0e817cdeab98482720) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. ## 4.0.0-alpha.23 ### Major Changes - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An error is now thrown when trying to call `fetchMore` on a `cache-only` query. - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are no longer refetched when calling `client.reFetchObservableQueries` when `includeStandby` is `true`. - [#12705](https://github.com/apollographql/apollo-client/pull/12705) [`a60f411`](https://github.com/apollographql/apollo-client/commit/a60f411e58cc67730d0dc4513e4045f004027ded) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries will now initialize with `loading: false` and `networkStatus: NetworkStatus.ready` when there is no data in the cache. This means `useQuery` will no longer render a short initial loading state before rendering `loading: false` and `ObservableQuery.getCurrentResult()` will now return `loading: false` immediately. - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are now excluded from `client.refetchQueries` in all situations. `cache-only` queries affected by `updateCache` are also excluded from `refetchQueries` when `onQueryUpdated` is not provided. - [#12681](https://github.com/apollographql/apollo-client/pull/12681) [`b181f98`](https://github.com/apollographql/apollo-client/commit/b181f98476e635ba3eccab170c09d91f5408060c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changing most options when rerendering `useQuery` will no longer trigger a `reobserve` which may cause network fetches. Instead, the changed options will be applied to the next cache update or fetch. Options that now trigger a `reobserve` when changed between renders are: - `query` - `variables` - `skip` - Changing `fetchPolicy` to or from `standby` - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Rework option handling for `fetchMore`. - Previously, if the `query` option was specified, no options would be inherited from the underlying `ObservableQuery`. Now, even if `query` is specified, all unspecified options except for `variables` will be inherited from the underlying `ObservableQuery`. - If `query` is not specified, `variables` will still be shallowly merged with the `variables` of the underlying `ObservableQuery`. If a `query` option is specified, the `variables` passed to `fetchMore` are used instead. - `errorPolicy` of `fetchMore` will now always default to `"none"` instead of inherited from the `ObservableQuery` options. This can prevent accidental cache writes of partial data for a paginated query. To opt into receive partial data that may be written to the cache, pass an `errorPolicy` to `fetchMore` to override the default. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `Streaming` type that will mark `data` in results while `dataStatus` is `"streaming"`. `Streaming` defaults to `TData`, but can be overwritten in userland to integrate with different codegen dialects. You can override this type globally - this example shows how to override it with `DeepPartial`: ```ts import { HKT, DeepPartial } from "@apollo/client/utilities"; type StreamingOverride = DeepPartial; interface StreamingOverrideHKT extends HKT { return: StreamingOverride; } declare module "@apollo/client" { export interface TypeOverrides { Streaming: StreamingOverrideHKT; } } ``` - [#12499](https://github.com/apollographql/apollo-client/pull/12499) [`ce35ea2`](https://github.com/apollographql/apollo-client/commit/ce35ea2b3a87d6dd6757e9be50ecc42837bebe56) Thanks [@phryneas](https://github.com/phryneas)! - Enable React compiler for hooks in ESM builds. - [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ErrorResponse` object passed to the `disable` and `retry` callback options provided to `createPersistedQueryLink` no longer provides separate `graphQLErrors` and `networkError` properties and instead have been combined to a single `error` property of type `ErrorLike`. ```diff // The following also applies to the `retry` function since it has the same signature createPersistedQueryLink({ - disable: ({ graphQLErrors, networkError }) => { + disable: ({ error }) => { - if (graphQLErrors) { + if (CombinedGraphQLErrors.is(error)) { // ... handle GraphQL errors } - if (networkError) { + if (error) { // ... handle link errors } // optionally check for a specific kind of error - if (networkError) { + if (ServerError.is(error)) { // ... handle a server error } }); ``` The `response` property has also been renamed to `result`. ```diff createPersistedQueryLink({ - disable: ({ response }) => { + disable: ({ result }) => { // ... handle GraphQL errors } } }); ``` - [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries no longer poll when a `pollInterval` is set. Instead a warning is now emitted that polling has no effect. If the `fetchPolicy` is changed to `cache-only` after polling is already active, polling is stopped. - [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `response` property in `onError` link has been renamed to `result`. ```diff - onError(({ response }) => { + onError(({ result }) => { // ... }); ``` - [#12715](https://github.com/apollographql/apollo-client/pull/12715) [`0be0b3f`](https://github.com/apollographql/apollo-client/commit/0be0b3f54a1b533c95c69d3698c5c3bdbd6279fe) Thanks [@phryneas](https://github.com/phryneas)! - All links are now available as classes. The old creator functions have been deprecated. Please migrate these function calls to class creations: ```diff import { - setContext + SetContextLink } from "@apollo/client/link/context" -const link = setContext(...) +const link = new SetContextLink(...) ``` ```diff import { - createHttpLink + HttpLink } from "@apollo/client/link/http" -const link = createHttpLink(...) +const link = new HttpLink(...) ``` ```diff import { - createPersistedQueryLink + PersistedQueryLink } from "@apollo/client/link/persisted-queries" -const link = createPersistedQueryLink(...) +const link = new PersistedQueryLink(...) ``` ```diff import { - removeTypenameFromVariables + RemoveTypenameFromVariablesLink } from "@apollo/client/link/remove-typename" -const link = removeTypenameFromVariables(...) +const link = new RemoveTypenameFromVariablesLink(...) ``` ### Minor Changes - [#12711](https://github.com/apollographql/apollo-client/pull/12711) [`f730f83`](https://github.com/apollographql/apollo-client/commit/f730f83346d4e3c20116da6f55fdd1381114416c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` property to `CombinedGraphQLErrors` to capture any extensions from the original response. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The callback function that can be passed to the `ApolloClient.mutate` `refetchQueries` option will now receive a `FormattedExecutionResult` with an additional `dataState` option that describes if the result is `"streaming"` or `"complete"`. This indicates whether the `data` value is of type - `Unmasked` (if `"complete"`) - `Streaming>` (if `"streaming"`) - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Allow passing `errorPolicy` option to `fetchMore` and change default value to "none". - [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - The `FetchMoreQueryOptions` type has been inlined into `FetchMoreOptions`, and `FetchMoreQueryOptions` has been removed. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Prioritize usage of `FormattedExecutionResult` over `FetchResult` where applicable. Many APIs used `FetchResult` in place of `FormattedExecutionResult`, which could cause inconsistencies. - `FetchResult` is now used to refer to an unhandled "raw" result as returned from a link. This can also include incremental results that use a different format. - `FormattedExecutionResult` from the `graphql` package is now used to represent the execution of a standard GraphQL request without incremental results. If your custom links access the `data` property, you might need to first check if the result is a standard GraphQL result by using the `isFormattedExecutionResult` helper from `@apollo/client/utilities`. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The `mutationResult` option passed to the `updateQueries` callback now has an additional property, `dataState` with possible values of `"complete"` and `"streaming"`. This indicates whether the `data` value is of type - `Unmasked` (if `"complete"`) - `Streaming>` (if `"streaming"`) ### Patch Changes - [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Remove these incremental-format-specific types: - `ExecutionPatchIncrementalResult` - `ExecutionPatchInitialResult` - `ExecutionPatchResult` - `IncrementalPayload` - `Path` - [#12677](https://github.com/apollographql/apollo-client/pull/12677) [`94e58ed`](https://github.com/apollographql/apollo-client/commit/94e58ed75fc547ff037d9efeeba929fd61b20c4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Downgrade minimum supported `rxjs` peer dependency version to 7.3.0. - [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Slightly rework multipart response parsing. This removes last incremental-protocol-specific details from `HttpLink` and `BatchHttpLink`. - [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The incremental delivery (`@defer` support) implementation is now pluggable. `ApolloClient` now per default ships without an incremental format implementation and allows you to swap in the format that you want to use. Usage looks like this: ```ts import { // this is the default NotImplementedHandler, // this implements the `@defer` transport format that ships with Apollo Router Defer20220824Handler, // this implements the `@defer` transport format that ships with GraphQL 17.0.0-alpha.2 GraphQL17Alpha2Handler, } from "@apollo/client/incremental"; const client = new ApolloClient({ cache: new InMemoryCache({ /*...*/ }), link: new HttpLink({ /*...*/ }), incrementalHandler: new Defer20220824Handler(), }); ``` We will add handlers for other response formats that can be swapped this way during the lifetime of Apollo Client 4.0. ## 4.0.0-alpha.22 ### Major Changes - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `includeExtensions` option of `HttpLink` and `BatchHttpLink` now defaults to `true`. If `includeExtensions` is `true`, but `extensions` is not set or empty, extensions will not be included in outgoing requests. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `ApolloClient` constructor options `name` and `version` that are used to configure the client awareness feature have moved onto a `clientAwareness` key. ```diff const client = new ApolloClient({ // .. - name: "my-app", - version: "1.0.0", + clientAwareness: { + name: "my-app", + version: "1.0.0", + }, }); ``` - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing any other field to `__typename` is now forbidden. - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing a field to an alias beginning with `__ac_` is now forbidden - this namespace is now reserved for internal use. - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Adds enhanced client awareness to the client. `HttpLink` and `BatchHttpLink` will now per default send information about the client library you are using in `extensions`. This could look like this: ```json { "query": "query GetUser($id: ID!) { user(id: $id) { __typename id name } }", "variables": { "id": 5 }, "extensions": { "clientLibrary": { "name": "@apollo/client", "version": "4.0.0" } } } ``` This feature can be disabled by passing `enhancedClientAwareness: { transport: false }` to your `ApolloClient`, `HttpLink` or `BatchHttpLink` constructor options. ### Minor Changes - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adjusted the accept header for multipart requests according to the new GraphQL over HTTP spec with these changes: ```diff -multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json +multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/graphql-response+json,application/json;q=0.9 ``` ```diff -multipart/mixed;deferSpec=20220824,application/json +multipart/mixed;deferSpec=20220824,application/graphql-response+json,application/json;q=0.9 ``` - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Add the new `ClientAwarenessLink`. This link is already included in `HttpLink` and `BatchHttpLink` to enable the "client awareness" and "enhanced client awareness" features, but you can also use `ClientAwarenessLink` directly in your link chain to combine it with other terminating links. If you want to save the bundle size that `ClientAwarenessLink` adds to `HttpLink` and `BatchHttpLink`, you can use `BaseHttpLink` or `BaseBatchHttpLink` instead. These links come without the `ClientAwarenessLink` included. For example: ```diff import { ApolloClient, - HttpLink, } from "@apollo/client"; +import { BaseHttpLink } from "@apollo/client/link/http"; const client = new ApolloClient({ - link: new HttpLink({ + link: new BaseHttpLink({ uri, }), cache: new InMemoryCache(), }); ``` - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adds an `accept` option to `HttpOptions` that allows to add additional `Accept` headers to be merged in without overriding user-specified or default accept headers. ### Patch Changes - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Fixed a bug in `PersistedQueryLink` where the `persistedQuery` extension would still be sent after a `PersistedQueryNotSupported` if `includeExtensions` was enabled on `HttpLink`. ## 4.0.0-alpha.21 ### Major Changes - [#12686](https://github.com/apollographql/apollo-client/pull/12686) [`dc4b1d0`](https://github.com/apollographql/apollo-client/commit/dc4b1d0d2479a37067113b7bd161a550fb8e4df6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - A `@defer` query that has not yet finished streaming is now considered loading and thus the `loading` flag will be `true` until the response has completed. A new `NetworkStatus.streaming` value has been introduced and will be set as the `networkStatus` while the response is streaming. - [#12685](https://github.com/apollographql/apollo-client/pull/12685) [`3b74800`](https://github.com/apollographql/apollo-client/commit/3b748003df89ec69a6ad045fb47bbe9c3e62104c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the check and warning for `cache.fragmentMatches` when applying data masking. `cache.fragmentMatches` is a required API and data masking may crash when `cache.fragmentMatches` does not exist. - [#12684](https://github.com/apollographql/apollo-client/pull/12684) [`e697431`](https://github.com/apollographql/apollo-client/commit/e697431a9995fd1900e625c30a9065edd71111d9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `context` from `useLazyQuery` hook options. If used, `context` must now be provided to the `execute` function. `context` will reset to `{}` if not provided as an option to `execute`. ## 4.0.0-alpha.20 ### Major Changes - [#12675](https://github.com/apollographql/apollo-client/pull/12675) [`8f1d974`](https://github.com/apollographql/apollo-client/commit/8f1d974881ff54339b6b6593a219ba6d5fd013c0) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` no longer has a `queryId` property. `ApolloClient.getObservableQueries` no longer returns a `Map`, but a `Set`. - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery`s will now only be registered with the `ApolloClient` while they have subscribers. That means that `ApolloClient.getObservableQueries` and `ApolloClient.refetchQueries` will only be able to return/refetch queries that have at least one subscriber. This changes the previous meaning of `active` and `inactive` queries: - `inactive` queries are queries with a subscriber that are skipped from a React hook or have a `fetchPolicy` of `standby` - `active` queries are queries with at least one subscriber that are not skipped or in `standby`. `ObservableQuery`s without subscribers but with an active ongoing network request (e.g. caused by calling `reobserve`) will be handled as if they had a subscriber for the duration of the query. - [#12678](https://github.com/apollographql/apollo-client/pull/12678) [`91a876b`](https://github.com/apollographql/apollo-client/commit/91a876b059042828e431931e7a3c2e0365c387b8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `queryRef`s created by `preloadQuery` no longer have a `.toPromise()` function. Instead `preloadQuery` now has a `toPromise` function that accepts a queryRef and will resolve when the underlying promise has been resolved. ```diff const queryRef = preloadQuery(query, options); - await queryRef.toPromise(); + await preloadQuery.toPromise(queryRef); ``` - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloClient.stop()` now cleans up more agressively to prevent memory leaks: - It will now unsubscribe all active `ObservableQuery` instances by emitting a `completed` event. - It will now reject all currently running queries with `"QueryManager stopped while query was in flight"`. - It will remove all queryRefs from the suspense cache. ### Minor Changes - [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `.stop` function on `ObservableQuery`. Calling this method will unsubscribe all current subscribers by sending a `complete` event from the observable and tear down the `ObservableQuery`. ## 4.0.0-alpha.19 ### Major Changes - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unsubscribing from an `ObservableQuery` before a value has been emitted will remove the query from the tracked list of queries and will no longer be eligible for query deduplication. ### Minor Changes - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions created by `client.subscribe()` can now be restarted. Restarting a subscription will terminate the connection with the link chain and recreate the request. Restarts also work across deduplicated subscriptions so calling `restart` on an `observable` who's request is deduplicated will restart the connection for each observable. ```ts const observable = client.subscribe({ query: subscription }); // Restart the connection to the link observable.restart(); ``` - [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deduplicating subscription operations is now supported. Previously it was possible to deduplicate a subscription only if the new subscription was created before a previously subscribed subscription emitted any values. As soon as a value was emitted from a subscription, new subscriptions would create new connections. Deduplication is now active for as long as a subscription connection is open (i.e. the source observable hasn't emitted a `complete` or `error` notification yet.) To disable deduplication and force a new connection, use the `queryDeduplication` option in `context` like you would a query operation. As a result of this change, calling the `restart` function returned from `useSubscription` will now restart the connection on deduplicated subscriptions. ## 4.0.0-alpha.18 ### Minor Changes - [#12670](https://github.com/apollographql/apollo-client/pull/12670) [`0a880ea`](https://github.com/apollographql/apollo-client/commit/0a880ea4c2360a985fdd2edadb94fcc4b82bad73) Thanks [@phryneas](https://github.com/phryneas)! - Provide a mechanism to override the DataMasking types. Up until now, our types `Masked`, `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` would assume that you are stictly using the type output format of GraphQL Codegen. With this change, you can now modify the behaviour of those types if you use a different form of codegen that produces different types for your queries. A simple implementation that would override the `Masked` type to remove all fields starting with `_` from a type would look like this: ```ts // your actual implementation of `Masked` type CustomMaskedImplementation = { [K in keyof TData as K extends `_${string}` ? never : K]: TData[K]; }; import { HKT } from "@apollo/client/utilities"; // transform this type into a higher kinded type that can be evaulated at a later time interface CustomMaskedType extends HKT { arg1: unknown; // TData return: CustomMaskedImplementation; } // create an "implementation interface" for the types you want to override export interface CustomDataMaskingImplementation { Masked: CustomMaskedType; // other possible keys: `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` } ``` then you would use that `CustomDataMaskingImplementation` interface in your project to extend the `TypeOverrides` interface exported by `@apollo/client` with it's functionality: ```ts declare module "@apollo/client" { export interface TypeOverrides extends CustomDataMaskingImplementation {} } ``` After that, all internal usage of `Masked` in Apollo Client as well as all usage in your code base will use the new `CustomMaskedType` implementation. If you don't specify overrides, Apollo Client will still default to the GraphQL Codegen data masking implementation. The types for that are also explicitly exported as the `GraphQLCodegenDataMasking` namespace in `@apollo/client/masking`. ## 4.0.0-alpha.17 ### Major Changes - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `TData` generic provided to types that return a `dataState` property is now modified by the given `DataState` generic instead of passing a modified `TData` type. For example, a `QueryRef` that could return partial data was defined as `QueryRef, TVariables>`. Now `TData` should be provided unmodified and a set of allowed states should be given instead: `QueryRef`. To migrate, use the following guide to replace your type with the right set of states (all types listed below are changed the same way): ```diff - QueryRef // `QueryRef`'s default is 'complete' | 'streaming' so this can also be left alone if you prefer // All other types affected by this change default to all states + QueryRef + QueryRef - QueryRef + QueryRef - QueryRef, TVariables> + QueryRef - QueryRef | undefined, TVariables> + QueryRef ``` The following types are affected. Provide the allowed `dataState` values to the `TDataState` generic: - `ApolloQueryResult` - `QueryRef` - `PreloadedQueryRef` - `useLazyQuery.Result` - `useQuery.Result` - `useReadQuery.Result` - `useSuspenseQuery.Result` All `*QueryRef` types default to `complete | streaming` states while the rest of the types default to `'complete' | 'streaming' | 'partial' | 'empty'` states. You shouldn't need to provide the states unless you need to either allow for partial data/empty values (`*QueryRef`) or a restricted set of states. - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `QueryReference` type. Please use `QueryRef` instead. - [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - If the `execute` function of `useLazyQuery` is executed, previously started queries from the same `useLazyQuery` usage will be rejected with an `AbortError` unless `.retain()` is called on the promise returned by previous `execute` calls. Please keep in mind that `useLazyQuery` is primarily meant as a means to synchronize your component to the status of a query and that it's purpose it not to make a series of network calls. If you plan on making a series of network calls without the need to synchronize the result with your component, consider using `ApolloClient.query` instead. ### Minor Changes - [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery.refetch` and `ObservableQuery.reobserve` and the `execute` function of `useLazyQuery` now return a `ResultPromise` with an additional `.retain` method. If this method is called, the underlying network operation will be kept running even if the `ObservableQuery` itself does not require the result anymore, and the Promise will resolve with the final result instead of resolving with an intermediate result in the case of early cancellation. - [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a new `dataState` property that determines the completeness of the `data` property. `dataState` helps narrow the type of `data`. `dataState` is now emitted from `ObservableQuery` and returned from all React hooks that return a `data` property. The `dataState` values are: - `empty`: No data could be fulfilled from the cache or the result is incomplete. `data` is `undefined`. - `partial`: Some data could be fulfilled from the cache but `data` is incomplete. This is only possible when `returnPartialData` is `true`. - `streaming`: `data` is incomplete as a result of a deferred query and the result is still streaming in. - `complete`: `data` is a fully satisfied query result fulfilled either from the cache or network. Example: ```ts const { data, dataState } = useQuery(query); if (dataState === "empty") { expectTypeOf(data).toEqualTypeOf(); } if (dataState === "partial") { expectTypeOf(data).toEqualTypeOf>(); } if (dataState === "streaming") { expectTypeOf(data).toEqualTypeOf(); } if (dataState === "complete") { expectTypeOf(data).toEqualTypeOf(); } ``` ## 4.0.0-alpha.16 ### Major Changes - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Replace the `result` property on `ServerError` with `bodyText`. `bodyText` is set to the raw string body. `HttpLink` and `BatchHttpLink` no longer try and parse the response body as JSON when a `ServerError` is thrown. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - More strictly adhere to the [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http/draft/). This change adds support for the `application/graphql-response+json` media type and modifies the behavior of the `application/json` media type. - The client will parse the response as a well-formed GraphQL response when the server encodes `content-type` using `application/graphql-response+json` with a non-200 status code. - The client will now throw a `ServerError` when the server encodes `content-type` using `application/json` and returns a non-200 status code. - The client will now throw a `ServerError` when the server encodes using any other `content-type` and returns a non-200 status code. NOTE: If you use a testing utility to mock requests in your test, you may experience different behavior than production if your testing utility responds as `application/json` but your production server responds as `application/graphql-response+json`. If a `content-type` header is not set, the client interprets the response as `application/json`. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the default `Accept` header to `application/graphql-response+json,application/json;q=0.9`. - [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `HttpLink` and `BatchHttpLink` no longer emit a `next` notification with the JSON-parsed response body when a well-formed GraphQL response is returned and a `ServerError` is thrown. ## 4.0.0-alpha.15 ### Major Changes - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move internal testing utilities in `@apollo/client/testing` to `@apollo/client/testing/internal` and remove deprecated testing utilities. Some of the testing utilities exported from the `@apollo/client/testing` endpoint were not considered stable. As a result of this change, testing utilities or types exported from `@apollo/client/testing` are now considered stable and will not undergo breaking changes. The following APIs were removed. To migrate, update usages of the following APIs as such: **`createMockClient`** ```diff - const client = createMockClient(data, query, variables); + const client = new ApolloClient({ + cache: new InMemoryCache(), + link: new MockLink([ + { + request: { query, variables }, + result: { data }, + } + ]), + }); ``` **`mockObservableLink`** ```diff - const link = mockObservableLink(); + const link = new MockSubscriptionLink(); ``` **`mockSingleLink`** ```diff - const link = mockSingleLink({ - request: { query, variables }, - result: { data }, - }); + const link = new MockLink([ + { + request: { query, variables }, + result: { data }, + } + ]); ``` - [#12637](https://github.com/apollographql/apollo-client/pull/12637) [`d2a60d4`](https://github.com/apollographql/apollo-client/commit/d2a60d45e734a2518dad2443f85d82553cd6456a) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery`: only advance `previousData` if `data` actually changed - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now return a `loading: false` state for `fetchPolicy` `standby`, even before subscription - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/core` entrypoint in favor of `@apollo/client/testing`. ### Minor Changes - [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `MockLink` types to `MockLink` namespace. This affects the `MockedResponse`, `MockLinkOptions`, and `ResultFunction` types. These types are still exported but are deprecated in favor of the namespace. To migrate, use the types on the `MockLink` namespace instead. ```diff import { - MockedResponse, - MockLinkOptions, - ResultFunction, + MockLink } from "@apollo/client/testing"; - const mocks: MockedResponse = []; + const mocks: MockLink.MockedResponse = []; - const result: ResultFunction = () => {/* ... */ } + const result: MockLink.ResultFunction = () => {/* ... */ } - const options: MockLinkOptions = {} + const options: MockLink.Options = {} ``` ### Patch Changes - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - When updating `skip` from `false` to `true` in `useQuery`, retain `data` if it is available rather than setting it to `undefined`. - [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - The `error` property is no longer present when `skip` is `true` in `useQuery`. ## 4.0.0-alpha.14 ### Major Changes - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `getCacheKey` function is no longer available from `operation.getContext()` in the link chain. Use `operation.client.cache.identify(obj)` in the link chain instead. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now keep previous `data` around when emitting a `loading` state, unless `query` or `variables` changed. Note that `@exports` variables are not taken into account for this, so `data` will stay around even if they change. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Removed `getLastResult`, `getLastError` and `resetLastResults` from `ObservableQuery` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `resolvers` option from `ApolloClient`. Local resolvers have instead been moved to the new `LocalState` instance which is assigned to the `localState` option in `ApolloClient`. To migrate, move the `resolvers` values into a `LocalState` instance and assign that instance to `localState`. ```diff new ApolloClient({ - resolvers: { /* ... */ } + localState: new LocalState({ + resolvers: { /* ... */ } + }), }); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove local resolvers APIs from `ApolloClient` in favor of `localState`. Methods removed are: - `addResolvers` - `getResolvers` - `setResolvers` - `setLocalStateFragmentMatcher` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Third-party caches must now implement the `fragmentMatches` API. Additionally `fragmentMatches` must be able to handle both `InlineFragmentNode` and `FragmentDefinitionNode` nodes. ```ts class MyCache extends ApolloCache { // This is now required public fragmentMatches( fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string ): boolean { return; // ... logic to determine if typename matches fragment } } ``` - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Reworked the logic for then a loading state is triggered. If the link chain responds synchronously, a loading state will be omitted, otherwise it will be triggered. If local resolvers are used, the time window for "sync vs async" starts as soon as `@exports` variables are resolved. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Dropped the `saveAsLastResult` argument from `ObservableQuery.getCurrentResult` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The resolver function's `context` argument (the 3rd argument) has changed to provide additional information without the possibility of name clashes. Previously the `context` argument would spread request context and override the `client` and `cache` properties to give access to both inside of a resolver. The `context` argument takes now takes the following shape: ```ts { // the request context. By default `TContextValue` is of type `DefaultContext`, // but can be changed if a `context` function is provided. requestContext: TContextValue, // The client instance making the request client: ApolloClient, // Whether the resolver is run as a result of gathering exported variables // or resolving the value as part of the result phase: "exports" | "resolve" } ``` To migrate, pull any request context from `requestContext` and the `cache` from the `client` property: ```diff new LocalState({ resolvers: { Query: { - myResolver: (parent, args, { someValue, cache }) => { + myResolver: (parent, args, { requestContext, client }) => { + const someValue = requestContext.someValue; + const cache = client.cache; } } } }); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer ships with support for `@client` fields out-of-the-box and now must be opt-in. To opt in to use `@client` fields, pass an instantiated `LocalState` instance to the `localState` option. If a query contains `@client` and local state hasn't been configured, an error will be thrown. ```ts import { LocalState } from "@apollo/client/local-state"; new ApolloClient({ localState: new LocalState(), }); ``` - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `fragmentMatcher` option from `ApolloClient`. Custom fragment matchers used with local state are no longer supported. Fragment matching is now performed by the configured `cache` via the `cache.fragmentMatches` API. - [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - A call to `ObservableQuery.setVariables` with different variables or a `ObservableQuery.refetch` call will always now guarantee that a value will be emitted from the observable, even if it is deep equal to the previous value. ### Minor Changes - [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Revamp local resolvers and fix several issues from the existing `resolvers` option. - Throwing errors in a resolver will set the field value as `null` and add an error to the response's `errors` array. - Remote results are dealiased before they are passed as the parent object to a resolver so that you can access fields by their field name. - You can now specify a `context` function that you can use to customize the `requestContext` given to resolvers. - The `LocalState` class accepts a `Resolvers` generic that provides autocompletion and type checking against your resolver types to ensure your resolvers are type-safe. - `data: null` is now handled correctly and does not call your local resolvers when the server does not provide a result. - Additional warnings have been added to provide hints when resolvers behave unexpectedly. ```ts import { LocalState } from "@apollo/client/local-state"; import { Resolvers } from "./path/to/local-resolvers-types.ts"; // LocalState now accepts a `Resolvers` generic. const localState = new LocalState({ // The return value of this funciton context: (options) => ({ // ... }), resolvers: { // ... }, }); // You may also pass a `ContextValue` generic used to ensure the `context` // function returns the correct type. This type is inferred from your resolvers // if not provided. new LocalState({ // ... }); ``` ## 4.0.0-alpha.13 ### Major Changes - [#12600](https://github.com/apollographql/apollo-client/pull/12600) [`34ff6aa`](https://github.com/apollographql/apollo-client/commit/34ff6aa25b47c3e84d0b18e2c69bc995814bf2f2) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move most of the utilities in `@apollo/client/utilities` to `@apollo/client/utilities/internal`. Many of the utilities exported from the `@apollo/client/utilities` endpoint were not considered stable. As a result of this change, utilities or types exported from `@apollo/client/utilities` are now documented and considered stable and will not undergo breaking changes. - [#12595](https://github.com/apollographql/apollo-client/pull/12595) [`60bb49c`](https://github.com/apollographql/apollo-client/commit/60bb49ccea9aecf3e6a212b5a1f71907e60af886) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/experimental` test utilities. Use [GraphQL Testing Library](https://github.com/apollographql/graphql-testing-library) instead. ### Patch Changes - [#12618](https://github.com/apollographql/apollo-client/pull/12618) [`e4a3ecf`](https://github.com/apollographql/apollo-client/commit/e4a3ecfe50bc5b462067574a0ffb1951549fb60f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove code that strips `@client` fields in `HttpLink` and `BatchHttpLink`. This was unused code since core handles removing `@client` fields and should have no observable change. ## 4.0.0-alpha.12 ### Major Changes - [#12586](https://github.com/apollographql/apollo-client/pull/12586) [`605db8e`](https://github.com/apollographql/apollo-client/commit/605db8e94fe2ce74c0a395f38f6873d40f431365) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `typeDefs` option from `ApolloClient`. - [#12588](https://github.com/apollographql/apollo-client/pull/12588) [`eed825a`](https://github.com/apollographql/apollo-client/commit/eed825a2549f1d21fff2ec179815206b3baf0fcb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TContext` generic argument from all types that use it. `TContext` is replaced with `DefaultContext` which can be modified using declaration merging. - [#12590](https://github.com/apollographql/apollo-client/pull/12590) [`a005e82`](https://github.com/apollographql/apollo-client/commit/a005e822de7b24783f85be45df142ffbb9bc561b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop `graphql` v15 as a valid peer dependency. - [#12591](https://github.com/apollographql/apollo-client/pull/12591) [`a7e7383`](https://github.com/apollographql/apollo-client/commit/a7e738328951f5dac25a5fe48d28b3640a3e0eb9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename the `@apollo/client/link/core` entrypoint to `@apollo/client/link`. - [#12589](https://github.com/apollographql/apollo-client/pull/12589) [`15f5a1c`](https://github.com/apollographql/apollo-client/commit/15f5a1c29ac05015387a7bbc2dbe9a91d09fedfa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require the `link` option when instantiating `ApolloClient`. This removes the `uri`, `credentials` and `headers` options from `ApolloClient` in favor of passing an instantiated `HttpLink` directly. To migrate: **If using `uri`, `credentials`, or `headers` options** ```diff new ApolloClient({ // ... - uri, - credentials, - headers, + link: new HttpLink({ uri, credentials, headers }), // or if you prefer the function call approach: + link: createHttpLink({ uri, credentials, headers }), }); ``` **If creating a client without the `link` option** ```diff new ApolloClient({ // ... + link: ApolloLink.empty() }); ``` ## 4.0.0-alpha.11 ### Major Changes - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `cache` and `forceFetch` properties are no longer available on context when calling `operation.getContext()`. `cache` can be accessed through the `operation` with `operation.client.cache` instead. `forceFetch` has been replaced with `queryDeduplication` which specifies whether `queryDeduplication` was enabled for the request or not. - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink.execute` now requires a third argument which provides the `client` that initiated the request to the link chain. If you use `execute` directly, add a third argument with a `client` property: ```ts ApolloLink.execute(link, operation, { client }); // or if you import the `execute` function directly: execute(link, operation, { client }); ``` - [#12566](https://github.com/apollographql/apollo-client/pull/12566) [`ce4b488`](https://github.com/apollographql/apollo-client/commit/ce4b488bef13f2f5ce1b348d8c3196e198165dd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't `broadcastQueries` when a query is torn down. ### Minor Changes - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide an extension to define types for `context` passed to the link chain. To define your own types, use [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) to add properties to the `DefaultContext` type. ```ts // @apollo-client.d.ts // This import is necessary to ensure all Apollo Client imports // are still available to the rest of the application. import "@apollo/client"; declare module "@apollo/client" { interface DefaultContext extends Record { myProperty: string; } } ``` Links that provide context options can be used with this type to add those context types to `DefaultContext`. For example, to add context options from `HttpLink`, add the following code: ```ts import { HttpLink } from "@apollo/client"; declare module "@apollo/client" { interface DefaultContext extends HttpLink.ContextOptions { myProperty: string; } } ``` At this time, the following built-in links support context options: - `HttpLink.ContextOptions` - `BatchHttpLink.ContextOptions` - [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `client` property to the `operation` passed to the link chain. This `client` is set as the `client` making the request to the link chain. ### Patch Changes - [#12574](https://github.com/apollographql/apollo-client/pull/12574) [`0098ec9`](https://github.com/apollographql/apollo-client/commit/0098ec9f860e4e08a2070823f723dce401ae588a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `gql` from the `@apollo/client/react` entrypoint. - [#12572](https://github.com/apollographql/apollo-client/pull/12572) [`3dc50e6`](https://github.com/apollographql/apollo-client/commit/3dc50e6476dcedf82ed3856bf9f4571a32a760a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adjust `useMutation` types to better handle required variables. When required variables are missing, TypeScript will now complain if they are not provided either to the hook or the returned `mutate` function. Providing required variables to `useMutation` will make them optional in the returned `mutate` function. ## 4.0.0-alpha.10 ### Major Changes - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` can now be reset back to empty when calling `reobserve` with `variables: undefined`. Previously the `variables` key would be ignored so `variables` would remain unchanged. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `never` is no longer supported as a valid `TVariables` generic argument for APIs that require `variables` as part of its type. Use `Record` instead. - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - When passing a `variables` key with the value `undefined`, the value will be replaced by the default value in the query, if it is provided, rather than leave it as `undefined`. ```ts // given this query const query = gql` query PaginatedQuery($limit: Int! = 10, $offset: Int) { list(limit: $limit, offset: $offset) { id } } `; const observable = client.query({ query, variables: { limit: 5, offset: 0 }, }); console.log(observable.variables); // => { limit: 5, offset: 0 } observable.reobserve({ variables: { limit: undefined, offset: 10 } }); // limit is now `10`. This would previously be `undefined` console.log(observable.variables); // => { limit: 10, offset: 10 } ``` - [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports a `fetchPolicy` of `standby`. `standby` does not fetch and did not return `data`. `standby` is meant for watched queries where fetching should be on hold. ### Minor Changes - [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify message formatter for `CombinedGraphQLErrors` and `CombinedProtocolErrors`. To provide your own message formatter, override the static `formatMessage` property on these classes. ```ts CombinedGraphQLErrors.formatMessage = ( errors, { result, defaultFormatMessage } ) => { return "Some formatted message"; }; CombinedProtocolErrors.formatMessage = (errors, { defaultFormatMessage }) => { return "Some formatted message"; }; ``` - [#12546](https://github.com/apollographql/apollo-client/pull/12546) [`5dffbbe`](https://github.com/apollographql/apollo-client/commit/5dffbbe407eb1d9adbcb0fff89f2d3a75dc1ad2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a static `is` method to error types defined by Apollo Client. `is` makes it simpler to determine whether an error is a specific type, which can be helpful in cases where you'd like to narrow the error type in order to use specific properties from that error. This change applies to the following error types: - `CombinedGraphQLErrors` - `CombinedProtocolErrors` - `ServerError` - `ServerParseError` - `UnconventionalError` **Example** ```ts import { CombinedGraphQLErrors } from "@apollo/client"; if (CombinedGraphQLErrors.is(error)) { console.log(error.message); error.errors.forEach((graphQLError) => console.log(graphQLError.message)); } ``` - [#12561](https://github.com/apollographql/apollo-client/pull/12561) [`99d72bf`](https://github.com/apollographql/apollo-client/commit/99d72bfdb38e3d9679f60b9acb065a84e3b42fd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to detect if an error was an error was emitted from the link chain. This is useful if your application throws custom errors in other areas of the application and you'd like to differentiate them from errors emitted by the link chain itself. To detect if an error was emitted from the link chain, use `LinkError.is`. ```ts import { LinkError } from "@apollo/client"; client.query({ query }).catch((error) => { if (LinkError.is(error)) { // This error originated from the link chain } }); ``` ### Patch Changes - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `variables` option used with various APIs are now enforced more consistently across the client when `TVariables` contains required variables. If required `variables` are not provided, TypeScript will now complain that it requires a `variables` option. This change affects the following APIs: - `client.query` - `client.mutate` - `client.subscribe` - `client.watchQuery` - `useBackgroundQuery` - `useQuery` - `useSubscription` - `useSuspenseQuery` - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `variables` returned from `useLazyQuery`. When `called` is `false`, `variables` is now `Partial` instead of `TVariables`. - [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports `notifyOnNetworkStatusChange` in options. An error will be thrown if this option is set. The effects of this option were not observable by `client.query` since `client.query` emits a single result. - [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update format of the error message for `CombinedGraphQLErrors` and `CombinedProtocolErrors` to be more like v3.x. ```diff console.log(error.message); - `The GraphQL server returned with errors: - - Email not found - - Username already in use` + `Email not found + Username already in use` ``` - [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` has been updated to return `TVariables` rather than `TVariables | undefined`. This is more consistent with the runtime value where an empty object (`{}`) will be returned when the `variables` option is not provided. ## 4.0.0-alpha.9 ### Major Changes - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`. - [#12512](https://github.com/apollographql/apollo-client/pull/12512) [`e809b71`](https://github.com/apollographql/apollo-client/commit/e809b71aa9a02917a286afdbb03d5be8e5947c53) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`. ```ts new ApolloClient({ defaultOptions: { watchQuery: { // Use the v3 default notifyOnNetworkStatusChange: false, }, }, }); ``` ### Patch Changes - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables. - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume. - [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`. - [#12542](https://github.com/apollographql/apollo-client/pull/12542) [`afb4fce`](https://github.com/apollographql/apollo-client/commit/afb4fce08859b2c6eebf288230a7c35b7acf2da6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type. ## 4.0.0-alpha.8 ### Major Changes - [#12539](https://github.com/apollographql/apollo-client/pull/12539) [`dd0d6d6`](https://github.com/apollographql/apollo-client/commit/dd0d6d6d96d8b810e30dc2fdee2ac8a2477d0017) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `onError` link now uses a single `error` property to report the error that caused the link callback to be called. This will be an instance of `CombinedGraphQLErrors` in the event GraphQL errors were emitted from the terminating link, `CombinedProtocolErrors` if the terminating link emitted protocol errors, or the unwrapped error type if any other non-GraphQL error was thrown or emitted. ```diff - const errorLink = onError(({ graphQLErrors, networkError, protocolErrors }) => { - graphQLErrors.forEach(error => console.log(error.message)); + const errorLink = onError(({ error }) => { + if (error.name === 'CombinedGraphQLErrors') { + error.errors.forEach(rawError => console.log(rawError.message)); + } }); ``` - [#12533](https://github.com/apollographql/apollo-client/pull/12533) [`73221d8`](https://github.com/apollographql/apollo-client/commit/73221d87bd5640986f86fe3ee50c63ed49834cbb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onError` and `setOnError` methods from `ApolloLink`. `onError` was only used by `MockLink` to rewrite errors if `setOnError` was used. - [#12531](https://github.com/apollographql/apollo-client/pull/12531) [`7784b46`](https://github.com/apollographql/apollo-client/commit/7784b46117a4f91a270a020ed1a24f042cb9ee17) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mocked responses passed to `MockLink` now accept a callback for the `request.variables` option. This is used to determine if the mock should be matched for a set of request variables. With this change, the `variableMatcher` option has been removed in favor of passing a callback to `variables`. Update by moving the callback function from `variableMatcher` to `request.variables`. ```diff new MockLink([ { request: { query, + variables: (requestVariables) => true }, - variableMatcher: (requestVariables) => true } ]); ``` - [#12526](https://github.com/apollographql/apollo-client/pull/12526) [`391af1d`](https://github.com/apollographql/apollo-client/commit/391af1dd733219b7e1e14cfff9d5e3ce3967242f) Thanks [@phryneas](https://github.com/phryneas)! - The `@apollo/client` and `@apollo/client/core` entry points are now equal. In the next major, the `@apollo/client/core` entry point will be removed. Please change imports over from `@apollo/client/core` to `@apollo/client`. - [#12525](https://github.com/apollographql/apollo-client/pull/12525) [`8785186`](https://github.com/apollographql/apollo-client/commit/87851863b94eebbc208671b17aeca73748ac41f6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error when a client-only query is used in a mocked response passed to `MockLink`. - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `delay` for all mocked responses passed to `MockLink` using `realisticDelay`. This ensures your test handles loading states by default and is not reliant on a specific timing. If you would like to restore the old behavior, use a global default delay of `0`. ```ts MockLink.defaultOptions = { delay: 0, }; ``` - [#12530](https://github.com/apollographql/apollo-client/pull/12530) [`2973e2a`](https://github.com/apollographql/apollo-client/commit/2973e2a6e6fd81fa59b769d84c252c98ca69440d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `newData` option for mocked responses passed to `MockLink` or the `mocks` option on `MockedProvider`. This option was undocumented and was nearly identical to using the `result` option as a callback. To replicate the old behavior of `newData`, use `result` as a callback and add the `maxUsageCount` option with a value set to `Number.POSITIVE_INFINITY`. **with `MockLink`** ```diff new MockLink([ { request: { query, variables }, - newData: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + maxUsageCount: Number.POSITIVE_INFINITY, } ]) ``` **with `MockedProvider`** ```diff ({ data: { greeting: "Hello " + variables.greeting } }), + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + maxUsageCount: Number.POSITIVE_INFINITY, } ]} /> ``` ### Minor Changes - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow mocked responses passed to `MockLink` to accept a callback for the `delay` option. The `delay` callback will be given the current operation which can be used to determine what delay should be used for the mock. - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new `realisticDelay` helper function for use with the `delay` callback for mocked responses used with `MockLink`. `realisticDelay` will generate a random value between 20 and 50ms to provide an experience closer to unpredictable network latency. `realisticDelay` can be configured with a `min` and `max` to set different thresholds if the defaults are not sufficient. ```ts import { realisticDelay } from "@apollo/client/testing"; new MockLink([ { request: { query }, result: { data: { greeting: "Hello" } }, delay: realisticDelay(), }, { request: { query }, result: { data: { greeting: "Hello" } }, delay: realisticDelay({ min: 10, max: 100 }), }, ]); ``` - [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify a default `delay` for all mocked responses passed to `MockLink`. This `delay` can be configured globally (all instances of `MockLink` will use the global defaults), or per-instance (all mocks in a single instance will use the defaults). A `delay` defined on a single mock will supercede all default delays. Per-instance defaults supercede global defaults. **Global defaults** ```ts MockLink.defaultOptions = { // Use a default delay of 20ms for all mocks in all instances without a specified delay delay: 20, // altenatively use a callback which will be executed for each mock delay: () => getRandomNumber(), // or use the built-in `realisticDelay`. This is the default delay: realisticDelay(), }; ``` **Per-instance defaults** ```ts new MockLink( [ // Use the default delay { request: { query }, result: { data: { greeting: "Hello" } }, }, { request: { query }, result: { data: { greeting: "Hello" } }, // Override the default for this mock delay: 10, }, ], { defaultOptions: { // Use a default delay of 20ms for all mocks without a specified delay delay: 20, // altenatively use a callback which will be executed for each mock delay: () => getRandomNumber(), // or use the built-in `realisticDelay`. This is the default delay: realisticDelay(), }, } ); ``` ## 4.0.0-alpha.7 ### Major Changes - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/context` and `@apollo/client/react/hooks` entry points. Please use `@apollo/client/react` instead. - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/parser` entry point. There is no replacement. ### Patch Changes - [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `parser` cache. The functionality has been replaced in a way that doesn't need caching. ## 4.0.0-alpha.6 ### Major Changes - [#12485](https://github.com/apollographql/apollo-client/pull/12485) [`d338303`](https://github.com/apollographql/apollo-client/commit/d3383033d306b7d66e90f5f3170c24453cd76464) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error for queries and mutations if the link chain completes without emitting a value. - [#12484](https://github.com/apollographql/apollo-client/pull/12484) [`9a8b9ce`](https://github.com/apollographql/apollo-client/commit/9a8b9cebbcf290984a4f154f261a4090e636e50e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `loading`, `networkStatus`, and `partial` properties on all promise-based query APIs. These properties were mostly static and were unnecessary since promise resolution guaranteed that the query was not longer loading. This affects the following APIs: - `client.query` - `client.refetchQueries` - `client.reFetchObservableQueries` - `client.resetStore` - `observableQuery.fetchMore` - `observableQuery.refetch` - `observableQuery.reobserve` - `observableQuery.setVariables` - The `useLazyQuery` `execute` function ### Minor Changes - [#12497](https://github.com/apollographql/apollo-client/pull/12497) [`ff2cbe1`](https://github.com/apollographql/apollo-client/commit/ff2cbe1db1815c30f5fda7f6c07091663e065582) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `data` property to `CombinedGraphQLErrors` that captures any partial data returned by the GraphQL response when `errors` are also returned. - [#12488](https://github.com/apollographql/apollo-client/pull/12488) [`c98b633`](https://github.com/apollographql/apollo-client/commit/c98b6335de5b15e546aa5db79a8cf2dc9d914dcf) Thanks [@phryneas](https://github.com/phryneas)! - Add a new method for static SSR of React components, `prerenderStatic`. The old methods, `getDataFromTree`, `getMarkupFromTree` and `renderToStringWithData` have been deprecated in favor of `prerenderStatic`. If used with React 19 and the `prerender` or `prerenderToNodeStream` apis from `react-dom/static`, this method can now be used to SSR-prerender suspense-enabled hook APIs. ## 4.0.0-alpha.5 ### Major Changes - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `variables` from the result returned from `useSubscription`. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server. `useMutation` now also returns a `MutateResult` instead of a `FetchResult`. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback. - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error. - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open. When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead. ### Minor Changes - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - Split out SSR-specific code from useQuery hook, remove RenderPromises ### Patch Changes - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`). This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`. - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type. ## 4.0.0-alpha.4 ### Major Changes - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead. ```diff const observable = client.watchQuery(options); // Use reobserve to set new options and reevaluate the query - observable.setOptions(newOptions); + observable.reobserve(newOptions); ``` As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change. - [#12470](https://github.com/apollographql/apollo-client/pull/12470) [`d32902f`](https://github.com/apollographql/apollo-client/commit/d32902f26a4c5dea30421ee52aeea52df3e5334e) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked: Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery` while one of those were active would permanently be changed from a `fetchPolicy` of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way even long after `disableNetworkFetches` would have been deactivated. Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement at request time, just for that one request. `ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour. - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include: - `BaseMutationOptions` - `BaseQueryOptions` - `BaseSubscriptionOptions` - `ObservableQueryFields` - `MutationSharedOptions` - `QueryFunctionOptions` - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options. ### Patch Changes - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5. ## 4.0.0-alpha.3 ### Major Changes - [#12457](https://github.com/apollographql/apollo-client/pull/12457) [`32e85ea`](https://github.com/apollographql/apollo-client/commit/32e85ea9eb93c1ffb10d6f70e9e2775e1326e9aa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Network errors triggered by queries now adhere to the `errorPolicy`. This means that GraphQL errors and network errors now behave the same way. Previously promise-based APIs, such as `client.query`, would reject the promise with the network error even if `errorPolicy` was set to `ignore`. The promise is now resolved with the `error` property set to the network error instead. - [#12464](https://github.com/apollographql/apollo-client/pull/12464) [`0595f39`](https://github.com/apollographql/apollo-client/commit/0595f39deba52ac43fa0780b742564134ec7ab89) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `called` property from `useQuery`. ## 4.0.0-alpha.2 ### Major Changes - [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TSerialized` generic argument to `ApolloCache`. The `ApolloCache` base cache abstraction now returns `unknown` for `cache.extract` which can be overridden by a cache subclass. - [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TCacheShape` generic argument to `ApolloClient`. `client.extract()` now returns `unknown` by default. You will either need to type-cast this to the expected serialized shape, or use the `cache.extract()` directly from the subclass to get more specific types. - [#12446](https://github.com/apollographql/apollo-client/pull/12446) [`ab920d2`](https://github.com/apollographql/apollo-client/commit/ab920d2701aa276482dbc78b44a1c25c76467bc9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `defaultOptions` option from `useQuery`. Use options directly or use the global `ApolloClient` `defaultOptions`. - [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `canonizeResults` option. It was prone to memory leaks. As such, some results that were referentially equal when `canonizeResults` option was set to `true` no longer retain the same object identity. - [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `resetResultIdentities` option from `InMemoryCache.gc()`. This affected object canonization which has been removed. - [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `TData` generic type to `unknown` in all APIs that use a `TData` generic argument such as `useQuery`, `client.query`, etc. ### Patch Changes - [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default `TVariables` generic type to `OperationVariables` instead of `any` throughout the client in areas that did not yet have the default as such. - [#12454](https://github.com/apollographql/apollo-client/pull/12454) [`925548a`](https://github.com/apollographql/apollo-client/commit/925548a9baadb19b7bb78ee84c6f9e64b55c39e9) Thanks [@phryneas](https://github.com/phryneas)! - Fix up the 4.0 CommonJS build ## 4.0.0-alpha.1 ### Major Changes - [#12433](https://github.com/apollographql/apollo-client/pull/12433) [`b86e50b`](https://github.com/apollographql/apollo-client/commit/b86e50b1dc121cd67fe73655256b6c61afc18cb4) Thanks [@phryneas](https://github.com/phryneas)! - Remove workarounds for streaming with non-WhatWG response bodies to reduce bundle size. This removes support for `fetch` implementations that return Node Streams, Async Iterators or Blob instances as `Response.body`. In the WhatWG Fetch specification, [`Response.body`](https://fetch.spec.whatwg.org/#body) is specified as a WhatWG [ReadableStream](https://streams.spec.whatwg.org/#readablestream). At this point in time, this is natively supported in browsers, `node` and React Native (via [react-native-fetch-api](https://www.npmjs.com/package/react-native-fetch-api), see our [setup instructions for React Native](https://www.apollographql.com/docs/react/integrations/react-native#consuming-multipart-http-via-text-streaming)). If you are using an older `fetch` polyfill that deviates from the spec, this might not be compatible - for example, [node-fetch](https://github.com/node-fetch/node-fetch?tab=readme-ov-file#interface-body) returns a node `Readable` instead of a `ReadableStream`. In those cases, please switch to a compatible alternative such as the `node`-native `fetch`, or `undici`. ### Minor Changes - [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Drop `rehackt` dependency. We can now directly import from `react` without causing build errors in RSC. - [#12437](https://github.com/apollographql/apollo-client/pull/12437) [`4779dc7`](https://github.com/apollographql/apollo-client/commit/4779dc7badaba10d8c7a271eb0da6a079049b65d) Thanks [@phryneas](https://github.com/phryneas)! - Remove polyfills for Object.freeze,seal and preventExtensions in React Native These polyfills were only necessary until React Native 0.59, which [patched the problem](https://github.com/facebook/react-native/pull/21492) on the React Native side. With React Native 0.61, the `Map` function was [completely replaced](https://github.com/facebook/react-native/commit/93b9ac74e59bbe84ea388d7c1879857b4acab114) with a native implementation that never had the problems we guarded against. - [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Add `react-server` entry point with stubs for normal exports. ## 4.0.0-alpha.0 ### Major Changes - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `asyncMap` utility function. Instead use one of the RxJS operators that creates Observables from promises, such as `from`. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `isApolloError` utility function to check if the error object is an `ApolloError` instance. Use `instanceof` to check for more specific error types that replace `ApolloError`. - [#12379](https://github.com/apollographql/apollo-client/pull/12379) [`ef892b4`](https://github.com/apollographql/apollo-client/commit/ef892b4dc505b02049525f9aba32c51f1c00c922) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `addTypename` option from `InMemoryCache` and `MockedProvider`. `__typename` is now always added to the outgoing query document when using `InMemoryCache` and cannot be disabled. If you are using `` with `addTypename={false}`, ensure that your mocked responses include a `__typename` field. This will ensure cache normalization kicks in and behaves more like production. - [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `errors` property from `useQuery` and `useLazyQuery`. Read errors from the `error` property instead. - [#12222](https://github.com/apollographql/apollo-client/pull/12222) [`d1a9054`](https://github.com/apollographql/apollo-client/commit/d1a905461d4378522c3257de00afba2ae8decd22) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop support for React 16. - [#12376](https://github.com/apollographql/apollo-client/pull/12376) [`a0c996a`](https://github.com/apollographql/apollo-client/commit/a0c996a816fbb6a2323231c0422d1c8a3e20cbaf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `ignoreResults` option from `useMutation`. If you don't want to synchronize component state with the mutation, use `useApolloClient` to access your client instance and use `client.mutate` directly. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unusubscribing from `ObservableQuery` while a request is in flight will no longer terminate the request by unsubscribing from the link observable. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `previousData` property on `useLazyQuery` will now change only when `data` changes. Previously `previousData` would change to the same value as `data` while the query was loading. - [#12224](https://github.com/apollographql/apollo-client/pull/12224) [`51e6c0f`](https://github.com/apollographql/apollo-client/commit/51e6c0f8657d20cedc570c6e9a244f877047dd61) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `partialRefetch` option. - [#12407](https://github.com/apollographql/apollo-client/pull/12407) [`8b1390b`](https://github.com/apollographql/apollo-client/commit/8b1390bf0050c6bd4d5a32b67c3b96369d0552d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Calling `refetch` with new variables will now set the `networkStatus` to `refetch` instead of `setVariables`. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `iterateObserversSafely` utility function. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer wraps errors in `ApolloError`. `ApolloError` has been replaced with separate error classes depending on the cause of the error. As such, APIs that return an `error` property have been updated to use the generic `Error` type. Use `instanceof` to check for more specific error types. ## Migration guide `ApolloError` encapsulated 4 main error properties. The type of error would determine which property was set: - `graphqlErrors` - Errors returned from the `errors` field by the GraphQL server - `networkError` - Any non-GraphQL error that caused the query to fail - `protocolErrors` - Transport-level errors that occur during [multipart HTTP subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) - `clientErrors` - A space to define custom errors. Mostly unused. These errors were mutally exclusive, meaning both `networkError` and `graphqlErrors` were never set simultaneously. The following replaces each of these fields from `ApolloError`. ### `graphqlErrors` GraphQL errors are now encapsulated in a `CombinedGraphQLErrors` instance. You can access the raw GraphQL errors via the `errors` property. ```js import { CombinedGraphQLErrors } from "@apollo/client"; // ... const { error } = useQuery(query); if (error && error instanceof CombinedGraphQLErrors) { console.log(error.errors); } ``` ### `networkError` Network errors are no longer wrapped and are instead passed through directly. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { observer.error(new Error("Test error")); }); }), }); // ... const { error } = useQuery(query); // error is `new Error('Test error')`; ``` ### `protocolErrors` Protocol errors are now encapsulated in a `CombinedProtocolErrors` instance. You can access the raw protocol errors via the `errors` property. ```js import { CombinedProtocolErrors } from "@apollo/client"; // ... const { error } = useSubscription(subscription); if (error && error instanceof CombinedProtocolErrors) { console.log(error.errors); } ``` ### `clientErrors` These were unused by the client and have no replacement. Any non-GraphQL or non-protocol errors are now passed through unwrapped. ### Strings as errors If the link sends a string error, Apollo Client will wrap this in an `Error` instance. This ensures `error` properties are guaranteed to be of type `Error`. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { // Oops we sent a string instead of wrapping it in an `Error` observer.error("Test error"); }); }), }); // ... const { error } = useQuery(query); // The error string is wrapped and returned as `new Error('Test error')`; ``` ### Non-error types If the link chain sends any other object type as an error, Apollo Client will wrap this in an `UnknownError` instance with the [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) set to the original object. This ensures `error` properties are guaranteed to be of type `Error`. ```js const client = new ApolloClient({ link: new ApolloLink(() => { return new Observable((observer) => { observer.error({ message: "Not a proper error type" }); }); }), }); // ... const { error } = useQuery(query); // error is an `UnknownError` instance. error.cause returns the original object. ``` - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromError` utility function. Use [`throwError`](https://rxjs.dev/api/index/function/throwError) instead. - [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `graphql`, `withQuery`, `withMutation`, `withSubscription`, and `withApollo` hoc components. Use the provided React hooks instead. - [#12262](https://github.com/apollographql/apollo-client/pull/12262) [`10ef733`](https://github.com/apollographql/apollo-client/commit/10ef7338cdcbbaf75d806f426e9708c9e095c2da) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `itAsync` test utility. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Updates the `ServerError` and `ServerParseError` types to be proper `Error` subclasses. Perviously these were plain `Error` intances with additional properties added at runtime. All properties are retained, but `instanceof` checks now work correctly. ```js import { ServerError, ServerParseError } from "@apollo/client"; if (error instanceof ServerError) { // ... } if (error instanceof ServerParseError) { // ... } ``` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports SSR environments and will now throw if the `execute` function is called in SSR. If you need to run a query in an SSR environment, use `useQuery` instead. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The execute function returned from `useLazyQuery` now only supports the `context` and `variables` options. This means that passing options supported by the hook no longer override the hook value. To change options, rerender the component with new options. These options will take effect with the next query execution. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery` will no longer terminate on errors and will instead emit a `next` value with an `error` property. This ensures that `ObservableQuery` instances can continue to receive updates after errors are returned in requests without the need to resubscribe to the observable. - [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `throwServerError` utility function. Now that `ServerError` is an `Error` subclass, you can throw these errors directly: ```js import { ServerError } from "@apollo/client"; // instead of throwServerError(response, result, "error message"); // Use throw new ServerError("error message", { response, result }); ``` - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `Cache.DiffResult` type is now a union type with better type safety for both complete and partial results. Checking `diff.complete` will now narrow the type of `result` depending on whether the value is `true` or `false`. When `true`, `diff.result` will be a non-null value equal to the `T` generic type. When `false`, `diff.result` now reports `result` as `DeepPartial | null` indicating that fields in the result may be missing (`DeepPartial`) or empty entirely (`null`). - [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `errors` property from the results emitted from `ObservableQuery` or returned from `client.query`. Read errors from the `error` property instead. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The result resolved from the promise returned from the execute function in `useLazyQuery` is now an `ApolloQueryResult` type and no longer includes all the fields returned from the `useLazyQuery` hook tuple. If you need access to the additional properties such as `called`, `refetch`, etc. not included in `ApolloQueryResult`, read them from the hook instead. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will no longer rerender with the loading state when calling the execute function the first time unless the `notifyOnNetworkStatusChange` option is set to `true` (which is the new default). If you prefer the behavior from 3.x, rerender the component with `notifyOnNetworkStatusChange` set to `false` after the execute function is called the first time. ```ts function MyComponent() { const [notifyOnNetworkStatusChange, setNotifyOnNetworkStatusChange] = useState(true); const [execute] = useLazyQuery(query, { notifyOnNetworkStatusChange }); async function runExecute() { await execute(); // Set to false after the initial fetch to stop receiving notifications // about changes to the loading states. setNotifyOnNetworkStatusChange(false); } // ... } ``` - [#12254](https://github.com/apollographql/apollo-client/pull/12254) [`0028ac0`](https://github.com/apollographql/apollo-client/commit/0028ac0147aaea9ab559f15630200a132b43da42) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the default `Accept` header to `application/graphql-response+json`. - [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setVariables` will now resolve with the last emitted result instead of `undefined` when either the variables match the current variables or there are no subscribers to the query. - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client now defaults to production mode, not development mode, if the environment cannot be determined. In modern bundlers, this should automatically be handled by the bundler loading the bundler with the `development` export condition. If neither the `production` nor the `development` export condition are used by the bundler/runtime, Apollo Client will fall back to `globalThis.__DEV__` to determine if it should run in production or development mode. Unlike Apollo Client 3 though, if `globalThis.__DEV__` is not set to `true`, Apollo Client will now default to `production`, not to `development`, behaviour. This switch to _explicilty_ requiring `true` also resolves a situation where an HTML element with `id="__DEV__"` would create a global `__DEV__` variable with a referent to the DOM element, which in the past was picked up as "truthy" and would have triggered development mode. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `reobserve` option is no longer available in the result returned from `useLazyQuery`. This was considered an internal API and should not be used directly. - [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `data` property on `ApolloQueryResult`. Previously this field was non-optional, non-null `TData`, however at runtime this value could be set to `undefined`. This field is now reported as `TData | undefined`. This will affect you in a handful of places: - The `data` property emitted from the result passed to the `next` callback from `client.watchQuery` - Fetch-based APIs that return an `ApolloQueryResult` type such as `observableQuery.refetch`, `observableQuery.fetchMore`, etc. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The promise returned when calling the execute function from `useLazyQuery` will now reject when using an `errorPolicy` of `none` when GraphQL errors are returned from the result. - [#12223](https://github.com/apollographql/apollo-client/pull/12223) [`69c1cb6`](https://github.com/apollographql/apollo-client/commit/69c1cb6f831941598987185238a299b050a364bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `subscribeAndCount` testing utility from `@apollo/client/testing`. - [#12300](https://github.com/apollographql/apollo-client/pull/12300) [`4d581e4`](https://github.com/apollographql/apollo-client/commit/4d581e4f5a3c5409e5f06a5f164beabdada150f1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Moves all React-related exports to the `@apollo/client/react` entrypoint and out of the main `@apollo/client` entrypoint. This prevents the need to install React in order to use the core client. The following is a list of exports available in `@apollo/client` that should now import from `@apollo/client/react`. - `ApolloConsumer` - `ApolloProvider` - `createQueryPreloader` - `getApolloContext` - `skipToken` - `useApolloClient` - `useBackgroundQuery` - `useFragment` - `useLazyQuery` - `useLoadableQuery` - `useMutation` - `useQuery` - `useQueryRefHandlers` - `useReactiveVar` - `useReadQuery` - `useSubscription` - `useSuspenseQuery` The following is a list of exports available in `@apollo/client/testing` that should now import from `@apollo/client/testing/react`: - `MockedProvider` - [#12428](https://github.com/apollographql/apollo-client/pull/12428) [`abed922`](https://github.com/apollographql/apollo-client/commit/abed92225fd2a5d2a0a2298893a1170df1cd7400) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `urql` multipart subscriptions utilities. Use the native multipart subscriptions support in `urql` instead. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Switch to [RxJS](https://rxjs.dev/) as the observable implementation. `rxjs` is now a peer dependency of Apollo Client which means you will now need to install `rxjs` in addition to `@apollo/client`. This change is mostly transparent, however transforming values on observables, common in link implementations, differs in RxJS vs `zen-observable`. For example, you could modify values in the link chain emitted from a downstream link by using the `.map` function. In RxJS, this is done with the `.pipe` function and passing a `map` operator instead. ```ts import { map } from "rxjs"; const link new ApolloLink((operation, forward) => { return forward(operation).pipe( map((result) => performTransform(result)) ); }); ``` For a full list of operators and comprehensive documentation on the capabilities of RxJS, check out the [documentation](https://rxjs.dev/). - [#12329](https://github.com/apollographql/apollo-client/pull/12329) [`61febe4`](https://github.com/apollographql/apollo-client/commit/61febe4ef8712a2035d7ac89ea7283138db5229d) Thanks [@phryneas](https://github.com/phryneas)! - Rework package publish format (#12329, #12382) We have reworked the way Apollo Client is packaged. - shipping ESM and CJS - fixing up source maps - the build targets a modern runtime environment (browserslist query: `"since 2023, node >= 20, not dead"`) - removed the "proxy directory" `package.json` files, e.g. `cache/core/package.json` and `react/package.json`. While these helped with older build tools, modern build tooling uses the `exports` field in the root `package.json` instead and the presence of these files can confuse modern build tooling. If your build tooling still relies on those, please update your imports to import from e.g. `@apollo/client/cache/core/index.js` instead of `@apollo/client/cache/core` - but generally, this should not be necessary. - added an `exports` field to `package.json` to expose entry points - instead of `globalThis.__DEV__`, Apollo Client now primarily relies on the `development` and `production` exports conditions. It falls back to `globalThis.__DEV__` if the bundler doesn't know these, though. - [#12397](https://github.com/apollographql/apollo-client/pull/12397) [`2545a54`](https://github.com/apollographql/apollo-client/commit/2545a5415b06283be83eb9c4a03a3a8a39b8bcde) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `ObservableQuery.resetQueryStoreErrors` method. This method reset some internal state that was not consumed elsewhere in the client and resulted in a no-op. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromPromise` utility function. Use [`from`](https://rxjs.dev/api/index/function/from) instead. - [#12388](https://github.com/apollographql/apollo-client/pull/12388) [`0d825be`](https://github.com/apollographql/apollo-client/commit/0d825bef533b41f2e99ef22e620d9f9472825057) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require environments that support `WeakMap`, `WeakSet` and symbols. Apollo Client would fallback to `Map` and `Set` if the weak versions were not available. This has been removed and expects that these features are available in the source environment. If you are running in an environment without `WeakMap`, `WeakSet` or symbols, you will need to find appropriate polyfills. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports calling the execute function in render and will now throw. If you need to execute the query immediately, use `useQuery` instead or move the call to a `useEffect`. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `defaultOptions` and `initialFetchPolicy` options are no longer supported with `useLazyQuery`. If you use `defaultOptions`, pass those options directly to the hook instead. If you use `initialFetchPolicy`, use `fetchPolicy` instead. - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports `variables` in the hook options and therefore no longer performs variable merging. The execute function must now be called with `variables` instead. ```ts function MyComponent() { const [execute] = useLazyQuery(query); function runExecute() { execute({ variables: { ... }}); } } ``` This change means the execute function returned from `useLazyQuery` is more type-safe. The execute function will require you to pass a `variables` option if the query type includes required variables. - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` `cache.diff` now returns `null` instead of an empty object (`{}`) when `returnPartialData` is `true` and the result is empty. If you use `cache.diff` directly with `returnPartialData: true`, you will need to check for `null` before accessing any other fields on the `result` property. A non-null value indicates that at least one field was present in the cache for the given query document. ### Changes for third-party cache implementations The client now expects `cache.diff` to return `null` instead of an empty object when there is no data that can be fulfilled from the cache and `returnPartialData` is `true`. If your cache implementation returns an empty object, please update this to return `null`. - [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes `ObservableQuery.result()` method. If you use this method and need similar functionality, use the `firstValueFrom` helper in RxJS. ```ts import { firstValueFrom, from } from "rxjs"; // The `from` is necessary to turn `observableQuery` into an RxJS observable const result = await firstValueFrom(from(observableQuery)); ``` - [#12359](https://github.com/apollographql/apollo-client/pull/12359) [`ebb4d96`](https://github.com/apollographql/apollo-client/commit/ebb4d9644104244fb066b93a32df778928f2f8a9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onCompleted` and `onError` callbacks from `useQuery` and `useLazyQuery`. See [#12352](https://github.com/apollographql/apollo-client/issues/12352) for more context on this change. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions are no longer eagerly started after calling `client.subscribe`. To kick off the subscription, you will now need to subscribe to the returned observable. ```ts // Subscriptions are no longer started when calling subscribe on its own. const subscriptionObservable = client.subscribe(...); // Instead, subscribe to the returned observable to kick off the subscription. subscriptionObservable.subscribe({ next: (value) => console.log(value) }); ``` - [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will now only execute the query when the execute function is called. Previously `useLazyQuery` would behave like `useQuery` after the first call to the execute function which means changes to options might perform network requests. You can now safely rerender `useLazyQuery` with new options which will take effect the next time you manually trigger the query. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `toPromise` utility function. Use [`firstValueFrom`](https://rxjs.dev/api/index/function/firstValueFrom) instead. - [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` `cache.diff` no longer throws when `returnPartialData` is set to `false` without a complete result. Instead, `cache.diff` will return `null` when it is unable to read a full cache result. If you use `cache.diff` directly with `returnPartialData: false`, remove the `try`/`catch` block and replace with a check for `null`. ### Changes for third-party cache implementations The client now expects `cache.diff` to return `null` instead of throwing when the cache returns an incomplete result and `returnPartialData` is `false`. The internal `try`/`catch` blocks have been removed around `cache.diff`. If your cache implementation throws for incomplete results, please update this to return `null`. - [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `Query`, `Mutation`, and `Subscription` components. Use the provided React hooks instead. ### Minor Changes - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client is no longer using `ts-invariant`, but ships with a modified variant of it. The existing export `setLogVerbosity` from `@apollo/client` is still available and now points to this new integration. **In most cases, you should be using this export.** It will no longer adjust the verbosity of `ts-invariant` and as such no longer influence other packages relying on `ts-invariant`. The new entry point `@apollo/client/utilities/invariant` now exports `invariant`, `InvariantError` and `setVerbosity`. (Note that these tools are mostly meant to be used by Apollo Client and libraries directly based on Apollo Client like the `@apollo/client-integration-*` packages.) - [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecate the `partial` flag on `ApolloQueryResult` and make it a non-optional property. Previously `partial` was only set conditionally if the result emitted was partial. This value is now available with all results that return an `ApolloQueryResult`. ### Patch Changes - [#12291](https://github.com/apollographql/apollo-client/pull/12291) [`ae5d06a`](https://github.com/apollographql/apollo-client/commit/ae5d06ac45ca6584d3c79aa417dae22f37a7d3b6) Thanks [@phryneas](https://github.com/phryneas)! - Remove deprecated `resetApolloContext` export - [#12402](https://github.com/apollographql/apollo-client/pull/12402) [`903c3ef`](https://github.com/apollographql/apollo-client/commit/903c3ef9f77280492c298b4d8e5f96f110e3cda1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Use an an empty object (`{}`) rather than an object with `null` prototype (`Object.create(null)`) in all areas that instantiate objects. - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - \* dropped the deprecated `DEV` export from `@apollo/client/utilities` and `@apollo/client/utilities/globals` - moved the `__DEV__` export from `@apollo/client/utilities/globals` to `@apollo/client/utilities/environment` - moved the `invariant`, `newInvariantError` and `InvariantError` exports from `@apollo/client/utilities/globals` to `@apollo/client/utilities/invariant` - [#12432](https://github.com/apollographql/apollo-client/pull/12432) [`c7c2f61`](https://github.com/apollographql/apollo-client/commit/c7c2f6122c874eed16d5621be26992f86d9756eb) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery: implement the `rxjs` `InteropObservable` interface to ensure `from(observableQuery)` stays possible - [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - `@apollo/client`, `@apollo/client/core` and `@apollo/client/cache` no longer export an empty `Cache` runtime object. This is meant to be a type-only namespace. - [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't emit a partial cache result from `cache-only` queries when `returnPartialData` is `false`. ## 3.14.0 ### Minor Changes - [#12752](https://github.com/apollographql/apollo-client/pull/12752) [`8b779b4`](https://github.com/apollographql/apollo-client/commit/8b779b428b9dc9dad3e78f02bba6646ff415631d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0. - [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add warnings and deprecations for options and methods for all React APIs. - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@deprecated` tags to all properties returned from any query API (e.g. `client.query`, `observableQuery.refetch`, etc.), `client.mutate`, and `client.subscribe` that are no longer available in Apollo Client 4.0. - [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `preloadQuery.toPromise(queryRef)` as a replacement for `queryRef.toPromise()`. `queryRef.toPromise()` has been removed in Apollo Client 4.0 in favor of `preloadQuery.toPromise` and is now considered deprecated. - [#12736](https://github.com/apollographql/apollo-client/pull/12736) [`ea89440`](https://github.com/apollographql/apollo-client/commit/ea8944013278060ef87dfa4de6663a21b5204880) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and deprecation warnings for `ApolloClient` options and methods. - [#12763](https://github.com/apollographql/apollo-client/pull/12763) [`5de6a3d`](https://github.com/apollographql/apollo-client/commit/5de6a3d3189afa2a7c3bb2eb08d3c4394ae4a16d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. - [#12459](https://github.com/apollographql/apollo-client/pull/12459) [`1c5a031`](https://github.com/apollographql/apollo-client/commit/1c5a0313d388945aeda93b2c1992ad77f4416fa1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reset `addTypenameTransform` and `fragments` caches when calling `cache.gc()` only when `resetResultCache` is `true`. - [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `addTypename` in `InMemoryCache` and `MockedProvider`. - [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `canonizeResults`. - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `standby` fetch policy with `client.query`. ### Patch Changes - [#12750](https://github.com/apollographql/apollo-client/pull/12750) [`ecf3de1`](https://github.com/apollographql/apollo-client/commit/ecf3de1cc9a2cf3aaeba0c945909324b9e4b478a) Thanks [@phryneas](https://github.com/phryneas)! - Prevent field policies from overwriting/merging into supertype field policies. ## 3.14.0-rc.0 ### Minor Changes - [#12763](https://github.com/apollographql/apollo-client/pull/12763) [`5de6a3d`](https://github.com/apollographql/apollo-client/commit/5de6a3d3189afa2a7c3bb2eb08d3c4394ae4a16d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. ## 3.14.0-alpha.1 ### Minor Changes - [#12752](https://github.com/apollographql/apollo-client/pull/12752) [`8b779b4`](https://github.com/apollographql/apollo-client/commit/8b779b428b9dc9dad3e78f02bba6646ff415631d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0. - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@deprecated` tags to all properties returned from any query API (e.g. `client.query`, `observableQuery.refetch`, etc.), `client.mutate`, and `client.subscribe` that are no longer available in Apollo Client 4.0. - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `standby` fetch policy with `client.query`. ## 3.14.0-alpha.0 ### Minor Changes - [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add warnings and deprecations for options and methods for all React APIs. - [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `preloadQuery.toPromise(queryRef)` as a replacement for `queryRef.toPromise()`. `queryRef.toPromise()` has been removed in Apollo Client 4.0 in favor of `preloadQuery.toPromise` and is now considered deprecated. - [#12736](https://github.com/apollographql/apollo-client/pull/12736) [`ea89440`](https://github.com/apollographql/apollo-client/commit/ea8944013278060ef87dfa4de6663a21b5204880) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and deprecation warnings for `ApolloClient` options and methods. - [#12459](https://github.com/apollographql/apollo-client/pull/12459) [`1c5a031`](https://github.com/apollographql/apollo-client/commit/1c5a0313d388945aeda93b2c1992ad77f4416fa1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reset `addTypenameTransform` and `fragments` caches when calling `cache.gc()` only when `resetResultCache` is `true`. - [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `addTypename` in `InMemoryCache` and `MockedProvider`. - [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `canonizeResults`. ### Patch Changes - [#12750](https://github.com/apollographql/apollo-client/pull/12750) [`ecf3de1`](https://github.com/apollographql/apollo-client/commit/ecf3de1cc9a2cf3aaeba0c945909324b9e4b478a) Thanks [@phryneas](https://github.com/phryneas)! - Prevent field policies from overwriting/merging into supertype field policies. ## 3.13.9 ### Patch Changes - [#12804](https://github.com/apollographql/apollo-client/pull/12804) [`32c9aa9`](https://github.com/apollographql/apollo-client/commit/32c9aa9215fab72e9ab68ee71198ce242157f855) Thanks [@phryneas](https://github.com/phryneas)! - Fix a possible race condition on queries that were reobserved before they were subscribed to the first time. ## 3.13.8 ### Patch Changes - [#12567](https://github.com/apollographql/apollo-client/pull/12567) [`c19d415`](https://github.com/apollographql/apollo-client/commit/c19d41513cac0cc143aa7358f26c89c9408da102) Thanks [@thearchitector](https://github.com/thearchitector)! - Fix in-flight multipart urql subscription cancellation ## 3.13.7 ### Patch Changes - [#12540](https://github.com/apollographql/apollo-client/pull/12540) [`0098932`](https://github.com/apollographql/apollo-client/commit/009893220934081f6e5733bff5863c768a597117) Thanks [@phryneas](https://github.com/phryneas)! - Refactor: Move notification scheduling logic from `QueryInfo` to `ObservableQuery` - [#12540](https://github.com/apollographql/apollo-client/pull/12540) [`0098932`](https://github.com/apollographql/apollo-client/commit/009893220934081f6e5733bff5863c768a597117) Thanks [@phryneas](https://github.com/phryneas)! - Refactored cache emit logic for ObservableQuery. This should be an invisible change. ## 3.13.6 ### Patch Changes - [#12285](https://github.com/apollographql/apollo-client/pull/12285) [`cdc55ff`](https://github.com/apollographql/apollo-client/commit/cdc55ff54bf4c83ec8571508ec4bf8156af1bc97) Thanks [@phryneas](https://github.com/phryneas)! - keep ObservableQuery created by useQuery non-active before it is first subscribed ## 3.13.5 ### Patch Changes - [#12461](https://github.com/apollographql/apollo-client/pull/12461) [`12c8d06`](https://github.com/apollographql/apollo-client/commit/12c8d06f1ef7cfbece8e3a63b7ad09d91334f663) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a `cache-first` query would return the result for previous variables when a cache update is issued after simultaneously changing variables and skipping the query. ## 3.13.4 ### Patch Changes - [#12420](https://github.com/apollographql/apollo-client/pull/12420) [`fee9368`](https://github.com/apollographql/apollo-client/commit/fee9368750e242ea03dea8d1557683506d411d8d) Thanks [@jorenbroekema](https://github.com/jorenbroekema)! - Use import star from `rehackt` to prevent issues with importing named exports from external CJS modules. ## 3.13.3 ### Patch Changes - [#12362](https://github.com/apollographql/apollo-client/pull/12362) [`f6d387c`](https://github.com/apollographql/apollo-client/commit/f6d387c166cc76f08135966fb6d74fd8fe808c21) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where calling `observableQuery.getCurrentResult()` when the `errorPolicy` was set to `all` would return the `networkStatus` as `NetworkStatus.ready` when there were errors returned in the result. This has been corrected to report `NetworkStatus.error`. This bug also affected the `useQuery` and `useLazyQuery` hooks and may affect you if you check for `networkStatus` in your component. ## 3.13.2 ### Patch Changes - [#12409](https://github.com/apollographql/apollo-client/pull/12409) [`6aa2f3e`](https://github.com/apollographql/apollo-client/commit/6aa2f3e81ee0ae59da7ae0b12000bb5a55ec5c6d) Thanks [@phryneas](https://github.com/phryneas)! - To mitigate problems when Apollo Client ends up more than once in the bundle, some unique symbols were converted into `Symbol.for` calls. - [#12392](https://github.com/apollographql/apollo-client/pull/12392) [`644bb26`](https://github.com/apollographql/apollo-client/commit/644bb2662168a9bac0519be6979f0db38b0febc4) Thanks [@Joja81](https://github.com/Joja81)! - Fixes an issue where the DeepOmit type would turn optional properties into required properties. This should only affect you if you were using the omitDeep or stripTypename utilities exported by Apollo Client. - [#12404](https://github.com/apollographql/apollo-client/pull/12404) [`4332b88`](https://github.com/apollographql/apollo-client/commit/4332b886f0409145af57f26d334f86e5a1b465c5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Show `NaN` rather than converting to `null` in debug messages from `MockLink` for unmatched `variables` values. ## 3.13.1 ### Patch Changes - [#12369](https://github.com/apollographql/apollo-client/pull/12369) [`bdfc5b2`](https://github.com/apollographql/apollo-client/commit/bdfc5b2e386ed5f835716a542de0cf17da37f7fc) Thanks [@phryneas](https://github.com/phryneas)! - `ObervableQuery.refetch`: don't refetch with `cache-and-network`, swich to `network-only` instead - [#12375](https://github.com/apollographql/apollo-client/pull/12375) [`d3f8f13`](https://github.com/apollographql/apollo-client/commit/d3f8f130718ef50531ca0079192c2672a513814a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export the `UseSuspenseFragmentOptions` type. ## 3.13.0 ### Minor Changes - [#12066](https://github.com/apollographql/apollo-client/pull/12066) [`c01da5d`](https://github.com/apollographql/apollo-client/commit/c01da5da639d4d9e882d380573b7876df4a1d65b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adds a new `useSuspenseFragment` hook. `useSuspenseFragment` suspends until `data` is complete. It is a drop-in replacement for `useFragment` when you prefer to use Suspense to control the loading state of a fragment. See the [documentation](https://www.apollographql.com/docs/react/data/fragments#usesuspensefragment) for more details. - [#12174](https://github.com/apollographql/apollo-client/pull/12174) [`ba5cc33`](https://github.com/apollographql/apollo-client/commit/ba5cc330f8734a989eef71e883861f848388ac0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure errors thrown in the `onCompleted` callback from `useMutation` don't call `onError`. - [#12340](https://github.com/apollographql/apollo-client/pull/12340) [`716d02e`](https://github.com/apollographql/apollo-client/commit/716d02ec9c5b1448f50cb50a0306a345310a2342) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate the `onCompleted` and `onError` callbacks of `useQuery` and `useLazyQuery`. For more context, please see the [related issue](https://github.com/apollographql/apollo-client/issues/12352) on GitHub. - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Provide a more type-safe option for the previous data value passed to `observableQuery.updateQuery`. Using it could result in crashes at runtime as this callback could be called with partial data even though its type reported the value as a complete result. The `updateQuery` callback function is now called with a new type-safe `previousData` property and a new `complete` property in the 2nd argument that determines whether `previousData` is a complete or partial result. As a result of this change, it is recommended to use the `previousData` property passed to the 2nd argument of the callback rather than using the previous data value from the first argument since that value is not type-safe. The first argument is now deprecated and will be removed in a future version of Apollo Client. ```ts observableQuery.updateQuery( (unsafePreviousData, { previousData, complete }) => { previousData; // ^? TData | DeepPartial | undefined if (complete) { previousData; // ^? TData } else { previousData; // ^? DeepPartial | undefined } } ); ``` - [#12174](https://github.com/apollographql/apollo-client/pull/12174) [`ba5cc33`](https://github.com/apollographql/apollo-client/commit/ba5cc330f8734a989eef71e883861f848388ac0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reject the mutation promise if errors are thrown in the `onCompleted` callback of `useMutation`. ### Patch Changes - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Fix the return type of the `updateQuery` function to allow for `undefined`. `updateQuery` had the ability to bail out of the update by returning a falsey value, but the return type enforced a query value. ```ts observableQuery.updateQuery( (unsafePreviousData, { previousData, complete }) => { if (!complete) { // Bail out of the update by returning early return; } // ... } ); ``` - [#12296](https://github.com/apollographql/apollo-client/pull/12296) [`2422df2`](https://github.com/apollographql/apollo-client/commit/2422df202a7ec71365d5a8ab5b3b554fcf60e4af) Thanks [@Cellule](https://github.com/Cellule)! - Deprecate option `ignoreResults` in `useMutation`. Once this option is removed, existing code still using it might see increase in re-renders. If you don't want to synchronize your component state with the mutation, please use `useApolloClient` to get your ApolloClient instance and call `client.mutate` directly. - [#12338](https://github.com/apollographql/apollo-client/pull/12338) [`67c16c9`](https://github.com/apollographql/apollo-client/commit/67c16c93897e36be980ba2139ee8bd3f24ab8558) Thanks [@phryneas](https://github.com/phryneas)! - In case of a multipart response (e.g. with `@defer`), query deduplication will now keep going until the final chunk has been received. - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Fix the type of the `variables` property passed as the 2nd argument to the `subscribeToMore` callback. This was previously reported as the `variables` type for the subscription itself, but is now properly typed as the query `variables`. ## 3.13.0-rc.0 ### Minor Changes - [#12066](https://github.com/apollographql/apollo-client/pull/12066) [`c01da5d`](https://github.com/apollographql/apollo-client/commit/c01da5da639d4d9e882d380573b7876df4a1d65b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adds a new `useSuspenseFragment` hook. `useSuspenseFragment` suspends until `data` is complete. It is a drop-in replacement for `useFragment` when you prefer to use Suspense to control the loading state of a fragment. - [#12174](https://github.com/apollographql/apollo-client/pull/12174) [`ba5cc33`](https://github.com/apollographql/apollo-client/commit/ba5cc330f8734a989eef71e883861f848388ac0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure errors thrown in the `onCompleted` callback from `useMutation` don't call `onError`. - [#12340](https://github.com/apollographql/apollo-client/pull/12340) [`716d02e`](https://github.com/apollographql/apollo-client/commit/716d02ec9c5b1448f50cb50a0306a345310a2342) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate the `onCompleted` and `onError` callbacks of `useQuery` and `useLazyQuery`. For more context, please see the [related issue](https://github.com/apollographql/apollo-client/issues/12352) on GitHub. - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Provide a more type-safe option for the previous data value passed to `observableQuery.updateQuery`. Using it could result in crashes at runtime as this callback could be called with partial data even though its type reported the value as a complete result. The `updateQuery` callback function is now called with a new type-safe `previousData` property and a new `complete` property in the 2nd argument that determines whether `previousData` is a complete or partial result. As a result of this change, it is recommended to use the `previousData` property passed to the 2nd argument of the callback rather than using the previous data value from the first argument since that value is not type-safe. The first argument is now deprecated and will be removed in a future version of Apollo Client. ```ts observableQuery.updateQuery( (unsafePreviousData, { previousData, complete }) => { previousData; // ^? TData | DeepPartial | undefined if (complete) { previousData; // ^? TData } else { previousData; // ^? DeepPartial | undefined } } ); ``` - [#12174](https://github.com/apollographql/apollo-client/pull/12174) [`ba5cc33`](https://github.com/apollographql/apollo-client/commit/ba5cc330f8734a989eef71e883861f848388ac0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reject the mutation promise if errors are thrown in the `onCompleted` callback of `useMutation`. ### Patch Changes - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Fix the return type of the `updateQuery` function to allow for `undefined`. `updateQuery` had the ability to bail out of the update by returning a falsey value, but the return type enforced a query value. ```ts observableQuery.updateQuery( (unsafePreviousData, { previousData, complete }) => { if (!complete) { // Bail out of the update by returning early return; } // ... } ); ``` - [#12296](https://github.com/apollographql/apollo-client/pull/12296) [`2422df2`](https://github.com/apollographql/apollo-client/commit/2422df202a7ec71365d5a8ab5b3b554fcf60e4af) Thanks [@Cellule](https://github.com/Cellule)! - Deprecate option `ignoreResults` in `useMutation`. Once this option is removed, existing code still using it might see increase in re-renders. If you don't want to synchronize your component state with the mutation, please use `useApolloClient` to get your ApolloClient instance and call `client.mutate` directly. - [#12338](https://github.com/apollographql/apollo-client/pull/12338) [`67c16c9`](https://github.com/apollographql/apollo-client/commit/67c16c93897e36be980ba2139ee8bd3f24ab8558) Thanks [@phryneas](https://github.com/phryneas)! - In case of a multipart response (e.g. with `@defer`), query deduplication will now keep going until the final chunk has been received. - [#12276](https://github.com/apollographql/apollo-client/pull/12276) [`670f112`](https://github.com/apollographql/apollo-client/commit/670f112a7d9d85cb357eb279a488ac2c6d0137a9) Thanks [@Cellule](https://github.com/Cellule)! - Fix the type of the `variables` property passed as the 2nd argument to the `subscribeToMore` `updateQuery` callback. This was previously reported as the `variables` type for the subscription itself, but is now properly typed as the query `variables`. ## 3.12.11 ### Patch Changes - [#12351](https://github.com/apollographql/apollo-client/pull/12351) [`3da908b`](https://github.com/apollographql/apollo-client/commit/3da908b1dde73847805a41c287a83700b2b88887) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where the wrong `networkStatus` and `loading` value was emitted from `observableQuery` when calling `fetchMore` with a `no-cache` fetch policy. The `networkStatus` now properly reports as `ready` and `loading` as `false` after the result is returned. - [#12354](https://github.com/apollographql/apollo-client/pull/12354) [`a24ef94`](https://github.com/apollographql/apollo-client/commit/a24ef9474f8f7a864f8b866563f8f7e661d2533f) Thanks [@phryneas](https://github.com/phryneas)! - Fix missing `main.d.cts` file ## 3.12.10 ### Patch Changes - [#12341](https://github.com/apollographql/apollo-client/pull/12341) [`f2bb0b9`](https://github.com/apollographql/apollo-client/commit/f2bb0b9955564e432345ee8bd431290e698d092c) Thanks [@phryneas](https://github.com/phryneas)! - `useReadQuery`/`useQueryRefHandlers`: Fix a "hook order" warning that might be emitted in React 19 dev mode. - [#12342](https://github.com/apollographql/apollo-client/pull/12342) [`219b26b`](https://github.com/apollographql/apollo-client/commit/219b26ba5a697981ad700e05b926d42db0fb8e59) Thanks [@phryneas](https://github.com/phryneas)! - Add `graphql-ws` `^6.0.3` as a valid `peerDependency` ## 3.12.9 ### Patch Changes - [#12321](https://github.com/apollographql/apollo-client/pull/12321) [`daa4f33`](https://github.com/apollographql/apollo-client/commit/daa4f3303cfb81e8dca66c21ce3f3dc24946cafb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `extensions` in `protocolErrors` for `ApolloError` and the `onError` link. According to the [multipart HTTP subscription protocol](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol), fatal tranport errors follow the [GraphQL error format](https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format) which require `extensions` to be a map as its value instead of an array. - [#12318](https://github.com/apollographql/apollo-client/pull/12318) [`b17968b`](https://github.com/apollographql/apollo-client/commit/b17968b61f0e35b1ba20d081dacee66af8225491) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `RetryLink` to retry an operation when fatal [transport-level errors](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol#message-and-error-format) are emitted from multipart subscriptions. ```js const retryLink = new RetryLink({ attempts: (count, operation, error) => { if (error instanceof ApolloError) { // errors available on the `protocolErrors` field in `ApolloError` console.log(error.protocolErrors); } return true; }, }); ``` ## 3.12.8 ### Patch Changes - [#12292](https://github.com/apollographql/apollo-client/pull/12292) [`3abd944`](https://github.com/apollographql/apollo-client/commit/3abd944e4adde5d94d91133f2bf6ed1c7744f8c5) Thanks [@phryneas](https://github.com/phryneas)! - Remove unused dependency `response-iterator` - [#12287](https://github.com/apollographql/apollo-client/pull/12287) [`bf313a3`](https://github.com/apollographql/apollo-client/commit/bf313a39d342a73dc3e9b3db9415c71c2573db3f) Thanks [@phryneas](https://github.com/phryneas)! - Fixes an issue where `client.watchFragment`/`useFragment` with `@includes` crashes when a separate cache update writes to the conditionally included fields. ## 3.12.7 ### Patch Changes - [#12281](https://github.com/apollographql/apollo-client/pull/12281) [`d638ec3`](https://github.com/apollographql/apollo-client/commit/d638ec317b7d21c2246251ef1b9d773588277b39) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Make fatal [tranport-level errors](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol#message-and-error-format) from multipart subscriptions available to the error link with the `protocolErrors` property. ```js const errorLink = onError(({ protocolErrors }) => { if (protocolErrors) { console.log(protocolErrors); } }); ``` - [#12281](https://github.com/apollographql/apollo-client/pull/12281) [`d638ec3`](https://github.com/apollographql/apollo-client/commit/d638ec317b7d21c2246251ef1b9d773588277b39) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the array type for the `errors` field on the `ApolloPayloadResult` type. This type was always in the shape of the GraphQL error format, per the [multipart subscriptions protocol](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol#message-and-error-format) and never a plain string or a JavaScript error object. ## 3.12.6 ### Patch Changes - [#12267](https://github.com/apollographql/apollo-client/pull/12267) [`d57429d`](https://github.com/apollographql/apollo-client/commit/d57429df336412bfdce5fc92b8299360c522d121) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Maintain the `TData` type when used with `Unmasked` when `TData` is not a masked type generated from GraphQL Codegen. - [#12270](https://github.com/apollographql/apollo-client/pull/12270) [`3601246`](https://github.com/apollographql/apollo-client/commit/3601246f6e7b4f8b2937e0d431e6b5a6964f9066) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix handling of tagged/branded primitive types when used as scalar values with `Unmasked`. ## 3.12.5 ### Patch Changes - [#12252](https://github.com/apollographql/apollo-client/pull/12252) [`cb9cd4e`](https://github.com/apollographql/apollo-client/commit/cb9cd4ea251aab225adf5e4e4f3f69e1bbacee52) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the default behavior of the `MaybeMasked` type to preserve types unless otherwise specified. This change makes it easier to upgrade from older versions of the client where types could have unexpectedly changed in the application due to the default of trying to unwrap types into unmasked types. This change also fixes the compilation performance regression experienced when simply upgrading the client since types are now preserved by default. A new `mode` option has now been introduced to allow for the old behavior. See the next section on migrating if you wish to maintain the old default behavior after upgrading to this version. ### Migrating from <= v3.12.4 If you've adopted data masking and have opted in to using masked types by setting the `enabled` property to `true`, you can remove this configuration entirely: ```diff -declare module "@apollo/client" { - interface DataMasking { - mode: "unmask" - } -} ``` If you prefer to specify the behavior explicitly, change the property from `enabled: true`, to `mode: "preserveTypes"`: ```diff declare module "@apollo/client" { interface DataMasking { - enabled: true + mode: "preserveTypes" } } ``` If you rely on the default behavior in 3.12.4 or below and would like to continue to use unmasked types by default, set the `mode` to `unmask`: ```ts declare module "@apollo/client" { interface DataMasking { mode: "unmask"; } } ``` ## 3.12.4 ### Patch Changes - [#12236](https://github.com/apollographql/apollo-client/pull/12236) [`4334d30`](https://github.com/apollographql/apollo-client/commit/4334d30cc3fbedb4f736eff196c49a9f20a46704) Thanks [@charpeni](https://github.com/charpeni)! - Fix an issue with `refetchQueries` where comparing `DocumentNode`s internally by references could lead to an unknown query, even though the `DocumentNode` was indeed an active query—with a different reference. ## 3.12.3 ### Patch Changes - [#12214](https://github.com/apollographql/apollo-client/pull/12214) [`8bfee88`](https://github.com/apollographql/apollo-client/commit/8bfee88102dd071ea5836f7267f30ca082671b2b) Thanks [@phryneas](https://github.com/phryneas)! - Data masking: prevent infinite recursion of `ContainsFragmentsRefs` type - [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix `Unmasked` unwrapping tuple types into an array of their subtypes. - [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `MaybeMasked` does not try and unwrap types that contain index signatures. - [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `MaybeMasked` does not try to unwrap the type as `Unmasked` if the type contains `any`. ## 3.12.2 ### Patch Changes - [#12175](https://github.com/apollographql/apollo-client/pull/12175) [`84af347`](https://github.com/apollographql/apollo-client/commit/84af347d53bc31df4a6a90a55e7c98413144376a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update peer deps to allow for React 19 stable release. ## 3.12.1 ### Patch Changes - [#12171](https://github.com/apollographql/apollo-client/pull/12171) [`e1efe74`](https://github.com/apollographql/apollo-client/commit/e1efe74c61b5f31fdd122ff8f4ce01012d0f5398) Thanks [@phryneas](https://github.com/phryneas)! - Fix import extension in masking entry point. ## 3.12.0 ### Minor Changes #### Data masking 🎭 - [#12042](https://github.com/apollographql/apollo-client/pull/12042) [`1c0ecbf`](https://github.com/apollographql/apollo-client/commit/1c0ecbf3c0454056853dd3dcb493dfd5fa1a96b1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces data masking in Apollo Client. Data masking enforces that only the fields requested by the query or fragment is available to that component. Data masking is best paired with [colocated fragments](https://www.apollographql.com/docs/react/data/fragments#colocating-fragments). To enable data masking in Apollo Client, set the `dataMasking` option to `true`. ```ts new ApolloClient({ dataMasking: true, // ... other options }); ``` For detailed information on data masking, including how to incrementally adopt it in an existing applications, see the [data masking documentation](https://www.apollographql.com/docs/react/data/fragments#data-masking). - [#12131](https://github.com/apollographql/apollo-client/pull/12131) [`21c3f08`](https://github.com/apollographql/apollo-client/commit/21c3f083013445707b7b50ae6390318bc568d0f5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `null` as a valid `from` value in `useFragment`.

More Patch Changes

- [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Maintain the existing document if its unchanged by the codemod and move to more naive whitespace formatting - [#12150](https://github.com/apollographql/apollo-client/pull/12150) [`9ed1e1e`](https://github.com/apollographql/apollo-client/commit/9ed1e1ef02b28445614fed4f5c141a289ac32d66) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue when using `Unmasked` with older versions of TypeScript when used with array fields. - [#12116](https://github.com/apollographql/apollo-client/pull/12116) [`8ae6e4e`](https://github.com/apollographql/apollo-client/commit/8ae6e4e5cec296c3910fdffb0ce51a0f5f06c5d3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent field accessor warnings when using `@unmask(mode: "migrate")` on objects that are passed into `cache.identify`. - [#12120](https://github.com/apollographql/apollo-client/pull/12120) [`6a98e76`](https://github.com/apollographql/apollo-client/commit/6a98e76af5c800a91a748c498611b55c33e02c68) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide a codemod that applies `@unmask` to all named fragments for all operations and fragments. Learn how to use the codemod in the [incremental adoption documentation](https://www.apollographql.com/docs/react/data/fragments#incremental-adoption-in-an-existing-application). - [#12134](https://github.com/apollographql/apollo-client/pull/12134) [`cfaf4ef`](https://github.com/apollographql/apollo-client/commit/cfaf4efc6dea56ae46a5b5199d8ed9414b0f17d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where data went missing when an unmasked fragment in migrate mode selected fields that the parent did not. - [#12154](https://github.com/apollographql/apollo-client/pull/12154) [`d933def`](https://github.com/apollographql/apollo-client/commit/d933def986d476cd64321059299ab15031297f04) Thanks [@phryneas](https://github.com/phryneas)! - Data masking types: handle overlapping nested array types and fragments on interface types. - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where masked data would sometimes get returned when the field was part of a child fragment from a fragment unmasked by the parent query. - [#12123](https://github.com/apollographql/apollo-client/pull/12123) [`8422a30`](https://github.com/apollographql/apollo-client/commit/8422a305eff861fc8f953731e92c860f555bd99a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using data masking with "no-cache" operations. - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where the warning emitted by `@unmask(mode: "migrate")` would trigger unnecessarily when the fragment was used alongside a masked fragment inside an inline fragment. - [#12114](https://github.com/apollographql/apollo-client/pull/12114) [`1d4ce00`](https://github.com/apollographql/apollo-client/commit/1d4ce0034395147445165022f7d23f42ff638d8a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error when combining `@unmask` and `@defer` directives on a fragment spread when data masking is enabled. - [#12130](https://github.com/apollographql/apollo-client/pull/12130) [`1e7d009`](https://github.com/apollographql/apollo-client/commit/1e7d009e4a52949dab0065f3219dfe148837531e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error thrown when applying unmask migrate mode warnings on interface types with selection sets that contain inline fragment conditions. - [#12152](https://github.com/apollographql/apollo-client/pull/12152) [`78137ec`](https://github.com/apollographql/apollo-client/commit/78137eccba90b80dd29bd8e1423b49ebe51ef8df) Thanks [@phryneas](https://github.com/phryneas)! - Add a helper that will skip the TS unmasking alorithm when no fragments are present on type level - [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure documents unchanged by the codemod are left untouched. - [#12133](https://github.com/apollographql/apollo-client/pull/12133) [`a6ece37`](https://github.com/apollographql/apollo-client/commit/a6ece375119ce12c19749471c55b0059843a7217) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `null` is retained in nullable types when unmasking a type with the `Unmasked` helper type. - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue that threw errors when masking partial data with `@unmask(mode: "migrate")`.
## 3.12.0-rc.4 ### Patch Changes - [#12154](https://github.com/apollographql/apollo-client/pull/12154) [`d933def`](https://github.com/apollographql/apollo-client/commit/d933def986d476cd64321059299ab15031297f04) Thanks [@phryneas](https://github.com/phryneas)! - Data masking types: handle overlapping nested array types and fragments on interface types. ## 3.12.0-rc.3 ### Patch Changes - [#12150](https://github.com/apollographql/apollo-client/pull/12150) [`9ed1e1e`](https://github.com/apollographql/apollo-client/commit/9ed1e1ef02b28445614fed4f5c141a289ac32d66) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue when using `Unmasked` with older versions of TypeScript when used with array fields. - [#12152](https://github.com/apollographql/apollo-client/pull/12152) [`78137ec`](https://github.com/apollographql/apollo-client/commit/78137eccba90b80dd29bd8e1423b49ebe51ef8df) Thanks [@phryneas](https://github.com/phryneas)! - Add a helper that will skip the TS unmasking alorithm when no fragments are present on type level ## 3.12.0-rc.2 ### Patch Changes - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where masked data would sometimes get returned when the field was part of a child fragment from a fragment unmasked by the parent query. - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where the warning emitted by `@unmask(mode: "migrate")` would trigger unnecessarily when the fragment was used alongside a masked fragment inside an inline fragment. - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue that threw errors when masking partial data with `@unmask(mode: "migrate")`. ## 3.12.0-rc.1 ### Minor Changes - [#12131](https://github.com/apollographql/apollo-client/pull/12131) [`21c3f08`](https://github.com/apollographql/apollo-client/commit/21c3f083013445707b7b50ae6390318bc568d0f5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `null` as a valid `from` value in `useFragment`. ### Patch Changes - [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Maintain the existing document if its unchanged by the codemod and move to more naive whitespace formatting - [#12134](https://github.com/apollographql/apollo-client/pull/12134) [`cfaf4ef`](https://github.com/apollographql/apollo-client/commit/cfaf4efc6dea56ae46a5b5199d8ed9414b0f17d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where data went missing when an unmasked fragment in migrate mode selected fields that the parent did not. - [#12130](https://github.com/apollographql/apollo-client/pull/12130) [`1e7d009`](https://github.com/apollographql/apollo-client/commit/1e7d009e4a52949dab0065f3219dfe148837531e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error thrown when applying unmask migrate mode warnings on interface types with selection sets that contain inline fragment conditions. - [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure documents unchanged by the codemod are left untouched. - [#12133](https://github.com/apollographql/apollo-client/pull/12133) [`a6ece37`](https://github.com/apollographql/apollo-client/commit/a6ece375119ce12c19749471c55b0059843a7217) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `null` is retained in nullable types when unmasking a type with the `Unmasked` helper type. ## 3.12.0-rc.0 ### Patch Changes - [#12116](https://github.com/apollographql/apollo-client/pull/12116) [`8ae6e4e`](https://github.com/apollographql/apollo-client/commit/8ae6e4e5cec296c3910fdffb0ce51a0f5f06c5d3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent field accessor warnings when using `@unmask(mode: "migrate")` on objects that are passed into `cache.identify`. - [#12120](https://github.com/apollographql/apollo-client/pull/12120) [`6a98e76`](https://github.com/apollographql/apollo-client/commit/6a98e76af5c800a91a748c498611b55c33e02c68) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide a codemod that applies `@unmask` to all named fragments for all operations and fragments. To use the codemod, run the following command: ``` npx jscodeshift -t node_modules/@apollo/client/scripts/codemods/data-masking/unmask.ts --extensions tsx --parser tsx path/to/app/ ``` To customize the tag used to search for GraphQL operations, use the `--tag` option. By default the codemod looks for `gql` and `graphql` tags. To apply the directive in migrate mode in order to receive runtime warnings on potentially masked fields, use the `--mode migrate` option. For more information on the options that can be used with `jscodeshift`, check out the [`jscodeshift` documentation](https://github.com/facebook/jscodeshift). - [#12121](https://github.com/apollographql/apollo-client/pull/12121) [`1085a95`](https://github.com/apollographql/apollo-client/commit/1085a95e4430da35d19033613e73f315a0aede9e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using data masking with "no-cache" operations. - [#12114](https://github.com/apollographql/apollo-client/pull/12114) [`1d4ce00`](https://github.com/apollographql/apollo-client/commit/1d4ce0034395147445165022f7d23f42ff638d8a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error when combining `@unmask` and `@defer` directives on a fragment spread when data masking is enabled. ## 3.12.0-alpha.0 ### Minor Changes - [#12042](https://github.com/apollographql/apollo-client/pull/12042) [`1c0ecbf`](https://github.com/apollographql/apollo-client/commit/1c0ecbf3c0454056853dd3dcb493dfd5fa1a96b1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces data masking into Apollo Client. Data masking allows components to access only the data they asked for through GraphQL fragments. This prevents coupling between components that might otherwise implicitly rely on fields not requested by the component. Data masking also provides the benefit that masked fields only rerender components that ask for the field. To enable data masking in Apollo Client, set the `dataMasking` option to `true`. ```ts new ApolloClient({ dataMasking: true, // ... other options }); ``` You can selectively disable data masking using the `@unmask` directive. Apply this to any named fragment to receive all fields requested by the fragment. ```graphql query { user { id ...UserFields @unmask } } ``` To help with migration, use the `@unmask` migrate mode which will add warnings when accessing fields that would otherwise be masked. ```graphql query { user { id ...UserFields @unmask(mode: "migrate") } } ``` ## 3.11.10 ### Patch Changes - [#12093](https://github.com/apollographql/apollo-client/pull/12093) [`1765668`](https://github.com/apollographql/apollo-client/commit/1765668b7d495ef8a581f697bf9e4b7460455f13) Thanks [@mgmolisani](https://github.com/mgmolisani)! - Fixed a bug when evaluating the devtools flag with the new syntax `devtools.enabled` that could result to `true` when explicitly set to `false`. ## 3.11.9 ### Patch Changes - [#12110](https://github.com/apollographql/apollo-client/pull/12110) [`a3f95c6`](https://github.com/apollographql/apollo-client/commit/a3f95c6f7623060bbf68b418b0ab268fabc0c9b6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where errors returned from a `fetchMore` call from a Suspense hook would cause a Suspense boundary to be shown indefinitely. ## 3.11.8 ### Patch Changes - [#12054](https://github.com/apollographql/apollo-client/pull/12054) [`35cf186`](https://github.com/apollographql/apollo-client/commit/35cf186ed9237e41735f150e0cbf4edd995ab0d9) Thanks [@phryneas](https://github.com/phryneas)! - Fixed a bug where incorrect object access in some Safari extensions could cause a crash. ## 3.11.7 ### Patch Changes - [#12052](https://github.com/apollographql/apollo-client/pull/12052) [`e471cef`](https://github.com/apollographql/apollo-client/commit/e471cef875eadef04f8ee18ef431ee70e7b9bcab) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes a regression from where passing an invalid identifier to `from` in `useFragment` would result in the warning `TypeError: Cannot read properties of undefined (reading '__typename')`. ## 3.11.6 ### Patch Changes - [#12049](https://github.com/apollographql/apollo-client/pull/12049) [`9c26892`](https://github.com/apollographql/apollo-client/commit/9c268927b1f8e5921b9440a53c9979a37f594e75) Thanks [@phryneas](https://github.com/phryneas) and [@maciesielka](https://github.com/maciesielka)! - Fix a bug where `useFragment` did not re-render as expected - [#12044](https://github.com/apollographql/apollo-client/pull/12044) [`04462a2`](https://github.com/apollographql/apollo-client/commit/04462a274ad39b392142385a2f052abbf3014749) Thanks [@DoctorJohn](https://github.com/DoctorJohn)! - Cache the `useSubscription` hook's `restart` function definition between re-renders. ## 3.11.5 ### Patch Changes - [#12027](https://github.com/apollographql/apollo-client/pull/12027) [`eb3e21b`](https://github.com/apollographql/apollo-client/commit/eb3e21b9f7fa6a3161705c2c7270129c17b65095) Thanks [@JavaScriptBach](https://github.com/JavaScriptBach)! - Type `MutationResult.reset` as an arrow function - [#12020](https://github.com/apollographql/apollo-client/pull/12020) [`82d8cb4`](https://github.com/apollographql/apollo-client/commit/82d8cb4255be497748829f12eb25ac87c11ee5e4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Better conform to Rules of React by avoiding write of ref in render for `useFragment`. ## 3.11.4 ### Patch Changes - [#11994](https://github.com/apollographql/apollo-client/pull/11994) [`41b17e5`](https://github.com/apollographql/apollo-client/commit/41b17e5950f4db5ef9e32ded5bb327b3bf19e6e8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update the `Modifier` function type to allow `cache.modify` to return deeply partial data. - [#11989](https://github.com/apollographql/apollo-client/pull/11989) [`e609156`](https://github.com/apollographql/apollo-client/commit/e609156c4989def88ae1a28b2e0f0378077a5528) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential crash when calling `clearStore` while a query was running. Previously, calling `client.clearStore()` while a query was running had one of these results: - `useQuery` would stay in a `loading: true` state. - `useLazyQuery` would stay in a `loading: true` state, but also crash with a `"Cannot read property 'data' of undefined"` error. Now, in both cases, the hook will enter an error state with a `networkError`, and the promise returned by the `useLazyQuery` `execute` function will return a result in an error state. - [#11994](https://github.com/apollographql/apollo-client/pull/11994) [`41b17e5`](https://github.com/apollographql/apollo-client/commit/41b17e5950f4db5ef9e32ded5bb327b3bf19e6e8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent accidental distribution on `cache.modify` field modifiers when a field is a union type array. ## 3.11.3 ### Patch Changes - [#11984](https://github.com/apollographql/apollo-client/pull/11984) [`5db1659`](https://github.com/apollographql/apollo-client/commit/5db1659dc07e3de697894fc1c6f00a151d068291) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where multiple fetches with results that returned errors would sometimes set the `data` property with an `errorPolicy` of `none`. - [#11974](https://github.com/apollographql/apollo-client/pull/11974) [`c95848e`](https://github.com/apollographql/apollo-client/commit/c95848e859fb7ce0b3b9439ac71dff880f991450) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where `fetchMore` would write its result data to the cache when using it with a `no-cache` fetch policy. - [#11974](https://github.com/apollographql/apollo-client/pull/11974) [`c95848e`](https://github.com/apollographql/apollo-client/commit/c95848e859fb7ce0b3b9439ac71dff880f991450) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where executing `fetchMore` with a `no-cache` fetch policy could sometimes result in multiple network requests. - [#11974](https://github.com/apollographql/apollo-client/pull/11974) [`c95848e`](https://github.com/apollographql/apollo-client/commit/c95848e859fb7ce0b3b9439ac71dff880f991450) Thanks [@jerelmiller](https://github.com/jerelmiller)! - #### Potentially disruptive change When calling `fetchMore` with a query that has a `no-cache` fetch policy, `fetchMore` will now throw if an `updateQuery` function is not provided. This provides a mechanism to merge the results from the `fetchMore` call with the query's previous result. ## 3.11.2 ### Patch Changes - [#11980](https://github.com/apollographql/apollo-client/pull/11980) [`38c0a2c`](https://github.com/apollographql/apollo-client/commit/38c0a2c43dd28677ee240754cd389c8a08c05738) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix missing `getServerSnapshot` error when using `useSubscription` on the server. ## 3.11.1 ### Patch Changes - [#11969](https://github.com/apollographql/apollo-client/pull/11969) [`061cab6`](https://github.com/apollographql/apollo-client/commit/061cab6627abd4ec81f83c40c1d281c418627c93) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove check for `window.__APOLLO_CLIENT__` when determining whether to connect to Apollo Client Devtools when `connectToDevtools` or `devtools.enabled` is not specified. This now simply checks to see if the application is in development mode. - [#11971](https://github.com/apollographql/apollo-client/pull/11971) [`ecf77f6`](https://github.com/apollographql/apollo-client/commit/ecf77f6f5b5ccf64cfba51e838e96549fb6c92fe) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent the `setTimeout` for suggesting devtools from running in non-browser environments. ## 3.11.0 ### Potentially Breaking Fixes - [#11789](https://github.com/apollographql/apollo-client/pull/11789) [`5793301`](https://github.com/apollographql/apollo-client/commit/579330147d6bd6f7167a35413a33746103e375cb) Thanks [@phryneas](https://github.com/phryneas)! - Changes usages of the `GraphQLError` type to `GraphQLFormattedError`. This was a type bug - these errors were never `GraphQLError` instances to begin with, and the `GraphQLError` class has additional properties that can never be correctly rehydrated from a GraphQL result. The correct type to use here is `GraphQLFormattedError`. Similarly, please ensure to use the type `FormattedExecutionResult` instead of `ExecutionResult` - the non-"Formatted" versions of these types are for use on the server only, but don't get transported over the network. - [#11626](https://github.com/apollographql/apollo-client/pull/11626) [`228429a`](https://github.com/apollographql/apollo-client/commit/228429a1d36eae691473b24fb641ec3cd84c8a3d) Thanks [@phryneas](https://github.com/phryneas)! - Call `nextFetchPolicy` with "variables-changed" even if there is a `fetchPolicy` specified. Previously this would only be called when the current `fetchPolicy` was equal to the `fetchPolicy` option or the option was not specified. If you use `nextFetchPolicy` as a function, expect to see this function called more often. Due to this bug, this also meant that the `fetchPolicy` might be reset to the initial `fetchPolicy`, even when you specified a `nextFetchPolicy` function. If you previously relied on this behavior, you will need to update your `nextFetchPolicy` callback function to implement this resetting behavior. As an example, if your code looked like the following: ```js useQuery(QUERY, { nextFetchPolicy(currentFetchPolicy, info) { // your logic here } ); ``` Update your function to the following to reimplement the resetting behavior: ```js useQuery(QUERY, { nextFetchPolicy(currentFetchPolicy, info) { if (info.reason === 'variables-changed') { return info.initialFetchPolicy; } // your logic here } ); ``` ### Minor Changes - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useQueryRefHandlers`. - [#11854](https://github.com/apollographql/apollo-client/pull/11854) [`3812800`](https://github.com/apollographql/apollo-client/commit/3812800c6e4e5e3e64f473543babdba35ce100c2) Thanks [@jcostello-atlassian](https://github.com/jcostello-atlassian)! - Support extensions in useSubscription - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useLoadableQuery`. - [#11863](https://github.com/apollographql/apollo-client/pull/11863) [`98e44f7`](https://github.com/apollographql/apollo-client/commit/98e44f74cb7c7e93a81bdc7492c9218bf4a2dcd4) Thanks [@phryneas](https://github.com/phryneas)! - Reimplement `useSubscription` to fix rules of React violations. - [#11869](https://github.com/apollographql/apollo-client/pull/11869) [`a69327c`](https://github.com/apollographql/apollo-client/commit/a69327cce1b36e8855258e9b19427511e0af8748) Thanks [@phryneas](https://github.com/phryneas)! - Rewrite big parts of `useQuery` and `useLazyQuery` to be more compliant with the Rules of React and React Compiler - [#11936](https://github.com/apollographql/apollo-client/pull/11936) [`1b23337`](https://github.com/apollographql/apollo-client/commit/1b23337e5a9eec4ce3ed69531ca4f4afe8e897a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to specify a name for the client instance for use with Apollo Client Devtools. This is useful when instantiating multiple clients to identify the client instance more easily. This deprecates the `connectToDevtools` option in favor of a new `devtools` configuration. ```ts new ApolloClient({ devtools: { enabled: true, name: "Test Client", }, }); ``` This option is backwards-compatible with `connectToDevtools` and will be used in the absense of a `devtools` option. - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useBackgroundQuery`. - [#11930](https://github.com/apollographql/apollo-client/pull/11930) [`a768575`](https://github.com/apollographql/apollo-client/commit/a768575ac1454587208aad63abc811b6a966fe72) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). ### Patch Changes - [#11951](https://github.com/apollographql/apollo-client/pull/11951) [`0de03af`](https://github.com/apollographql/apollo-client/commit/0de03af912a76c4e0111f21b4f90a073317b63b6) Thanks [@phryneas](https://github.com/phryneas)! - add React 19 RC to `peerDependencies` - [#11927](https://github.com/apollographql/apollo-client/pull/11927) [`2941824`](https://github.com/apollographql/apollo-client/commit/2941824dd66cdd20eee5f2293373ad7a9cf991a4) Thanks [@phryneas](https://github.com/phryneas)! - Add `restart` function to `useSubscription`. - [#11949](https://github.com/apollographql/apollo-client/pull/11949) [`4528918`](https://github.com/apollographql/apollo-client/commit/45289186bcaaa33dfe904913eb6df31e2541c219) Thanks [@alessbell](https://github.com/alessbell)! - Remove deprecated `watchFragment` option, `canonizeResults` - [#11937](https://github.com/apollographql/apollo-client/pull/11937) [`78332be`](https://github.com/apollographql/apollo-client/commit/78332be32a9af0da33eb3e4100e7a76c3eac2496) Thanks [@phryneas](https://github.com/phryneas)! - `createSchemaFetch`: simulate serialized errors instead of an `ApolloError` instance - [#11902](https://github.com/apollographql/apollo-client/pull/11902) [`96422ce`](https://github.com/apollographql/apollo-client/commit/96422ce95b923b560321a88acd2eec35cf2a1c18) Thanks [@phryneas](https://github.com/phryneas)! - Add `cause` field to `ApolloError`. - [#11806](https://github.com/apollographql/apollo-client/pull/11806) [`8df6013`](https://github.com/apollographql/apollo-client/commit/8df6013b6b45452ec058fab3e068b5b6d6c493f7) Thanks [@phryneas](https://github.com/phryneas)! - MockLink: add query default variables if not specified in mock request - [#11926](https://github.com/apollographql/apollo-client/pull/11926) [`3dd6432`](https://github.com/apollographql/apollo-client/commit/3dd64324dc5156450cead27f8141ea93315ffe65) Thanks [@phryneas](https://github.com/phryneas)! - `watchFragment`: forward additional options to `diffOptions` - [#11946](https://github.com/apollographql/apollo-client/pull/11946) [`7d833b8`](https://github.com/apollographql/apollo-client/commit/7d833b80119a991e6d2eb58f2c71074d697b8e63) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where mutations were not accessible by Apollo Client Devtools in 3.11.0-rc.0. - [#11944](https://github.com/apollographql/apollo-client/pull/11944) [`8f3d7eb`](https://github.com/apollographql/apollo-client/commit/8f3d7eb3bc2e0c2d79c5b1856655abe829390742) Thanks [@sneyderdev](https://github.com/sneyderdev)! - Allow `IgnoreModifier` to be returned from a `optimisticResponse` function when inferring from a `TypedDocumentNode` when used with a generic argument. - [#11954](https://github.com/apollographql/apollo-client/pull/11954) [`4a6e86a`](https://github.com/apollographql/apollo-client/commit/4a6e86aeaf6685abf0dd23110784848c8b085735) Thanks [@phryneas](https://github.com/phryneas)! - Document (and deprecate) the previously undocumented `errors` property on the `useQuery` `QueryResult` type. - [#11719](https://github.com/apollographql/apollo-client/pull/11719) [`09a6677`](https://github.com/apollographql/apollo-client/commit/09a6677ec1a0cffedeecb2cbac5cd3a3c8aa0fa1) Thanks [@phryneas](https://github.com/phryneas)! - Allow wrapping `createQueryPreloader` - [#11921](https://github.com/apollographql/apollo-client/pull/11921) [`70406bf`](https://github.com/apollographql/apollo-client/commit/70406bfd2b9a645d781638569853d9b435e047df) Thanks [@phryneas](https://github.com/phryneas)! - add `ignoreResults` option to `useSubscription` ## 3.11.0-rc.2 ### Patch Changes - [#11951](https://github.com/apollographql/apollo-client/pull/11951) [`0de03af`](https://github.com/apollographql/apollo-client/commit/0de03af912a76c4e0111f21b4f90a073317b63b6) Thanks [@phryneas](https://github.com/phryneas)! - add React 19 RC to `peerDependencies` - [#11937](https://github.com/apollographql/apollo-client/pull/11937) [`78332be`](https://github.com/apollographql/apollo-client/commit/78332be32a9af0da33eb3e4100e7a76c3eac2496) Thanks [@phryneas](https://github.com/phryneas)! - `createSchemaFetch`: simulate serialized errors instead of an `ApolloError` instance - [#11944](https://github.com/apollographql/apollo-client/pull/11944) [`8f3d7eb`](https://github.com/apollographql/apollo-client/commit/8f3d7eb3bc2e0c2d79c5b1856655abe829390742) Thanks [@sneyderdev](https://github.com/sneyderdev)! - Allow `IgnoreModifier` to be returned from a `optimisticResponse` function when inferring from a `TypedDocumentNode` when used with a generic argument. - [#11954](https://github.com/apollographql/apollo-client/pull/11954) [`4a6e86a`](https://github.com/apollographql/apollo-client/commit/4a6e86aeaf6685abf0dd23110784848c8b085735) Thanks [@phryneas](https://github.com/phryneas)! - Document (and deprecate) the previously undocumented `errors` property on the `useQuery` `QueryResult` type. ## 3.11.0-rc.1 ### Patch Changes - [#11949](https://github.com/apollographql/apollo-client/pull/11949) [`4528918`](https://github.com/apollographql/apollo-client/commit/45289186bcaaa33dfe904913eb6df31e2541c219) Thanks [@alessbell](https://github.com/alessbell)! - Remove deprecated `watchFragment` option, `canonizeResults` - [#11926](https://github.com/apollographql/apollo-client/pull/11926) [`3dd6432`](https://github.com/apollographql/apollo-client/commit/3dd64324dc5156450cead27f8141ea93315ffe65) Thanks [@phryneas](https://github.com/phryneas)! - `watchFragment`: forward additional options to `diffOptions` - [#11946](https://github.com/apollographql/apollo-client/pull/11946) [`7d833b8`](https://github.com/apollographql/apollo-client/commit/7d833b80119a991e6d2eb58f2c71074d697b8e63) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where mutations were not accessible by Apollo Client Devtools in 3.11.0-rc.0. ## 3.11.0-rc.0 ### Minor Changes - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useQueryRefHandlers`. - [#11854](https://github.com/apollographql/apollo-client/pull/11854) [`3812800`](https://github.com/apollographql/apollo-client/commit/3812800c6e4e5e3e64f473543babdba35ce100c2) Thanks [@jcostello-atlassian](https://github.com/jcostello-atlassian)! - Support extensions in useSubscription - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useLoadableQuery`. - [#11863](https://github.com/apollographql/apollo-client/pull/11863) [`98e44f7`](https://github.com/apollographql/apollo-client/commit/98e44f74cb7c7e93a81bdc7492c9218bf4a2dcd4) Thanks [@phryneas](https://github.com/phryneas)! - Reimplement `useSubscription` to fix rules of React violations. - [#11869](https://github.com/apollographql/apollo-client/pull/11869) [`a69327c`](https://github.com/apollographql/apollo-client/commit/a69327cce1b36e8855258e9b19427511e0af8748) Thanks [@phryneas](https://github.com/phryneas)! - Rewrite big parts of `useQuery` and `useLazyQuery` to be more compliant with the Rules of React and React Compiler - [#11936](https://github.com/apollographql/apollo-client/pull/11936) [`1b23337`](https://github.com/apollographql/apollo-client/commit/1b23337e5a9eec4ce3ed69531ca4f4afe8e897a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to specify a name for the client instance for use with Apollo Client Devtools. This is useful when instantiating multiple clients to identify the client instance more easily. This deprecates the `connectToDevtools` option in favor of a new `devtools` configuration. ```ts new ApolloClient({ devtools: { enabled: true, name: "Test Client", }, }); ``` This option is backwards-compatible with `connectToDevtools` and will be used in the absense of a `devtools` option. - [#11923](https://github.com/apollographql/apollo-client/pull/11923) [`d88c7f8`](https://github.com/apollographql/apollo-client/commit/d88c7f8909e3cb31532e8b1fc7dd06be12f35591) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for `subscribeToMore` function to `useBackgroundQuery`. - [#11789](https://github.com/apollographql/apollo-client/pull/11789) [`5793301`](https://github.com/apollographql/apollo-client/commit/579330147d6bd6f7167a35413a33746103e375cb) Thanks [@phryneas](https://github.com/phryneas)! - Changes usages of the `GraphQLError` type to `GraphQLFormattedError`. This was a type bug - these errors were never `GraphQLError` instances to begin with, and the `GraphQLError` class has additional properties that can never be correctly rehydrated from a GraphQL result. The correct type to use here is `GraphQLFormattedError`. Similarly, please ensure to use the type `FormattedExecutionResult` instead of `ExecutionResult` - the non-"Formatted" versions of these types are for use on the server only, but don't get transported over the network. - [#11930](https://github.com/apollographql/apollo-client/pull/11930) [`a768575`](https://github.com/apollographql/apollo-client/commit/a768575ac1454587208aad63abc811b6a966fe72) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). ### Patch Changes - [#11927](https://github.com/apollographql/apollo-client/pull/11927) [`2941824`](https://github.com/apollographql/apollo-client/commit/2941824dd66cdd20eee5f2293373ad7a9cf991a4) Thanks [@phryneas](https://github.com/phryneas)! - Add `restart` function to `useSubscription`. - [#11902](https://github.com/apollographql/apollo-client/pull/11902) [`96422ce`](https://github.com/apollographql/apollo-client/commit/96422ce95b923b560321a88acd2eec35cf2a1c18) Thanks [@phryneas](https://github.com/phryneas)! - Add `cause` field to `ApolloError`. - [#11806](https://github.com/apollographql/apollo-client/pull/11806) [`8df6013`](https://github.com/apollographql/apollo-client/commit/8df6013b6b45452ec058fab3e068b5b6d6c493f7) Thanks [@phryneas](https://github.com/phryneas)! - MockLink: add query default variables if not specified in mock request - [#11626](https://github.com/apollographql/apollo-client/pull/11626) [`228429a`](https://github.com/apollographql/apollo-client/commit/228429a1d36eae691473b24fb641ec3cd84c8a3d) Thanks [@phryneas](https://github.com/phryneas)! - Call `nextFetchPolicy` with "variables-changed" even if there is a `fetchPolicy` specified. (fixes #11365) - [#11719](https://github.com/apollographql/apollo-client/pull/11719) [`09a6677`](https://github.com/apollographql/apollo-client/commit/09a6677ec1a0cffedeecb2cbac5cd3a3c8aa0fa1) Thanks [@phryneas](https://github.com/phryneas)! - Allow wrapping `createQueryPreloader` - [#11921](https://github.com/apollographql/apollo-client/pull/11921) [`70406bf`](https://github.com/apollographql/apollo-client/commit/70406bfd2b9a645d781638569853d9b435e047df) Thanks [@phryneas](https://github.com/phryneas)! - add `ignoreResults` option to `useSubscription` ## 3.10.8 ### Patch Changes - [#11911](https://github.com/apollographql/apollo-client/pull/11911) [`1f0460a`](https://github.com/apollographql/apollo-client/commit/1f0460a60fc613e8d6f218a74ded69e81e960791) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `undefined` to be returned from a `cache.modify` modifier function when a generic type argument is used. ## 3.10.7 ### Patch Changes - [#11901](https://github.com/apollographql/apollo-client/pull/11901) [`10a8c0a`](https://github.com/apollographql/apollo-client/commit/10a8c0a8f6f3e13ec3c67bf53cc11a948b60e6d9) Thanks [@phryneas](https://github.com/phryneas)! - update `canUseLayoutEffect` check to also allow for layout effects in React Native - [#11861](https://github.com/apollographql/apollo-client/pull/11861) [`1aed0e8`](https://github.com/apollographql/apollo-client/commit/1aed0e82fcc432380a56d4a446f414ce8b1a7a90) Thanks [@henryqdineen](https://github.com/henryqdineen)! - Defend against non-serializable params in `invariantWrappers` - [#11905](https://github.com/apollographql/apollo-client/pull/11905) [`29755da`](https://github.com/apollographql/apollo-client/commit/29755da8797dc94613a23fe050ddd6ef9ffab607) Thanks [@phryneas](https://github.com/phryneas)! - Add `.d.cts` files for cjs bundles - [#11906](https://github.com/apollographql/apollo-client/pull/11906) [`d104759`](https://github.com/apollographql/apollo-client/commit/d104759cfb4be31e2ffbe166531a9b11861ade99) Thanks [@phryneas](https://github.com/phryneas)! - chore: update TypeScript to 5.5 ## 3.10.6 ### Patch Changes - [#11900](https://github.com/apollographql/apollo-client/pull/11900) [`f745558`](https://github.com/apollographql/apollo-client/commit/f74555826995009a6bb9d824506cecb3508e3365) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: use `useIsomorphicLayoutEffect` instead of `useLayoutEffect` ## 3.10.5 ### Patch Changes - [#11888](https://github.com/apollographql/apollo-client/pull/11888) [`7fb7939`](https://github.com/apollographql/apollo-client/commit/7fb7939edb7ca8f4273b75554f96ea9936731458) Thanks [@phryneas](https://github.com/phryneas)! - switch `useRenderGuard` to an approach not accessing React's internals - [#11511](https://github.com/apollographql/apollo-client/pull/11511) [`6536369`](https://github.com/apollographql/apollo-client/commit/6536369cf213469d20d15b779c344268d70fecd5) Thanks [@phryneas](https://github.com/phryneas)! - `useLoadableQuery`: ensure that `loadQuery` is updated if the ApolloClient instance changes - [#11860](https://github.com/apollographql/apollo-client/pull/11860) [`8740f19`](https://github.com/apollographql/apollo-client/commit/8740f198805a99e01136617c4055d611b92cc231) Thanks [@alessbell](https://github.com/alessbell)! - Fixes [#11849](https://github.com/apollographql/apollo-client/issues/11849) by reevaluating `window.fetch` each time `BatchHttpLink` uses it, if not configured via `options.fetch`. Takes the same approach as PR [#8603](https://github.com/apollographql/apollo-client/pull/8603) which fixed the same issue in `HttpLink`. - [#11852](https://github.com/apollographql/apollo-client/pull/11852) [`d502a69`](https://github.com/apollographql/apollo-client/commit/d502a69654d8ffa31e09467da028304a934a9874) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where calling the `useMutation` `reset` function would point the hook to an outdated `client` reference. - [#11329](https://github.com/apollographql/apollo-client/pull/11329) [`3d164ea`](https://github.com/apollographql/apollo-client/commit/3d164ea16c17d271f6fa9e5ad8f013623eec23a0) Thanks [@PaLy](https://github.com/PaLy)! - Fix graphQLErrors in Error Link if networkError.result is an empty string - [#11852](https://github.com/apollographql/apollo-client/pull/11852) [`d502a69`](https://github.com/apollographql/apollo-client/commit/d502a69654d8ffa31e09467da028304a934a9874) Thanks [@phryneas](https://github.com/phryneas)! - Prevent writing to a ref in render in `useMutation`. As a result, you might encounter problems in the future if you call the mutation's `execute` function during render. Please note that this was never supported behavior, and we strongly recommend against it. - [#11848](https://github.com/apollographql/apollo-client/pull/11848) [`ad63924`](https://github.com/apollographql/apollo-client/commit/ad6392424ddbeb6f91b165c806251490e1cdd69e) Thanks [@phryneas](https://github.com/phryneas)! - Ensure covariant behavior: `MockedResponse` should be assignable to `MockedResponse` - [#11851](https://github.com/apollographql/apollo-client/pull/11851) [`45c47be`](https://github.com/apollographql/apollo-client/commit/45c47be26d4e020cfcff359a5af19ccfc39b930e) Thanks [@phryneas](https://github.com/phryneas)! - Avoid usage of useRef in useInternalState to prevent ref access in render. - [#11877](https://github.com/apollographql/apollo-client/pull/11877) [`634d91a`](https://github.com/apollographql/apollo-client/commit/634d91aeb10ab308b05d5ffb918678806046af09) Thanks [@phryneas](https://github.com/phryneas)! - Add missing name to tuple member (fix TS5084) - [#11851](https://github.com/apollographql/apollo-client/pull/11851) [`45c47be`](https://github.com/apollographql/apollo-client/commit/45c47be26d4e020cfcff359a5af19ccfc39b930e) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where `useLazyQuery` would not pick up a client change. ## 3.10.4 ### Patch Changes - [#11838](https://github.com/apollographql/apollo-client/pull/11838) [`8475346`](https://github.com/apollographql/apollo-client/commit/84753462af50d89c8693713990cccf432ff8267d) Thanks [@alex-kinokon](https://github.com/alex-kinokon)! - Don’t prompt for DevTools installation for browser extension page - [#11839](https://github.com/apollographql/apollo-client/pull/11839) [`6481fe1`](https://github.com/apollographql/apollo-client/commit/6481fe1196cedee987781dcb45ebdc0cafb3998c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix a regression in [3.9.5](https://github.com/apollographql/apollo-client/releases/tag/v3.9.5) where a merge function that returned an incomplete result would not allow the client to refetch in order to fulfill the query. - [#11844](https://github.com/apollographql/apollo-client/pull/11844) [`86984f2`](https://github.com/apollographql/apollo-client/commit/86984f24bd9076a6034acd59bbcb28a2ea1add93) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Honor the `@nonreactive` directive when using `cache.watchFragment` or the `useFragment` hook to avoid rerendering when using these directives. - [#11824](https://github.com/apollographql/apollo-client/pull/11824) [`47ad806`](https://github.com/apollographql/apollo-client/commit/47ad806c7b0c55f1e05dbf276ca87a354ac389e5) Thanks [@phryneas](https://github.com/phryneas)! - Create branded `QueryRef` type without exposed properties. This change deprecates `QueryReference` in favor of a `QueryRef` type that doesn't expose any properties. This change also updates `preloadQuery` to return a new `PreloadedQueryRef` type, which exposes the `toPromise` function as it does today. This means that query refs produced by `useBackgroundQuery` and `useLoadableQuery` now return `QueryRef` types that do not have access to a `toPromise` function, which was never meant to be used in combination with these hooks. While we tend to avoid any types of breaking changes in patch releases as this, this change was necessary to support an upcoming version of the React Server Component integration, which needed to omit the `toPromise` function that would otherwise have broken at runtime. Note that this is a TypeScript-only change. At runtime, `toPromise` is still present on all queryRefs currently created by this package - but we strongly want to discourage you from accessing it in all cases except for the `PreloadedQueryRef` use case. Migration is as simple as replacing all references to `QueryReference` with `QueryRef`, so it should be possible to do this with a search & replace in most code bases: ```diff -import { QueryReference } from '@apollo/client' +import { QueryRef } from '@apollo/client' - function Component({ queryRef }: { queryRef: QueryReference }) { + function Component({ queryRef }: { queryRef: QueryRef }) { // ... } ``` - [#11845](https://github.com/apollographql/apollo-client/pull/11845) [`4c5c820`](https://github.com/apollographql/apollo-client/commit/4c5c820b6172f6a2455bcdd974109513e0e2a39e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `@nonreactive` directives from queries passed to `MockLink` to ensure they are properly matched. - [#11837](https://github.com/apollographql/apollo-client/pull/11837) [`dff15b1`](https://github.com/apollographql/apollo-client/commit/dff15b1b03ebac9cae508c69bf607a29d0f6eccb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a polled query created in React strict mode may not stop polling after the component unmounts while using the `cache-and-network` fetch policy. ## 3.10.3 ### Patch Changes - [#11811](https://github.com/apollographql/apollo-client/pull/11811) [`d67d7f9`](https://github.com/apollographql/apollo-client/commit/d67d7f9a2943273cacaefb26a54184e81f12b022) Thanks [@phryneas](https://github.com/phryneas)! - Adjust some types for React 19 compat - [#11834](https://github.com/apollographql/apollo-client/pull/11834) [`7d8aad4`](https://github.com/apollographql/apollo-client/commit/7d8aad4a00b89e0208ee1563293c24025e6604ce) Thanks [@psamim](https://github.com/psamim)! - Fix error "Cannot convert object to primitive value" ## 3.10.2 ### Patch Changes - [#11821](https://github.com/apollographql/apollo-client/pull/11821) [`2675d3c`](https://github.com/apollographql/apollo-client/commit/2675d3c97e6c47c6e298382004c7c9c2d3ffed0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix a regression where rerendering a component with `useBackgroundQuery` would recreate the `queryRef` instance when used with React's strict mode. - [#11821](https://github.com/apollographql/apollo-client/pull/11821) [`2675d3c`](https://github.com/apollographql/apollo-client/commit/2675d3c97e6c47c6e298382004c7c9c2d3ffed0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Revert the change introduced in [3.9.10](https://github.com/apollographql/apollo-client/releases/tag/v3.9.10) via #11738 that disposed of queryRefs synchronously. This change caused too many issues with strict mode. ## 3.10.1 ### Patch Changes - [#11792](https://github.com/apollographql/apollo-client/pull/11792) [`5876c35`](https://github.com/apollographql/apollo-client/commit/5876c35530a21473207954d1f0c2b7dd00c0b9ea) Thanks [@phryneas](https://github.com/phryneas)! - AutoCleanedCache: only schedule batched cache cleanup if the cache is full (fixes #11790) - [#11799](https://github.com/apollographql/apollo-client/pull/11799) [`1aca7ed`](https://github.com/apollographql/apollo-client/commit/1aca7ed5a3accf2303ccdf9b3dece7278f03ad62) Thanks [@phryneas](https://github.com/phryneas)! - `RenderPromises`: use `canonicalStringify` to serialize `variables` to ensure query deduplication is properly applied even when `variables` are specified in a different order. - [#11803](https://github.com/apollographql/apollo-client/pull/11803) [`bf9dd17`](https://github.com/apollographql/apollo-client/commit/bf9dd17b288f33901e9421bcc0eacb3894c087af) Thanks [@phryneas](https://github.com/phryneas)! - Update the `rehackt` dependency to `^0.1.0` - [#11756](https://github.com/apollographql/apollo-client/pull/11756) [`60592e9`](https://github.com/apollographql/apollo-client/commit/60592e95399c3695d1d49a4c39ad29f00d4059fd) Thanks [@henryqdineen](https://github.com/henryqdineen)! - Fix operation.setContext() type ## 3.10.0 ### Minor Changes - [#11605](https://github.com/apollographql/apollo-client/pull/11605) [`e2dd4c9`](https://github.com/apollographql/apollo-client/commit/e2dd4c95290cea604b548cc446826d89aafe8e11) Thanks [@alessbell](https://github.com/alessbell)! - Adds `createMockFetch` utility for integration testing that includes the link chain - [#11760](https://github.com/apollographql/apollo-client/pull/11760) [`acd1982`](https://github.com/apollographql/apollo-client/commit/acd1982a59ed66fc44fa9e70b08a31c69dac35a6) Thanks [@alessbell](https://github.com/alessbell)! - `createTestSchema` now uses graphql-tools `mergeResolvers` to merge resolvers instead of a shallow merge. - [#11764](https://github.com/apollographql/apollo-client/pull/11764) [`f046aa9`](https://github.com/apollographql/apollo-client/commit/f046aa9fc24ac197a797045d280811a3bbe05806) Thanks [@alessbell](https://github.com/alessbell)! - Rename `createProxiedSchema` to `createTestSchema` and `createMockFetch` to `createSchemaFetch`. - [#11777](https://github.com/apollographql/apollo-client/pull/11777) [`5dfc79f`](https://github.com/apollographql/apollo-client/commit/5dfc79fa6d974362f38361f7dffbe984a9546377) Thanks [@alessbell](https://github.com/alessbell)! - Call `createMockSchema` inside `createTestSchema`. - [#11774](https://github.com/apollographql/apollo-client/pull/11774) [`2583488`](https://github.com/apollographql/apollo-client/commit/2583488677912cb4500e5fb9e3f91b5c113c4cdb) Thanks [@alessbell](https://github.com/alessbell)! - Add ability to set min and max delay in `createSchemaFetch` - [#11605](https://github.com/apollographql/apollo-client/pull/11605) [`e2dd4c9`](https://github.com/apollographql/apollo-client/commit/e2dd4c95290cea604b548cc446826d89aafe8e11) Thanks [@alessbell](https://github.com/alessbell)! - Adds proxiedSchema and createMockSchema testing utilities - [#11465](https://github.com/apollographql/apollo-client/pull/11465) [`7623da7`](https://github.com/apollographql/apollo-client/commit/7623da7720855b0c19e13ff9124679f426a39725) Thanks [@alessbell](https://github.com/alessbell)! - Add `watchFragment` method to the cache and expose it on ApolloClient, refactor `useFragment` using `watchFragment`. - [#11743](https://github.com/apollographql/apollo-client/pull/11743) [`78891f9`](https://github.com/apollographql/apollo-client/commit/78891f9ec81c0b7a7e010f5550a91965fa33a958) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove alpha designation for `queryRef.toPromise()` to stabilize the API. - [#11743](https://github.com/apollographql/apollo-client/pull/11743) [`78891f9`](https://github.com/apollographql/apollo-client/commit/78891f9ec81c0b7a7e010f5550a91965fa33a958) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove alpha designation for `createQueryPreloader` to stabilize the API. - [#11783](https://github.com/apollographql/apollo-client/pull/11783) [`440563a`](https://github.com/apollographql/apollo-client/commit/440563ab2c47efcb9c7d08f52531ade33d753037) Thanks [@alessbell](https://github.com/alessbell)! - Moves new testing utilities to their own entrypoint, `testing/experimental` ### Patch Changes - [#11757](https://github.com/apollographql/apollo-client/pull/11757) [`9825295`](https://github.com/apollographql/apollo-client/commit/982529530893f66a1d236f0fff53862e513fc9a8) Thanks [@phryneas](https://github.com/phryneas)! - Adjust `useReadQuery` wrapper logic to work with transported objects. - [#11771](https://github.com/apollographql/apollo-client/pull/11771) [`e72cbba`](https://github.com/apollographql/apollo-client/commit/e72cbba07e5caa6d75b44ca8c766846e855a6c93) Thanks [@phryneas](https://github.com/phryneas)! - Wrap `useQueryRefHandlers` in `wrapHook`. - [#11754](https://github.com/apollographql/apollo-client/pull/11754) [`80d2ba5`](https://github.com/apollographql/apollo-client/commit/80d2ba579fe6d2a2d102d1fe79d7d503f31cd931) Thanks [@alessbell](https://github.com/alessbell)! - Export `WatchFragmentOptions` and `WatchFragmentResult` from main entrypoint and fix bug where `this` wasn't bound to the `watchFragment` method on `ApolloClient`. ## 3.10.0-rc.1 ### Minor Changes - [#11760](https://github.com/apollographql/apollo-client/pull/11760) [`acd1982`](https://github.com/apollographql/apollo-client/commit/acd1982a59ed66fc44fa9e70b08a31c69dac35a6) Thanks [@alessbell](https://github.com/alessbell)! - `createTestSchema` now uses graphql-tools `mergeResolvers` to merge resolvers instead of a shallow merge. - [#11764](https://github.com/apollographql/apollo-client/pull/11764) [`f046aa9`](https://github.com/apollographql/apollo-client/commit/f046aa9fc24ac197a797045d280811a3bbe05806) Thanks [@alessbell](https://github.com/alessbell)! - Rename `createProxiedSchema` to `createTestSchema` and `createMockFetch` to `createSchemaFetch`. - [#11777](https://github.com/apollographql/apollo-client/pull/11777) [`5dfc79f`](https://github.com/apollographql/apollo-client/commit/5dfc79fa6d974362f38361f7dffbe984a9546377) Thanks [@alessbell](https://github.com/alessbell)! - Call `createMockSchema` inside `createTestSchema`. - [#11774](https://github.com/apollographql/apollo-client/pull/11774) [`2583488`](https://github.com/apollographql/apollo-client/commit/2583488677912cb4500e5fb9e3f91b5c113c4cdb) Thanks [@alessbell](https://github.com/alessbell)! - Add ability to set min and max delay in `createSchemaFetch` - [#11783](https://github.com/apollographql/apollo-client/pull/11783) [`440563a`](https://github.com/apollographql/apollo-client/commit/440563ab2c47efcb9c7d08f52531ade33d753037) Thanks [@alessbell](https://github.com/alessbell)! - Moves new testing utilities to their own entrypoint, `testing/experimental` ### Patch Changes - [#11757](https://github.com/apollographql/apollo-client/pull/11757) [`9825295`](https://github.com/apollographql/apollo-client/commit/982529530893f66a1d236f0fff53862e513fc9a8) Thanks [@phryneas](https://github.com/phryneas)! - Adjust `useReadQuery` wrapper logic to work with transported objects. - [#11771](https://github.com/apollographql/apollo-client/pull/11771) [`e72cbba`](https://github.com/apollographql/apollo-client/commit/e72cbba07e5caa6d75b44ca8c766846e855a6c93) Thanks [@phryneas](https://github.com/phryneas)! - Wrap `useQueryRefHandlers` in `wrapHook`. - [#11754](https://github.com/apollographql/apollo-client/pull/11754) [`80d2ba5`](https://github.com/apollographql/apollo-client/commit/80d2ba579fe6d2a2d102d1fe79d7d503f31cd931) Thanks [@alessbell](https://github.com/alessbell)! - Export `WatchFragmentOptions` and `WatchFragmentResult` from main entrypoint and fix bug where `this` wasn't bound to the `watchFragment` method on `ApolloClient`. ## 3.10.0-rc.0 ### Minor Changes - [#11605](https://github.com/apollographql/apollo-client/pull/11605) [`e2dd4c9`](https://github.com/apollographql/apollo-client/commit/e2dd4c95290cea604b548cc446826d89aafe8e11) Thanks [@alessbell](https://github.com/alessbell)! - Adds `createMockFetch` utility for integration testing that includes the link chain - [#11605](https://github.com/apollographql/apollo-client/pull/11605) [`e2dd4c9`](https://github.com/apollographql/apollo-client/commit/e2dd4c95290cea604b548cc446826d89aafe8e11) Thanks [@alessbell](https://github.com/alessbell)! - Adds proxiedSchema and createMockSchema testing utilities - [#11743](https://github.com/apollographql/apollo-client/pull/11743) [`78891f9`](https://github.com/apollographql/apollo-client/commit/78891f9ec81c0b7a7e010f5550a91965fa33a958) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove alpha designation for `queryRef.toPromise()` to stabilize the API. - [#11743](https://github.com/apollographql/apollo-client/pull/11743) [`78891f9`](https://github.com/apollographql/apollo-client/commit/78891f9ec81c0b7a7e010f5550a91965fa33a958) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove alpha designation for `createQueryPreloader` to stabilize the API. ## 3.10.0-alpha.0 ### Minor Changes - [#11465](https://github.com/apollographql/apollo-client/pull/11465) [`7623da7`](https://github.com/apollographql/apollo-client/commit/7623da7720855b0c19e13ff9124679f426a39725) Thanks [@alessbell](https://github.com/alessbell)! - Add `watchFragment` method to the cache and expose it on ApolloClient, refactor `useFragment` using `watchFragment`. ## 3.9.11 ### Patch Changes - [#11769](https://github.com/apollographql/apollo-client/pull/11769) [`04132af`](https://github.com/apollographql/apollo-client/commit/04132af121c9b48d6e03eb733b9b91f825defbac) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where using `skipToken` or the `skip` option with `useSuspenseQuery` in React's strict mode would perform a network request. ## 3.9.10 ### Patch Changes - [#11738](https://github.com/apollographql/apollo-client/pull/11738) [`b1a5eb8`](https://github.com/apollographql/apollo-client/commit/b1a5eb80cae8bdf2e9d8627f1eab65e088c43438) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where rerendering `useBackgroundQuery` after the `queryRef` had been disposed, either via the auto dispose timeout or by unmounting `useReadQuery`, would cause the `queryRef` to be recreated potentially resulting in another network request. - [#11738](https://github.com/apollographql/apollo-client/pull/11738) [`b1a5eb8`](https://github.com/apollographql/apollo-client/commit/b1a5eb80cae8bdf2e9d8627f1eab65e088c43438) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow queryRefs to be disposed of synchronously when a suspense hook unmounts. This prevents some situations where using a suspense hook with the same query/variables as the disposed queryRef accidentally used the disposed queryRef rather than creating a new instance. - [#11670](https://github.com/apollographql/apollo-client/pull/11670) [`cc5c03b`](https://github.com/apollographql/apollo-client/commit/cc5c03b2690f452483d83eecb68611a23055d99e) Thanks [@phryneas](https://github.com/phryneas)! - Bail out of `executeSubSelectedArray` calls if the array has 0 elements. ## 3.9.9 ### Patch Changes - [#11696](https://github.com/apollographql/apollo-client/pull/11696) [`466ef82`](https://github.com/apollographql/apollo-client/commit/466ef82198486fc696da64d17d82b46140760ac4) Thanks [@PiR1](https://github.com/PiR1)! - Immediately dispose of the `queryRef` if `useBackgroundQuery` unmounts before the auto dispose timeout kicks in. ## 3.9.8 ### Patch Changes - [#11706](https://github.com/apollographql/apollo-client/pull/11706) [`8619bc7`](https://github.com/apollographql/apollo-client/commit/8619bc7e569c1c732afa6faf605c83a6ce0cdf0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in all suspense hooks where returning an empty array after calling `fetchMore` would rerender the component with an empty list. - [#11694](https://github.com/apollographql/apollo-client/pull/11694) [`835d5f3`](https://github.com/apollographql/apollo-client/commit/835d5f30c532c432e2434561580e6f1ec44cc908) Thanks [@phryneas](https://github.com/phryneas)! - Expose `setErrorMessageHandler` from `@apollo/client/dev` entrypoint. - [#11689](https://github.com/apollographql/apollo-client/pull/11689) [`cb8ffe5`](https://github.com/apollographql/apollo-client/commit/cb8ffe50e903397f741b62a44624bfe69b5f7b75) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where passing a new `from` option to `useFragment` would first render with the previous value before rerendering with the correct value. - [#11713](https://github.com/apollographql/apollo-client/pull/11713) [`642092c`](https://github.com/apollographql/apollo-client/commit/642092c713199093aede45f105a1ee3f637614cd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where setting a default `watchQuery` option in the `ApolloClient` constructor could break `startTransition` when used with suspense hooks. ## 3.9.7 ### Patch Changes - [#11659](https://github.com/apollographql/apollo-client/pull/11659) [`652a61e`](https://github.com/apollographql/apollo-client/commit/652a61e96db0f0e27d0a22fafae1df388f3fdf36) Thanks [@phryneas](https://github.com/phryneas)! - Make `useRenderGuard` more resilient to changes in React internals. - [#11594](https://github.com/apollographql/apollo-client/pull/11594) [`50b1097`](https://github.com/apollographql/apollo-client/commit/50b10970ca0efa290ae415ef801650327a89ab8e) Thanks [@alessbell](https://github.com/alessbell)! - Adds a fix for multipart subscriptions that terminate with payload: null ## 3.9.6 ### Patch Changes - [#11617](https://github.com/apollographql/apollo-client/pull/11617) [`f1d8bc4`](https://github.com/apollographql/apollo-client/commit/f1d8bc40c3d8e39340f721f4f1c3fd0ed77b8a6b) Thanks [@phryneas](https://github.com/phryneas)! - Allow Apollo Client instance to intercept hook functionality - [#11638](https://github.com/apollographql/apollo-client/pull/11638) [`bf93ada`](https://github.com/apollographql/apollo-client/commit/bf93adaa0321b573db0ea8fc3a5c364e1fdfeef3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where calling `fetchMore` from a suspense-enabled hook inside `startTransition` caused an unnecessary rerender. ## 3.9.5 ### Patch Changes - [#11595](https://github.com/apollographql/apollo-client/pull/11595) [`8c20955`](https://github.com/apollographql/apollo-client/commit/8c20955874562e5b2ab35557325e047b059bc4fc) Thanks [@phryneas](https://github.com/phryneas)! - Bumps the dependency `rehackt` to 0.0.5 - [#11592](https://github.com/apollographql/apollo-client/pull/11592) [`1133469`](https://github.com/apollographql/apollo-client/commit/1133469bd91ff76b9815e815a454a79d8e23a9bc) Thanks [@Stephen2](https://github.com/Stephen2)! - Strengthen `MockedResponse.newData` type - [#11579](https://github.com/apollographql/apollo-client/pull/11579) [`1ba2fd9`](https://github.com/apollographql/apollo-client/commit/1ba2fd919f79dfdc7b9d3f7d1a7aa5918e648349) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where partial data is reported to `useQuery` when using `notifyOnNetworkStatusChange` after it errors while another overlapping query succeeds. - [#11579](https://github.com/apollographql/apollo-client/pull/11579) [`1ba2fd9`](https://github.com/apollographql/apollo-client/commit/1ba2fd919f79dfdc7b9d3f7d1a7aa5918e648349) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a partial cache write for an errored query would result in automatically refetching that query. - [#11562](https://github.com/apollographql/apollo-client/pull/11562) [`65ab695`](https://github.com/apollographql/apollo-client/commit/65ab695470741e8dcaef1ebd7742c3c397526354) Thanks [@mspiess](https://github.com/mspiess)! - Mocks with an infinite delay no longer require result or error ## 3.9.4 ### Patch Changes - [#11403](https://github.com/apollographql/apollo-client/pull/11403) [`b0c4f3a`](https://github.com/apollographql/apollo-client/commit/b0c4f3ad8198981a229b46dc430345a76e577e9c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in `useLazyQuery` that results in a double network call when calling the execute function with no arguments after having called it previously with another set of arguments. - [#11576](https://github.com/apollographql/apollo-client/pull/11576) [`e855d00`](https://github.com/apollographql/apollo-client/commit/e855d00447e4d9ae478d98f6796d842ef6cc76d1) Thanks [@alessbell](https://github.com/alessbell)! - Revert PR [#11202](https://github.com/apollographql/apollo-client/pull/11202) to fix caching bug reported in [#11560](https://github.com/apollographql/apollo-client/issues/11560) ## 3.9.3 ### Patch Changes - [#11525](https://github.com/apollographql/apollo-client/pull/11525) [`dce923a`](https://github.com/apollographql/apollo-client/commit/dce923ae57eb6b6d889e2980635cb90e2c6cbca3) Thanks [@vezaynk](https://github.com/vezaynk)! - Allows passing in client via options to useFragment - [#11558](https://github.com/apollographql/apollo-client/pull/11558) [`8cba16f`](https://github.com/apollographql/apollo-client/commit/8cba16f041609443111ecf5fb58faea1b3e79569) Thanks [@alessbell](https://github.com/alessbell)! - Fix [`unbound-method`](https://github.com/apollographql/apollo-client/issues/11554) linter error on ObservableQuery methods exposed on useQuery's QueryResult object. ## 3.9.2 ### Patch Changes - [#11552](https://github.com/apollographql/apollo-client/pull/11552) [`6ac2b0c`](https://github.com/apollographql/apollo-client/commit/6ac2b0ce4d999c63478d85b40ad56ccda9624797) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix import in `useLazyRef` causing import issues in the nextjs package. ## 3.9.1 ### Patch Changes - [#11516](https://github.com/apollographql/apollo-client/pull/11516) [`8390fea`](https://github.com/apollographql/apollo-client/commit/8390fea13175bada8361ba5f0df2e43197085aba) Thanks [@phryneas](https://github.com/phryneas)! - Fix an incorrect string substitution in a warning message. - [#11515](https://github.com/apollographql/apollo-client/pull/11515) [`c9bf93b`](https://github.com/apollographql/apollo-client/commit/c9bf93bdc2816f7fdba96961e1435f463f440bd1) Thanks [@vladar](https://github.com/vladar)! - Avoid redundant refetchQueries call for mutation with no-cache policy (fixes #10238) - [#11545](https://github.com/apollographql/apollo-client/pull/11545) [`84a6bea`](https://github.com/apollographql/apollo-client/commit/84a6beaeae69acdffea49ba6b8242752cc188172) Thanks [@alessbell](https://github.com/alessbell)! - Remove error thrown by `inFlightLinkObservables` intended to be removed before 3.9 release. ## 3.9.0 ### Minor Changes #### Memory optimizations - [#11424](https://github.com/apollographql/apollo-client/pull/11424) [`62f3b6d`](https://github.com/apollographql/apollo-client/commit/62f3b6d0e89611e27d9f29812ee60e5db5963fd6) Thanks [@phryneas](https://github.com/phryneas)! - Simplify RetryLink, fix potential memory leak Historically, `RetryLink` would keep a `values` array of all previous values, in case the operation would get an additional subscriber at a later point in time. In practice, this could lead to a memory leak ([#11393](https://github.com/apollographql/apollo-client/pull/11393)) and did not serve any further purpose, as the resulting observable would only be subscribed to by Apollo Client itself, and only once - it would be wrapped in a `Concast` before being exposed to the user, and that `Concast` would handle subscribers on its own. - [#11435](https://github.com/apollographql/apollo-client/pull/11435) [`5cce53e`](https://github.com/apollographql/apollo-client/commit/5cce53e83b976f85d2d2b06e28cc38f01324fea1) Thanks [@phryneas](https://github.com/phryneas)! - Deprecates `canonizeResults`. Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks. - [#11254](https://github.com/apollographql/apollo-client/pull/11254) [`d08970d`](https://github.com/apollographql/apollo-client/commit/d08970d348cf4ad6d80c6baf85b4a4cd4034a3bb) Thanks [@benjamn](https://github.com/benjamn)! - Decouple `canonicalStringify` from `ObjectCanon` for better time and memory performance. - [#11356](https://github.com/apollographql/apollo-client/pull/11356) [`cc4ac7e`](https://github.com/apollographql/apollo-client/commit/cc4ac7e1917f046bcd177882727864eed40b910e) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential memory leak in `FragmentRegistry.transform` and `FragmentRegistry.findFragmentSpreads` that would hold on to passed-in `DocumentNodes` for too long. - [#11370](https://github.com/apollographql/apollo-client/pull/11370) [`25e2cb4`](https://github.com/apollographql/apollo-client/commit/25e2cb431c76ec5aa88202eaacbd98fad42edc7f) Thanks [@phryneas](https://github.com/phryneas)! - `parse` function: improve memory management - use LRU `WeakCache` instead of `Map` to keep a limited number of parsed results - cache is initiated lazily, only when needed - expose `parse.resetCache()` method - [#11389](https://github.com/apollographql/apollo-client/pull/11389) [`139acd1`](https://github.com/apollographql/apollo-client/commit/139acd1153afa1445b69dcb4e139668ab8c5889a) Thanks [@phryneas](https://github.com/phryneas)! - `documentTransform`: use `optimism` and `WeakCache` instead of directly storing data on the `Trie` - [#11358](https://github.com/apollographql/apollo-client/pull/11358) [`7d939f8`](https://github.com/apollographql/apollo-client/commit/7d939f80fbc2c419c58a6c55b6a35ee7474d0379) Thanks [@phryneas](https://github.com/phryneas)! - Fixes a potential memory leak in `Concast` that might have been triggered when `Concast` was used outside of Apollo Client. - [#11344](https://github.com/apollographql/apollo-client/pull/11344) [`bd26676`](https://github.com/apollographql/apollo-client/commit/bd2667619700139af32a45364794d11f845ab6cf) Thanks [@phryneas](https://github.com/phryneas)! - Add a `resetCache` method to `DocumentTransform` and hook `InMemoryCache.addTypenameTransform` up to `InMemoryCache.gc` - [#11367](https://github.com/apollographql/apollo-client/pull/11367) [`30d17bf`](https://github.com/apollographql/apollo-client/commit/30d17bfebe44dbfa7b78c8982cfeb49afd37129c) Thanks [@phryneas](https://github.com/phryneas)! - `print`: use `WeakCache` instead of `WeakMap` - [#11387](https://github.com/apollographql/apollo-client/pull/11387) [`4dce867`](https://github.com/apollographql/apollo-client/commit/4dce8673b1757d8a3a4edd2996d780e86fad14e3) Thanks [@phryneas](https://github.com/phryneas)! - `QueryManager.transformCache`: use `WeakCache` instead of `WeakMap` - [#11369](https://github.com/apollographql/apollo-client/pull/11369) [`2a47164`](https://github.com/apollographql/apollo-client/commit/2a471646616e3af1b5c039e961f8d5717fad8f32) Thanks [@phryneas](https://github.com/phryneas)! - Persisted Query Link: improve memory management - use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results - hash cache is initiated lazily, only when needed - expose `persistedLink.resetHashCache()` method - reset hash cache if the upstream server reports it doesn't accept persisted queries - [#10804](https://github.com/apollographql/apollo-client/pull/10804) [`221dd99`](https://github.com/apollographql/apollo-client/commit/221dd99ffd1990f8bd0392543af35e9b08d0fed8) Thanks [@phryneas](https://github.com/phryneas)! - use WeakMap in React Native with Hermes - [#11355](https://github.com/apollographql/apollo-client/pull/11355) [`7d8e184`](https://github.com/apollographql/apollo-client/commit/7d8e18493cd13134726c6643cbf0fadb08be2d37) Thanks [@phryneas](https://github.com/phryneas)! - InMemoryCache.gc now also triggers FragmentRegistry.resetCaches (if there is a FragmentRegistry) - [#11409](https://github.com/apollographql/apollo-client/pull/11409) [`2e7203b`](https://github.com/apollographql/apollo-client/commit/2e7203b3a9618952ddb522627ded7cceabd7f250) Thanks [@phryneas](https://github.com/phryneas)! - Adds an experimental `ApolloClient.getMemoryInternals` helper - [#11343](https://github.com/apollographql/apollo-client/pull/11343) [`776631d`](https://github.com/apollographql/apollo-client/commit/776631de4500d56252f6f5fdaf29a81c41dfbdc7) Thanks [@phryneas](https://github.com/phryneas)! - Add `reset` method to `print`, hook up to `InMemoryCache.gc` #### Suspense-enabled data fetching on user interaction with `useLoadableQuery` - [#11300](https://github.com/apollographql/apollo-client/pull/11300) [`a815873`](https://github.com/apollographql/apollo-client/commit/a8158733cfa3e65180ec23518d657ea41894bb2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces a new `useLoadableQuery` hook. This hook works similarly to `useBackgroundQuery` in that it returns a `queryRef` that can be used to suspend a component via the `useReadQuery` hook. It provides a more ergonomic way to load the query during a user interaction (for example when wanting to preload some data) that would otherwise be clunky with `useBackgroundQuery`. ```tsx function App() { const [loadQuery, queryRef, { refetch, fetchMore, reset }] = useLoadableQuery(query, options); return ( <> }> {queryRef && } ); } function Child({ queryRef }) { const { data } = useReadQuery(queryRef); // ... } ``` #### Begin preloading outside of React with `createQueryPreloader` - [#11412](https://github.com/apollographql/apollo-client/pull/11412) [`58db5c3`](https://github.com/apollographql/apollo-client/commit/58db5c3295b88162f91019f0898f6baa4b9cced6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to start preloading a query outside React to begin fetching as early as possible. Call `createQueryPreloader` to create a `preloadQuery` function which can be called to start fetching a query. This returns a `queryRef` which is passed to `useReadQuery` and suspended until the query is done fetching. ```tsx const preloadQuery = createQueryPreloader(client); const queryRef = preloadQuery(QUERY, { variables, ...otherOptions }); function App() { return { Loading}> } } function MyQuery() { const { data } = useReadQuery(queryRef); // do something with data } ``` #### Testing utility improvements - [#11178](https://github.com/apollographql/apollo-client/pull/11178) [`4d64a6f`](https://github.com/apollographql/apollo-client/commit/4d64a6fa2ad5abe6f7f172c164f5e1fc2cb89829) Thanks [@sebakerckhof](https://github.com/sebakerckhof)! - Support re-using of mocks in the MockedProvider - [#6701](https://github.com/apollographql/apollo-client/pull/6701) [`8d2b4e1`](https://github.com/apollographql/apollo-client/commit/8d2b4e107d7c21563894ced3a65d631183b58fd9) Thanks [@prowe](https://github.com/prowe)! - Ability to dynamically match mocks Adds support for a new property `MockedResponse.variableMatcher`: a predicate function that accepts a `variables` param. If `true`, the `variables` will be passed into the `ResultFunction` to help dynamically build a response. #### New `useQueryRefHandlers` hook - [#11412](https://github.com/apollographql/apollo-client/pull/11412) [`58db5c3`](https://github.com/apollographql/apollo-client/commit/58db5c3295b88162f91019f0898f6baa4b9cced6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Create a new `useQueryRefHandlers` hook that returns `refetch` and `fetchMore` functions for a given `queryRef`. This is useful to get access to handlers for a `queryRef` that was created by `createQueryPreloader` or when the handlers for a `queryRef` produced by a different component are inaccessible. ```jsx const MyComponent({ queryRef }) { const { refetch, fetchMore } = useQueryRefHandlers(queryRef); // ... } ``` #### Bail out of `optimisticResponse` updates with the `IGNORE` sentinel object - [#11410](https://github.com/apollographql/apollo-client/pull/11410) [`07fcf6a`](https://github.com/apollographql/apollo-client/commit/07fcf6a3bf5bc78ffe6f3e598897246b4da02cbb) Thanks [@sf-twingate](https://github.com/sf-twingate)! - Allow returning `IGNORE` sentinel object from `optimisticResponse` functions to bail-out from the optimistic update. Consider this example: ```jsx const UPDATE_COMMENT = gql` mutation UpdateComment($commentId: ID!, $commentContent: String!) { updateComment(commentId: $commentId, content: $commentContent) { id __typename content } } `; function CommentPageWithData() { const [mutate] = useMutation(UPDATE_COMMENT); return ( mutate({ variables: { commentId, commentContent }, optimisticResponse: (vars, { IGNORE }) => { if (commentContent === "foo") { // conditionally bail out of optimistic updates return IGNORE; } return { updateComment: { id: commentId, __typename: "Comment", content: commentContent, }, }; }, }) } /> ); } ``` The `IGNORE` sentinel can be destructured from the second parameter in the callback function signature passed to `optimisticResponse`. #### Network adapters for multipart subscriptions usage with Relay and urql - [#11301](https://github.com/apollographql/apollo-client/pull/11301) [`46ab032`](https://github.com/apollographql/apollo-client/commit/46ab032af83a01f184bfcce5edba4b55dbb2962a) Thanks [@alessbell](https://github.com/alessbell)! - Add multipart subscription network adapters for Relay and urql ##### Relay ```tsx import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/relay"; import { Environment, Network, RecordSource, Store } from "relay-runtime"; const fetchMultipartSubs = createFetchMultipartSubscription( "http://localhost:4000" ); const network = Network.create(fetchQuery, fetchMultipartSubs); export const RelayEnvironment = new Environment({ network, store: new Store(new RecordSource()), }); ``` ##### Urql ```tsx import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/urql"; import { Client, fetchExchange, subscriptionExchange } from "@urql/core"; const url = "http://localhost:4000"; const multipartSubscriptionForwarder = createFetchMultipartSubscription(url); const client = new Client({ url, exchanges: [ fetchExchange, subscriptionExchange({ forwardSubscription: multipartSubscriptionForwarder, }), ], }); ``` #### `skipPollAttempt` callback function - [#11397](https://github.com/apollographql/apollo-client/pull/11397) [`3f7eecb`](https://github.com/apollographql/apollo-client/commit/3f7eecbfbd4f4444cffcaac7dd9fd225c8c2a401) Thanks [@aditya-kumawat](https://github.com/aditya-kumawat)! - Adds a new `skipPollAttempt` callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval. This will solve the frequent use-case of disabling polling when the window is inactive. ```ts useQuery(QUERY, { pollInterval: 1000, skipPollAttempt: () => document.hidden, // or !document.hasFocus() }); // or define it globally new ApolloClient({ defaultOptions: { watchQuery: { skipPollAttempt: () => document.hidden, // or !document.hasFocus() }, }, }); ``` #### `QueryManager.inFlightLinkObservables` now uses a strong `Trie` as an internal data structure - [#11345](https://github.com/apollographql/apollo-client/pull/11345) [`1759066`](https://github.com/apollographql/apollo-client/commit/1759066a8f9a204e49228568aef9446a64890ff3) Thanks [@phryneas](https://github.com/phryneas)! ##### Warning: requires `@apollo/experimental-nextjs-app-support` update If you are using `@apollo/experimental-nextjs-app-support`, you will need to update that to at least 0.5.2, as it accesses this internal data structure.

More Minor Changes

- [#11202](https://github.com/apollographql/apollo-client/pull/11202) [`7c2bc08`](https://github.com/apollographql/apollo-client/commit/7c2bc08b2ab46b9aa181d187a27aec2ad7129599) Thanks [@benjamn](https://github.com/benjamn)! - Prevent `QueryInfo#markResult` mutation of `result.data` and return cache data consistently whether complete or incomplete. - [#11442](https://github.com/apollographql/apollo-client/pull/11442) [`4b6f2bc`](https://github.com/apollographql/apollo-client/commit/4b6f2bccf3ba94643b38689b32edd2839e47aec1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the need to call `retain` from `useLoadableQuery` since `useReadQuery` will now retain the query. This means that a `queryRef` that is not consumed by `useReadQuery` within the given `autoDisposeTimeoutMs` will now be auto diposed for you. Thanks to [#11412](https://github.com/apollographql/apollo-client/pull/11412), disposed query refs will be automatically resubscribed to the query when consumed by `useReadQuery` after it has been disposed. - [#11438](https://github.com/apollographql/apollo-client/pull/11438) [`6d46ab9`](https://github.com/apollographql/apollo-client/commit/6d46ab930a5e9bd5cae153d3b75b8966784fcd4e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the need to call `retain` from `useBackgroundQuery` since `useReadQuery` will now retain the query. This means that a `queryRef` that is not consumed by `useReadQuery` within the given `autoDisposeTimeoutMs` will now be auto diposed for you. Thanks to [#11412](https://github.com/apollographql/apollo-client/pull/11412), disposed query refs will be automatically resubscribed to the query when consumed by `useReadQuery` after it has been disposed. - [#11175](https://github.com/apollographql/apollo-client/pull/11175) [`d6d1491`](https://github.com/apollographql/apollo-client/commit/d6d14911c40782cd6d69167b6f6169c890091ccb) Thanks [@phryneas](https://github.com/phryneas)! - To work around issues in React Server Components, especially with bundling for the Next.js "edge" runtime we now use an external package to wrap `react` imports instead of importing React directly. - [#11495](https://github.com/apollographql/apollo-client/pull/11495) [`1190aa5`](https://github.com/apollographql/apollo-client/commit/1190aa59a106217f7192c1f81099adfa5e4365c1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Increase the default memory limits for `executeSelectionSet` and `executeSelectionSetArray`.

Patch Changes

- [#11275](https://github.com/apollographql/apollo-client/pull/11275) [`3862f9b`](https://github.com/apollographql/apollo-client/commit/3862f9ba9086394c4cf4c2ecd99e8e0f6cf44885) Thanks [@phryneas](https://github.com/phryneas)! - Add a `defaultContext` option and property on `ApolloClient`, e.g. for keeping track of changing auth tokens or dependency injection. This can be used e.g. in authentication scenarios, where a new token might be generated outside of the link chain and should passed into the link chain. ```js import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client"; import { setContext } from "@apollo/client/link/context"; const httpLink = createHttpLink({ uri: "/graphql", }); const authLink = setContext((_, { headers, token }) => { return { headers: { ...headers, authorization: token ? `Bearer ${token}` : "", }, }; }); const client = new ApolloClient({ link: authLink.concat(httpLink), cache: new InMemoryCache(), }); // somewhere else in your application function onNewToken(newToken) { // token can now be changed for future requests without need for a global // variable, scoped ref or recreating the client client.defaultContext.token = newToken; } ``` - [#11443](https://github.com/apollographql/apollo-client/pull/11443) [`ff5a332`](https://github.com/apollographql/apollo-client/commit/ff5a332ff8b190c418df25371e36719d70061ebe) Thanks [@phryneas](https://github.com/phryneas)! - Adds a deprecation warning to the HOC and render prop APIs. The HOC and render prop APIs have already been deprecated since 2020, but we previously didn't have a `@deprecated` tag in the DocBlocks. - [#11385](https://github.com/apollographql/apollo-client/pull/11385) [`d9ca4f0`](https://github.com/apollographql/apollo-client/commit/d9ca4f0821c66ae4f03cf35a7ac93fe604cc6de3) Thanks [@phryneas](https://github.com/phryneas)! - ensure `defaultContext` is also used for mutations and subscriptions - [#11503](https://github.com/apollographql/apollo-client/pull/11503) [`67f62e3`](https://github.com/apollographql/apollo-client/commit/67f62e359bc471787d066319326e5582b4a635c8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Release changes from [`v3.8.10`](https://github.com/apollographql/apollo-client/releases/tag/v3.8.10) - [#11078](https://github.com/apollographql/apollo-client/pull/11078) [`14edebe`](https://github.com/apollographql/apollo-client/commit/14edebebefb7634c32b921d02c1c85c6c8737989) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery: prevent reporting results of previous queries if the variables changed since - [#11439](https://github.com/apollographql/apollo-client/pull/11439) [`33454f0`](https://github.com/apollographql/apollo-client/commit/33454f0a40a05ea2b00633bda20a84d0ec3a4f4d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Address bundling issue introduced in [#11412](https://github.com/apollographql/apollo-client/pull/11412) where the `react/cache` internals ended up duplicated in the bundle. This was due to the fact that we had a `react/hooks` entrypoint that imported these files along with the newly introduced `createQueryPreloader` function, which lived outside of the `react/hooks` folder. - [#11371](https://github.com/apollographql/apollo-client/pull/11371) [`ebd8fe2`](https://github.com/apollographql/apollo-client/commit/ebd8fe2c1b8b50bfeb2da20aeca5671300fb5564) Thanks [@phryneas](https://github.com/phryneas)! - Clarify types of `EntityStore.makeCacheKey`.
## 3.8.10 ### Patch Changes - [#11489](https://github.com/apollographql/apollo-client/pull/11489) [`abfd02a`](https://github.com/apollographql/apollo-client/commit/abfd02abeb8585e44377e9e87e5d20e5d95be002) Thanks [@gronxb](https://github.com/gronxb)! - Fix `networkStatus` with `useSuspenseQuery` not properly updating to ready state when using a `cache-and-network` fetch policy that returns data equal to what is already in the cache. - [#11483](https://github.com/apollographql/apollo-client/pull/11483) [`6394dda`](https://github.com/apollographql/apollo-client/commit/6394dda47fa83d9ddd922e0d05e62bd872e4ea8e) Thanks [@pipopotamasu](https://github.com/pipopotamasu)! - Fix cache override warning output ## 3.8.9 ### Patch Changes - [#11472](https://github.com/apollographql/apollo-client/pull/11472) [`afc844d`](https://github.com/apollographql/apollo-client/commit/afc844dd8d6f9f7a3e2003f9a5b541291dfe3fb4) Thanks [@alessbell](https://github.com/alessbell)! - Fix delay: Infinity when set on a MockResponse passed to Mocked Provider so it indefinitely enters loading state. - [#11464](https://github.com/apollographql/apollo-client/pull/11464) [`aac12b2`](https://github.com/apollographql/apollo-client/commit/aac12b221a6cb776d4941b6c8aadf04f0f0acd27) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent `useFragment` from excessively unsubscribing and resubscribing the fragment with the cache on every render. - [#11449](https://github.com/apollographql/apollo-client/pull/11449) [`f40cda4`](https://github.com/apollographql/apollo-client/commit/f40cda45841e93b056c781c19651b54464f7346a) Thanks [@phryneas](https://github.com/phryneas)! - Removes refences to the typescript "dom" lib. - [#11470](https://github.com/apollographql/apollo-client/pull/11470) [`e293bc9`](https://github.com/apollographql/apollo-client/commit/e293bc90d6f7937a6fc7c169f7b16eeb39d5fd49) Thanks [@phryneas](https://github.com/phryneas)! - Remove an unnecessary check from parseAndCheckHttpResponse. ## 3.8.8 ### Patch Changes - [#11200](https://github.com/apollographql/apollo-client/pull/11200) [`ae5091a21`](https://github.com/apollographql/apollo-client/commit/ae5091a21f0feff1486503071ea8dc002cf1be41) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Enable `strict` in tsconfig for the entire project. - [#11332](https://github.com/apollographql/apollo-client/pull/11332) [`291aea56b`](https://github.com/apollographql/apollo-client/commit/291aea56bfaed3987a98be7fe4e6160114b62d2d) Thanks [@asvishnyakov](https://github.com/asvishnyakov)! - Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core - [#10931](https://github.com/apollographql/apollo-client/pull/10931) [`e5acf910e`](https://github.com/apollographql/apollo-client/commit/e5acf910e39752b453540b6751046d1c19b66350) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: also reset internal state on reset ## 3.8.7 ### Patch Changes - [#11297](https://github.com/apollographql/apollo-client/pull/11297) [`c8c76a522`](https://github.com/apollographql/apollo-client/commit/c8c76a522e593de0d06cff73fde2d9e88152bed6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an explicit return type for the `useReadQuery` hook called `UseReadQueryResult`. Previously the return type of this hook was inferred from the return value. - [#11337](https://github.com/apollographql/apollo-client/pull/11337) [`bb1da8349`](https://github.com/apollographql/apollo-client/commit/bb1da8349e785c54fb4030f269602c900adf23a0) Thanks [@phryneas](https://github.com/phryneas)! - #11206 used the TypeScript syntax `infer X extends Y` that was introduced in TS 4.8. This caused some problems for some users, so we are rolling back to a more backwars-compatible (albeit slightly less performant) type. ## 3.8.6 ### Patch Changes - [#11291](https://github.com/apollographql/apollo-client/pull/11291) [`2be7eafe3`](https://github.com/apollographql/apollo-client/commit/2be7eafe3c115d56d993dbda64d320550712df1f) Thanks [@ArioA](https://github.com/ArioA)! - Fix a bug that allows to only call `loadErrorMessages` without also calling `loadDevErrorMessages`. - [#11274](https://github.com/apollographql/apollo-client/pull/11274) [`b29f000f3`](https://github.com/apollographql/apollo-client/commit/b29f000f36f281e256809b5454eaeca2ec4450bf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Start the query ref auto dispose timeout after the initial promise has settled. This prevents requests that run longer than the timeout duration from keeping the component suspended indefinitely. - [#11289](https://github.com/apollographql/apollo-client/pull/11289) [`b5894dbf0`](https://github.com/apollographql/apollo-client/commit/b5894dbf0fd5ea5ef1ff20dd896a658ef78c69dc) Thanks [@phryneas](https://github.com/phryneas)! - `MockedProvider`: default `connectToDevTools` to `false` in created `ApolloClient` instance. This will prevent the mocked `ApolloClient` instance from trying to connect to the DevTools, which would start a `setTimeout` that might keep running after a test has finished. - [#11206](https://github.com/apollographql/apollo-client/pull/11206) [`dd2ce7687`](https://github.com/apollographql/apollo-client/commit/dd2ce7687ae9afa399e950a523fc7330284c25fe) Thanks [@phryneas](https://github.com/phryneas)! - `cache.modify`: Less strict types & new dev runtime warnings. ## 3.8.5 ### Patch Changes - [#11266](https://github.com/apollographql/apollo-client/pull/11266) [`5192cf6e1`](https://github.com/apollographql/apollo-client/commit/5192cf6e1e958080bcae09e5967fa6851bd3a78c) Thanks [@phryneas](https://github.com/phryneas)! - Fixes argument handling for invariant log messages. - [#11235](https://github.com/apollographql/apollo-client/pull/11235) [`6cddaaf65`](https://github.com/apollographql/apollo-client/commit/6cddaaf6543f5c0b1fb04ba47480fb393ba10de7) Thanks [@phryneas](https://github.com/phryneas)! - Fix nextFetchPolicy behaviour with transformed documents by keeping `options` reference stable when passing it through QueryManager. - [#11252](https://github.com/apollographql/apollo-client/pull/11252) [`327a2abbd`](https://github.com/apollographql/apollo-client/commit/327a2abbd5db87ca27f2ffd1d2f8dccd75868a58) Thanks [@phryneas](https://github.com/phryneas)! - Fixes a race condition in asyncMap that caused issues in React Native when errors were returned in the response payload along with a data property that was null. - [#11229](https://github.com/apollographql/apollo-client/pull/11229) [`c372bad4e`](https://github.com/apollographql/apollo-client/commit/c372bad4ebd01a4f2e772cd76e873143bf043fe6) Thanks [@phryneas](https://github.com/phryneas)! - Remove (already throwing) SuspenseCache export that should have been removed in 3.8. - [#11267](https://github.com/apollographql/apollo-client/pull/11267) [`bc055e068`](https://github.com/apollographql/apollo-client/commit/bc055e0683e87b9445e321f73857f4a91b20a9ce) Thanks [@phryneas](https://github.com/phryneas)! - Remove some dead code. ## 3.8.4 ### Patch Changes - [#11195](https://github.com/apollographql/apollo-client/pull/11195) [`9e59b251d`](https://github.com/apollographql/apollo-client/commit/9e59b251d4d63afb83d9821889f87c71c4adde0f) Thanks [@phryneas](https://github.com/phryneas)! - For `invariant.log` etc., error arguments are now serialized correctly in the link to the error page. ## 3.8.3 ### Patch Changes - [#11193](https://github.com/apollographql/apollo-client/pull/11193) [`fd2a4cf0c`](https://github.com/apollographql/apollo-client/commit/fd2a4cf0c3ada968df3f9814d87dedaaa8eddb5e) Thanks [@phryneas](https://github.com/phryneas)! - Call devtools registration after ApolloClient is fully set up. ## 3.8.2 ### Patch Changes - [#10072](https://github.com/apollographql/apollo-client/pull/10072) [`51045c336`](https://github.com/apollographql/apollo-client/commit/51045c336ff86befbdd598af6e7104ffe0d419d0) Thanks [@Huulivoide](https://github.com/Huulivoide)! - Fixes race conditions in useReactiveVar that may prevent updates to the reactive variable from propagating through the hook. - [#11162](https://github.com/apollographql/apollo-client/pull/11162) [`d9685f53c`](https://github.com/apollographql/apollo-client/commit/d9685f53c34483245e6ea21e91b669ef1180ae97) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensures GraphQL errors returned in subscription payloads adhere to the `errorPolicy` set in `client.subscribe(...)` calls. - [#11134](https://github.com/apollographql/apollo-client/pull/11134) [`96492e142`](https://github.com/apollographql/apollo-client/commit/96492e14279d78e2613c1381d31f88cdf5816f45) Thanks [@alessbell](https://github.com/alessbell)! - Use separate type imports in useSuspenseQuery and useBackgroundQuery to workaround SWC compiler issue. - [#11117](https://github.com/apollographql/apollo-client/pull/11117) [`6b8198109`](https://github.com/apollographql/apollo-client/commit/6b8198109bd9fe5eedf352421a0a773ac0acfb18) Thanks [@phryneas](https://github.com/phryneas)! - Adds a new devtools registration mechanism and tweaks the mechanism behind the "devtools not found" mechanic. - [#11186](https://github.com/apollographql/apollo-client/pull/11186) [`f1d429f32`](https://github.com/apollographql/apollo-client/commit/f1d429f32ae8e896155b50f1fc7c51dfeb06c3ba) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where race conditions when rapidly switching between variables would sometimes result in the wrong `data` returned from the query. Specifically this occurs when a query is triggered with an initial set of variables (`VariablesA`), then triggers the same query with another set of variables (`VariablesB`) but switches back to the `VariablesA` before the response for `VariablesB` is returned. Previously this would result in the data for `VariablesB` to be displayed while `VariablesA` was active. The data is for `VariablesA` is now properly returned. - [#11163](https://github.com/apollographql/apollo-client/pull/11163) [`a8a9e11e9`](https://github.com/apollographql/apollo-client/commit/a8a9e11e917716538206eb7d5de21dbfd09630bd) Thanks [@bignimbus](https://github.com/bignimbus)! - Fix typo in error message: "occured" -> "occurred" - [#11180](https://github.com/apollographql/apollo-client/pull/11180) [`7d9c481e5`](https://github.com/apollographql/apollo-client/commit/7d9c481e53f3c9577ec6ed6231c9e3db8c8b374b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where refetching from `useBackgroundQuery` via `refetch` with an error after an error was already fetched would get stuck in a loading state. ## 3.8.1 ### Patch Changes - [#11141](https://github.com/apollographql/apollo-client/pull/11141) [`c469b1616`](https://github.com/apollographql/apollo-client/commit/c469b1616517aac124a3357066cd83439463033c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove newly exported response iterator helpers that caused problems on some installs where `@types/node` was not available. **IMPORTANT** The following exports were added in version 3.8.0 that are removed with this patch. - `isAsyncIterableIterator` - `isBlob` - `isNodeReadableStream` - `isNodeResponse` - `isReadableStream` - `isStreamableBlob` ## 3.8.0 ### Minor Changes #### Fetching with Suspense 🎉 - [#10323](https://github.com/apollographql/apollo-client/pull/10323) [`64cb88a4b`](https://github.com/apollographql/apollo-client/commit/64cb88a4b6be8640c4e0d753dd06ddf4c25a2bc3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for React suspense with a new `useSuspenseQuery` hook. `useSuspenseQuery` initiates a network request and causes the component calling it to suspend while the request is in flight. It can be thought of as a drop-in replacement for `useQuery` that allows you to take advantage of React's concurrent features while fetching during render. Consider a `Dog` component that fetches and renders some information about a dog named Mozzarella:
View code 🐶 ```tsx import { Suspense } from "react"; import { gql, TypedDocumentNode, useSuspenseQuery } from "@apollo/client"; interface Data { dog: { id: string; name: string; }; } interface Variables { name: string; } const GET_DOG_QUERY: TypedDocumentNode = gql` query GetDog($name: String) { dog(name: $name) { id name } } `; function App() { return ( Loading...}> ); } function Dog({ name }: { name: string }) { const { data } = useSuspenseQuery(GET_DOG_QUERY, { variables: { name }, }); return <>Name: {data.dog.name}; } ```
For a detailed explanation of `useSuspenseQuery`, see our [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense). - [#10755](https://github.com/apollographql/apollo-client/pull/10755) [`e3c676deb`](https://github.com/apollographql/apollo-client/commit/e3c676deb59d006f33d24a7211e58725a67641b8) Thanks [@alessbell](https://github.com/alessbell)! - Feature: adds `useBackgroundQuery` and `useReadQuery` hooks `useBackgroundQuery` initiates a request for data in a parent component and returns a `QueryReference` which is used to read the data in a child component via `useReadQuery`. If the child component attempts to render before the data can be found in the cache, the child component will suspend until the data is available. On cache updates to watched data, the child component calling `useReadQuery` will re-render with new data **but the parent component will not re-render** (as it would, for example, if it were using `useQuery` to issue the request). Consider an `App` component that fetches a list of breeds in the background while also fetching and rendering some information about an individual dog, Mozzarella:
View code 🐶 ```tsx function App() { const [queryRef] = useBackgroundQuery(GET_BREEDS_QUERY); return ( Loading...}> ); } function Dog({ name, queryRef, }: { name: string; queryRef: QueryReference; }) { const { data } = useSuspenseQuery(GET_DOG_QUERY, { variables: { name }, }); return ( <> Name: {data.dog.name} Loading breeds...}> ); } function Breeds({ queryRef }: { queryRef: QueryReference }) { const { data } = useReadQuery(queryRef); return data.breeds.map(({ characteristics }) => characteristics.map((characteristic) => (
{characteristic}
)) ); } ```
For a detailed explanation of `useBackgroundQuery` and `useReadQuery`, see our [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense). #### Document transforms 📑 - [#10509](https://github.com/apollographql/apollo-client/pull/10509) [`79df2c7ba`](https://github.com/apollographql/apollo-client/commit/79df2c7ba55b7cfee69fd54024174f77099a2550) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to specify custom GraphQL document transforms. These transforms are run before reading data from the cache, before local state is resolved, and before the query document is sent through the link chain. To register a custom document transform, create a transform using the `DocumentTransform` class and pass it to the `documentTransform` option on `ApolloClient`. ```ts import { DocumentTransform } from "@apollo/client"; const documentTransform = new DocumentTransform((document) => { // do something with `document` return transformedDocument; }); const client = new ApolloClient({ documentTransform: documentTransform }); ``` For more information on the behavior and API of `DocumentTransform`, see its [reference page in our documentation](https://www.apollographql.com/docs/react/data/document-transforms). #### New `removeTypenameFromVariables` link 🔗 - [#10853](https://github.com/apollographql/apollo-client/pull/10853) [`300957960`](https://github.com/apollographql/apollo-client/commit/300957960a584920f2d346d29a0b3aaeb27d9489) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce the new `removeTypenameFromVariables` link. This link will automatically remove `__typename` fields from `variables` for all operations. This link can be configured to exclude JSON-scalars for scalars that utilize `__typename`. This change undoes some work from [#10724](https://github.com/apollographql/apollo-client/pull/10724) where `__typename` was automatically stripped for all operations with no configuration. This was determined to be a breaking change and therefore moved into this link. For a detailed explanation of `removeTypenameFromVariables`, see its [API reference](https://www.apollographql.com/docs/react/api/link/apollo-link-remove-typename). #### New `skipToken` sentinel ⏭️ - [#11112](https://github.com/apollographql/apollo-client/pull/11112) [`b4aefcfe9`](https://github.com/apollographql/apollo-client/commit/b4aefcfe97213461b9ce01946344e6a5e6d80704) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adds support for a `skipToken` sentinel that can be used as `options` in `useSuspenseQuery` and `useBackgroundQuery` to skip execution of a query. This works identically to the `skip` option but is more type-safe and as such, becomes the recommended way to skip query execution. As such, the `skip` option has been deprecated in favor of `skipToken`. We are considering the removal of the `skip` option from `useSuspenseQuery` and `useBackgroundQuery` in the next major. We are releasing with it now to make migration from `useQuery` easier and make `skipToken` more discoverable. **`useSuspenseQuery`** ```ts import { skipToken, useSuspenseQuery } from "@apollo/client"; const id: number | undefined; const { data } = useSuspenseQuery( query, id ? { variables: { id } } : skipToken ); ``` **`useBackgroundQuery`** ```ts import { skipToken, useBackgroundQuery } from "@apollo/client"; function Parent() { const [queryRef] = useBackgroundQuery( query, id ? { variables: { id } } : skipToken ); return queryRef ? : null; } function Child({ queryRef }: { queryRef: QueryReference }) { const { data } = useReadQuery(queryRef); } ``` For a detailed explanation of `skipToken`, see its [API reference](https://www.apollographql.com/docs/react/api/react/hooks/#skiptoken). #### New error extraction mechanism, smaller bundles 📉 - [#10887](https://github.com/apollographql/apollo-client/pull/10887) [`f8c0b965d`](https://github.com/apollographql/apollo-client/commit/f8c0b965d49fb7d802371bb9cc3cb0b60cf05e5d) Thanks [@phryneas](https://github.com/phryneas)! - Add a new mechanism for Error Extraction to reduce bundle size by including error message texts on an opt-in basis. By default, errors will link to an error page with the entire error message. This replaces "development" and "production" errors and works without additional bundler configuration. Bundling the text of error messages and development warnings can be enabled as follows: ```js import { loadErrorMessages, loadDevMessages } from "@apollo/client/dev"; if (process.env.NODE_ENV !== "production") { loadErrorMessages(); loadDevMessages(); } ``` For a detailed explanation, see our [reference on reducing bundle size](https://www.apollographql.com/docs/react/development-testing/reducing-bundle-size). #### New `@nonreactive` directive 🎬 - [#10722](https://github.com/apollographql/apollo-client/pull/10722) [`c7e60f83d`](https://github.com/apollographql/apollo-client/commit/c7e60f83dd1dfe07a1b6ce60d9675d3616a2ce66) Thanks [@benjamn](https://github.com/benjamn)! - Implement a `@nonreactive` directive for selectively skipping reactive comparisons of query result subtrees. The `@nonreactive` directive can be used to mark query fields or fragment spreads and is used to indicate that changes to the data contained within the subtrees marked `@nonreactive` should _not_ trigger re-rendering. This allows parent components to fetch data to be rendered by their children without re-rendering themselves when the data corresponding with fields marked as `@nonreactive` change. Consider an `App` component that fetches and renders a list of ski trails:
View code 🎿 ```jsx const TrailFragment = gql` fragment TrailFragment on Trail { name status } `; const ALL_TRAILS = gql` query allTrails { allTrails { id ...TrailFragment @nonreactive } } ${TrailFragment} `; function App() { const { data, loading } = useQuery(ALL_TRAILS); return (

Ski Trails

    {data?.trails.map((trail) => ( ))}
); } ```
The `Trail` component renders a trail's name and status and allows the user to execute a mutation to toggle the status of the trail between `"OPEN"` and `"CLOSED"`:
View code 🎿 ```jsx const Trail = ({ id }) => { const [updateTrail] = useMutation(UPDATE_TRAIL); const { data } = useFragment({ fragment: TrailFragment, from: { __typename: "Trail", id, }, }); return (
  • {data.name} - {data.status} { updateTrail({ variables: { trailId: id, status: e.target.checked ? "OPEN" : "CLOSED", }, }); }} />
  • ); }; ```
    Notice that the `Trail` component isn't receiving the entire `trail` object via props, only the `id` which is used along with the fragment document to create a live binding for each trail item in the cache. This allows each `Trail` component to react to the cache updates for a single trail independently. Updates to a trail's `status` will not cause the parent `App` component to rerender since the `@nonreactive` directive is applied to the `TrailFragment` spread, a fragment that includes the `status` field. For a detailed explanation, see our [`@nonreactive` reference](https://www.apollographql.com/docs/react/data/directives/#nonreactive) and [@alessbell](https://github.com/alessbell)'s [post on the Apollo blog about using `@nonreactive` with `useFragment`](https://www.apollographql.com/blog/apollo-client/introducing-apollo-clients-nonreactive-directive-and-usefragment-hook/). #### Abort the `AbortController` signal more granularly 🛑 - [#11040](https://github.com/apollographql/apollo-client/pull/11040) [`125ef5b2a`](https://github.com/apollographql/apollo-client/commit/125ef5b2a8fd2de1515b2bdd71785ebab3596cb2) Thanks [@phryneas](https://github.com/phryneas)! - `HttpLink`/`BatchHttpLink`: Abort the `AbortController` signal more granularly. Before this change, when `HttpLink`/`BatchHttpLink` created an `AbortController` internally, the signal would always be `.abort`ed after the request was completed. This could cause issues with Sentry Session Replay and Next.js App Router Cache invalidations, which just replayed the fetch with the same options - including the cancelled `AbortSignal`. With this change, the `AbortController` will only be `.abort()`ed by outside events, not as a consequence of the request completing. #### `useFragment` drops its experimental label 🎓 - [#10916](https://github.com/apollographql/apollo-client/pull/10916) [`ea75e18de`](https://github.com/apollographql/apollo-client/commit/ea75e18dec3db090dd4ed3b2d249bf674b90ead4) Thanks [@alessbell](https://github.com/alessbell)! - Remove experimental labels. `useFragment`, introduced in `3.7.0` as `useFragment_experimental`, is no longer an experimental API 🎉 We've removed the `_experimental` suffix from its named export and have made a number of improvements. For a detailed explanation, see our [`useFragment` reference](https://www.apollographql.com/docs/react/api/react/hooks#usefragment) and [@alessbell](https://github.com/alessbell)'s [post on the Apollo blog](https://www.apollographql.com/blog/apollo-client/introducing-apollo-clients-nonreactive-directive-and-usefragment-hook/) about using `useFragment` with `@nonreactive` for improved performance when rendering lists.
    useFragment improvements
    - [#10765](https://github.com/apollographql/apollo-client/pull/10765) [`35f36c5aa`](https://github.com/apollographql/apollo-client/commit/35f36c5aaefe1f215044e09fdf9386042bc59dd2) Thanks [@phryneas](https://github.com/phryneas)! - More robust types for the `data` property on `UseFragmentResult`. When a partial result is given, the type is now correctly set to `Partial`. - [#11083](https://github.com/apollographql/apollo-client/pull/11083) [`f766e8305`](https://github.com/apollographql/apollo-client/commit/f766e8305d9f2dbde59a61b8e70c99c4b2b67d55) Thanks [@phryneas](https://github.com/phryneas)! - Adjust the rerender timing of `useQuery` to more closely align with `useFragment`. This means that cache updates delivered to both hooks should trigger renders at relatively the same time. Previously, the `useFragment` might rerender much faster leading to some confusion. - [#10836](https://github.com/apollographql/apollo-client/pull/10836) [`6794893c2`](https://github.com/apollographql/apollo-client/commit/6794893c29cc945aa99f6fe54a9e4e70ec3e57fd) Thanks [@phryneas](https://github.com/phryneas)! - Remove the deprecated `returnPartialData` option from `useFragment` hook.

    More Minor Changes

    - [#10895](https://github.com/apollographql/apollo-client/pull/10895) [`e187866fd`](https://github.com/apollographql/apollo-client/commit/e187866fdfbbd1e1e30646f289367fb4b5afb3c3) Thanks [@Gelio](https://github.com/Gelio)! - Add generic type parameter for the entity modified in `cache.modify`. Improves TypeScript type inference for that type's fields and values of those fields. Example: ```ts cache.modify({ id: cache.identify(someBook), fields: { title: (title) => { // title has type `string`. // It used to be `any`. }, => { // author has type `Reference | Book["author"]`. // It used to be `any`. }, }, }); ``` - [#10895](https://github.com/apollographql/apollo-client/pull/10895) [`e187866fd`](https://github.com/apollographql/apollo-client/commit/e187866fdfbbd1e1e30646f289367fb4b5afb3c3) Thanks [@Gelio](https://github.com/Gelio)! - Use unique opaque types for the `DELETE` and `INVALIDATE` Apollo cache modifiers. This increases type safety, since these 2 modifiers no longer have the `any` type. Moreover, it no longer triggers [the `@typescript-eslint/no-unsafe-return` rule](https://typescript-eslint.io/rules/no-unsafe-return/). - [#10340](https://github.com/apollographql/apollo-client/pull/10340) [`4f73c5ca1`](https://github.com/apollographql/apollo-client/commit/4f73c5ca15d367aa23f02018d062f221c4506a4d) Thanks [@alessbell](https://github.com/alessbell)! - Avoid calling `useQuery` `onCompleted` for cache writes - [#10527](https://github.com/apollographql/apollo-client/pull/10527) [`0cc7e2e19`](https://github.com/apollographql/apollo-client/commit/0cc7e2e194f84e137a502395f26acdaef392ecae) Thanks [@phryneas](https://github.com/phryneas)! - Remove the `query`/`mutation`/`subscription` option from hooks that already take that value as their first argument. - [#10506](https://github.com/apollographql/apollo-client/pull/10506) [`2dc2e1d4f`](https://github.com/apollographql/apollo-client/commit/2dc2e1d4f77318d8a4c29445344b4f8c5b08b7e3) Thanks [@phryneas](https://github.com/phryneas)! - prevent accidental widening of inferred `TData` and `TVariables` generics for query hook option arguments - [#10521](https://github.com/apollographql/apollo-client/pull/10521) [`fbf729414`](https://github.com/apollographql/apollo-client/commit/fbf729414b6322a84158d9864bdfb5b17b2c7d77) Thanks [@benjamn](https://github.com/benjamn)! - Simplify `__DEV__` polyfill to use imports instead of global scope - [#10994](https://github.com/apollographql/apollo-client/pull/10994) [`2ebbd3abb`](https://github.com/apollographql/apollo-client/commit/2ebbd3abb31224ed383896ebea7c2791c9b42a22) Thanks [@phryneas](https://github.com/phryneas)! - Add .js file extensions to imports in src and dist/\*_/_.d.ts - [#11045](https://github.com/apollographql/apollo-client/pull/11045) [`9c1d4a104`](https://github.com/apollographql/apollo-client/commit/9c1d4a104d721993b5b306ca4c21724a974e098d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - When changing variables back to a previously used set of variables, do not automatically cache the result as part of the query reference. Instead, dispose of the query reference so that the `InMemoryCache` can determine the cached behavior. This means that fetch policies that would guarantee a network request are now honored when switching back to previously used variables. - [#11058](https://github.com/apollographql/apollo-client/pull/11058) [`89bf33c42`](https://github.com/apollographql/apollo-client/commit/89bf33c425d08880eeaed4584bdd56c4caf085e7) Thanks [@phryneas](https://github.com/phryneas)! - (Batch)HttpLink: Propagate `AbortError`s to the user when a user-provided `signal` is passed to the link. Previously, these links would swallow all `AbortErrors`, potentially causing queries and mutations to never resolve. As a result of this change, users are now expected to handle `AbortError`s when passing in a user-provided `signal`. - [#10346](https://github.com/apollographql/apollo-client/pull/10346) [`3bcfc42d3`](https://github.com/apollographql/apollo-client/commit/3bcfc42d394b6a97900495eacdaf58c31ae96d9f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to allow `@client` fields to be sent to the link chain. - [#10567](https://github.com/apollographql/apollo-client/pull/10567) [`c2ce6496c`](https://github.com/apollographql/apollo-client/commit/c2ce6496c10e7ae7e29d25161c2d3cef3e2c6144) Thanks [@benjamn](https://github.com/benjamn)! - Allow `ApolloCache` implementations to specify default value for `assumeImmutableResults` client option, improving performance for applications currently using `InMemoryCache` without configuring `new ApolloClient({ assumeImmutableResults: true })` - [#10915](https://github.com/apollographql/apollo-client/pull/10915) [`3a62d8228`](https://github.com/apollographql/apollo-client/commit/3a62d8228ab6c15cdb7cd4ea106d13ba3e6f0029) Thanks [@phryneas](https://github.com/phryneas)! - Changes how development-only code is bundled in the library to more reliably enable consuming bundlers to reduce production bundle sizes while keeping compatibility with non-node environments.

    Patch Changes

    - [#11086](https://github.com/apollographql/apollo-client/pull/11086) [`0264fee06`](https://github.com/apollographql/apollo-client/commit/0264fee066cb715602eda26c7c0bb1254469eccb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a call to `refetch`, `fetchMore`, or changing `skip` to `false` that returned a result deeply equal to data in the cache would get stuck in a pending state and never resolve. - [#11053](https://github.com/apollographql/apollo-client/pull/11053) [`c0ca70720`](https://github.com/apollographql/apollo-client/commit/c0ca70720cf5fbedd6e4f128b460c1995d9c55a7) Thanks [@phryneas](https://github.com/phryneas)! - Add `SuspenseCache` as a lazy hidden property on ApolloClient. This means that `SuspenseCache` is now an implementation details of Apollo Client and you no longer need to manually instantiate it and no longer need to pass it into `ApolloProvider`. Trying to instantiate a `SuspenseCache` instance in your code will now throw an error. - [#11115](https://github.com/apollographql/apollo-client/pull/11115) [`78739e3ef`](https://github.com/apollographql/apollo-client/commit/78739e3efe86f6db959dd792d21fa12e0427b12c) Thanks [@phryneas](https://github.com/phryneas)! - Enforce `export type` for all type-level exports. - [#11027](https://github.com/apollographql/apollo-client/pull/11027) [`e47cfd04e`](https://github.com/apollographql/apollo-client/commit/e47cfd04ec50cb4c19828f4d655eb0f989cdcf7d) Thanks [@phryneas](https://github.com/phryneas)! - Prevents the DevTool installation warning to be turned into a documentation link. - [#10594](https://github.com/apollographql/apollo-client/pull/10594) [`f221b5e8f`](https://github.com/apollographql/apollo-client/commit/f221b5e8fafef3970af2037218c2396ae7db505e) Thanks [@phryneas](https://github.com/phryneas)! - Add a `suspenseCache` option to `useSuspenseQuery` - [#10700](https://github.com/apollographql/apollo-client/pull/10700) [`12e37f46f`](https://github.com/apollographql/apollo-client/commit/12e37f46f17f0d5a6d408b89ebafbf7413f309ab) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `queryKey` option to `useSuspenseQuery` that allows the hook to create a unique subscription instance. - [#10724](https://github.com/apollographql/apollo-client/pull/10724) [`e285dfd00`](https://github.com/apollographql/apollo-client/commit/e285dfd003c7074383732ee23e539d7a0316af10) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Automatically strips `__typename` fields from `variables` sent to the server when using [`HttpLink`](https://www.apollographql.com/docs/react/api/link/apollo-link-http), [`BatchHttpLink`](https://www.apollographql.com/docs/react/api/link/apollo-link-batch-http), or [`GraphQLWsLink`](https://www.apollographql.com/docs/react/api/link/apollo-link-subscriptions). This allows GraphQL data returned from a query to be used as an argument to a subsequent GraphQL operation without the need to strip the `__typename` in user-space. - [#10957](https://github.com/apollographql/apollo-client/pull/10957) [`445164d21`](https://github.com/apollographql/apollo-client/commit/445164d2177efe46637a514afa6a88502d3de10f) Thanks [@phryneas](https://github.com/phryneas)! - Use `React.version` as key for shared Contexts. - [#10635](https://github.com/apollographql/apollo-client/pull/10635) [`7df51ee19`](https://github.com/apollographql/apollo-client/commit/7df51ee19a49a92f48c0f58f91894d32091cb294) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where cache updates would not propagate to `useSuspenseQuery` while in strict mode. - [#11013](https://github.com/apollographql/apollo-client/pull/11013) [`5ed2cfdaf`](https://github.com/apollographql/apollo-client/commit/5ed2cfdaf9030550d4c82200a5a690b112ad3335) Thanks [@alessbell](https://github.com/alessbell)! - Make private fields `inFlightLinkObservables` and `fetchCancelFns` protected in QueryManager in order to make types available in [`@apollo/experimental-nextjs-app-support`](https://www.npmjs.com/package/@apollo/experimental-nextjs-app-support) package when extending the `ApolloClient` class. - [#10869](https://github.com/apollographql/apollo-client/pull/10869) [`ba1d06166`](https://github.com/apollographql/apollo-client/commit/ba1d0616618ee040e9bcb20874b03d5783f7eff3) Thanks [@phryneas](https://github.com/phryneas)! - Ensure Context value stability when rerendering ApolloProvider with the same `client` and/or `suspenseCache` prop - [#11103](https://github.com/apollographql/apollo-client/pull/11103) [`e3d611daf`](https://github.com/apollographql/apollo-client/commit/e3d611daf7a014e5c92d6bed75d67b9187437eda) Thanks [@caylahamann](https://github.com/caylahamann)! - Fixes a bug in `useMutation` so that `onError` is called when an error is returned from the request with `errorPolicy` set to 'all' . - [#10657](https://github.com/apollographql/apollo-client/pull/10657) [`db305a800`](https://github.com/apollographql/apollo-client/commit/db305a8005664e9b6ec64046da230f41d293104d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Return `networkStatus` in the `useSuspenseQuery` result. - [#10937](https://github.com/apollographql/apollo-client/pull/10937) [`eea44eb87`](https://github.com/apollographql/apollo-client/commit/eea44eb87f6f296a6f9978d6ba1cf36e899c9131) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Moves `DocumentTransform` to the `utilities` sub-package to avoid a circular dependency between the `core` and `cache` sub-packages. - [#10951](https://github.com/apollographql/apollo-client/pull/10951) [`2e833b2ca`](https://github.com/apollographql/apollo-client/commit/2e833b2cacb71fc2050cb3976d0bbe710baeedff) Thanks [@alessbell](https://github.com/alessbell)! - Improve `useBackgroundQuery` type interface - [#10651](https://github.com/apollographql/apollo-client/pull/10651) [`8355d0e1e`](https://github.com/apollographql/apollo-client/commit/8355d0e1e9c1cee58cabd7df68d3ba09a3afaf6c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where `useSuspenseQuery` would not respond to cache updates when using a cache-first `fetchPolicy` after the hook was mounted with data already in the cache. - [#11026](https://github.com/apollographql/apollo-client/pull/11026) [`b8d405eee`](https://github.com/apollographql/apollo-client/commit/b8d405eee2a81df92861be5abd9bd874d7cad111) Thanks [@phryneas](https://github.com/phryneas)! - Store React.Context instance mapped by React.createContext instance, not React.version. Using `React.version` can cause problems with `preact`, as multiple versions of `preact` will all identify themselves as React `17.0.2`. - [#11000](https://github.com/apollographql/apollo-client/pull/11000) [`1d43ab616`](https://github.com/apollographql/apollo-client/commit/1d43ab6169b2b2ebfd8f86366212667f9609f5f5) Thanks [@phryneas](https://github.com/phryneas)! - Use `import * as React` everywhere. This prevents an error when importing `@apollo/client` in a React Server component. (see [#10974](https://github.com/apollographql/apollo-client/issues/10974)) - [#10852](https://github.com/apollographql/apollo-client/pull/10852) [`27fbdb3f9`](https://github.com/apollographql/apollo-client/commit/27fbdb3f9003cc304d26987cb38daf10910f2da6) Thanks [@phryneas](https://github.com/phryneas)! - Chore: Add ESLint rule for consistent type imports, apply autofix - [#10999](https://github.com/apollographql/apollo-client/pull/10999) [`c1904a78a`](https://github.com/apollographql/apollo-client/commit/c1904a78abb186f475303d632c2cb303bbd8d4f9) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug in `QueryReference` where `this.resolve` or `this.reject` might be executed even if `undefined`. - [#10940](https://github.com/apollographql/apollo-client/pull/10940) [`1d38f128f`](https://github.com/apollographql/apollo-client/commit/1d38f128f325ea7092bd04fe3799ebbb6e8bdfdd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for the `skip` option in `useBackgroundQuery` and `useSuspenseQuery`. Setting this option to `true` will avoid a network request. - [#10672](https://github.com/apollographql/apollo-client/pull/10672) [`932252b0c`](https://github.com/apollographql/apollo-client/commit/932252b0c54792ec8c5095de1b42c005a91ffe6d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the compatibility between `useSuspenseQuery` and React's `useDeferredValue` and `startTransition` APIs to allow React to show stale UI while the changes to the variable cause the component to suspend. #### Breaking change `nextFetchPolicy` support has been removed from `useSuspenseQuery`. If you are using this option, remove it, otherwise it will be ignored. - [#10964](https://github.com/apollographql/apollo-client/pull/10964) [`f33171506`](https://github.com/apollographql/apollo-client/commit/f331715066d65291b1f5df5e6fa2b6618dfc70b1) Thanks [@alessbell](https://github.com/alessbell)! - Fixes a bug in `BatchHttpLink` that removed variables from all requests by default. - [#10633](https://github.com/apollographql/apollo-client/pull/10633) [`90a06eeeb`](https://github.com/apollographql/apollo-client/commit/90a06eeeb5a50eb172f5c6211693ea051897d8f3) Thanks [@benjamn](https://github.com/benjamn)! - Fix type policy inheritance involving fuzzy `possibleTypes` - [#10754](https://github.com/apollographql/apollo-client/pull/10754) [`64b304862`](https://github.com/apollographql/apollo-client/commit/64b3048621de35bbfe9bdf47785a2d5583232830) Thanks [@sincraianul](https://github.com/sincraianul)! - Fix `includeUnusedVariables` option not working with `BatchHttpLink` - [#11018](https://github.com/apollographql/apollo-client/pull/11018) [`5618953f3`](https://github.com/apollographql/apollo-client/commit/5618953f332a10c7df1b385126ec714aa5809c48) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useBackgroundQuery` now uses its own options type called `BackgroundQueryHookOptions` rather than reusing `SuspenseQueryHookOptions`. - [#11035](https://github.com/apollographql/apollo-client/pull/11035) [`a3ab7456d`](https://github.com/apollographql/apollo-client/commit/a3ab7456d59be4a7beb58d0aff6d431c603448f5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Incrementally re-render deferred queries after calling `refetch` or setting `skip` to `false` to match the behavior of the initial fetch. Previously, the hook would not re-render until the entire result had finished loading in these cases. - [#10399](https://github.com/apollographql/apollo-client/pull/10399) [`652a1ae08`](https://github.com/apollographql/apollo-client/commit/652a1ae0868e4a5b75b9ff656d26f57eeca1081a) Thanks [@alessbell](https://github.com/alessbell)! - Silence useLayoutEffect warning when useSuspenseQuery runs on server - [#10919](https://github.com/apollographql/apollo-client/pull/10919) [`f796ce1ac`](https://github.com/apollographql/apollo-client/commit/f796ce1ac72f31a951a1d0f0b78d19dd039a6398) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue when using a link that relied on `operation.getContext` and `operation.setContext` would error out when it was declared after the `removeTypenameFromVariables` link. - [#10968](https://github.com/apollographql/apollo-client/pull/10968) [`b102390b2`](https://github.com/apollographql/apollo-client/commit/b102390b238e5ce083062541d98a00fc3a10e1e1) Thanks [@phryneas](https://github.com/phryneas)! - Use printed query for query deduplication. Cache `print` calls for GraphQL documents to speed up repeated operations. - [#11071](https://github.com/apollographql/apollo-client/pull/11071) [`4473e925a`](https://github.com/apollographql/apollo-client/commit/4473e925ac5d6a53dc2b34867f034eda1b05aa00) Thanks [@jerelmiller](https://github.com/jerelmiller)! - [#10509](https://github.com/apollographql/apollo-client/pull/10509) introduced some helpers for determining the type of operation for a GraphQL query. This imported the `OperationTypeNode` from graphql-js which is not available in GraphQL 14. To maintain compatibility with graphql-js v14, this has been reverted to use plain strings. - [#10766](https://github.com/apollographql/apollo-client/pull/10766) [`ffb179e55`](https://github.com/apollographql/apollo-client/commit/ffb179e5553fa6f9156ae0aaf782dfcbec7d08c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - More robust typings for the `data` property returned from `useSuspenseQuery` when using `returnPartialData: true` or an `errorPolicy` of `all` or `ignore`. `TData` now defaults to `unknown` instead of `any`. - [#10401](https://github.com/apollographql/apollo-client/pull/10401) [`3e5b41a75`](https://github.com/apollographql/apollo-client/commit/3e5b41a751673bb2120c0b624e22afd3b7b860e5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Always throw network errors in `useSuspenseQuery` regardless of the set `errorPolicy`. - [#10877](https://github.com/apollographql/apollo-client/pull/10877) [`f40248598`](https://github.com/apollographql/apollo-client/commit/f402485985cc2551b51602c0bff213b7ffb856b9) Thanks [@phryneas](https://github.com/phryneas)! - Change an import in `useQuery` and `useMutation` that added an unnecessary runtime dependency on `@apollo/client/core`. This drastically reduces the bundle size of each the hooks. - [#10656](https://github.com/apollographql/apollo-client/pull/10656) [`54c4d2f3c`](https://github.com/apollographql/apollo-client/commit/54c4d2f3c719654e38e537ec38f1cb415c7c3f58) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `refetch`, `fetchMore`, and `subscribeToMore` functions returned by `useSuspenseQuery` are referentially stable between renders, even as `data` is updated. - [#10324](https://github.com/apollographql/apollo-client/pull/10324) [`95eb228be`](https://github.com/apollographql/apollo-client/commit/95eb228bedc193a520604e351d1c455bfbedef06) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@defer` support to `useSuspenseQuery`. - [#10888](https://github.com/apollographql/apollo-client/pull/10888) [`1562a2f5a`](https://github.com/apollographql/apollo-client/commit/1562a2f5a91cf577d9c89c4e84088a6bccc73c28) Thanks [@alessbell](https://github.com/alessbell)! - Updates dependency versions in `package.json` by bumping: - `@wry/context` to `^0.7.3` - `@wry/equality` to `^0.5.6` - `@wry/trie` to `^0.4.3` - `optimism` to `^0.17.4` to 1. [fix sourcemap warnings](https://github.com/benjamn/wryware/pull/497) and 2. a Codesandbox [sandpack (in-browser) bundler transpilation bug](https://github.com/codesandbox/sandpack/issues/940) with an [upstream optimism workaround](https://github.com/benjamn/optimism/pull/550). - [#11010](https://github.com/apollographql/apollo-client/pull/11010) [`1051a9c88`](https://github.com/apollographql/apollo-client/commit/1051a9c888ba86511b7fcb80a26d3b3050359258) Thanks [@alessbell](https://github.com/alessbell)! - Hide queryRef in a Symbol in `useBackgroundQuery`s return value. - [#10758](https://github.com/apollographql/apollo-client/pull/10758) [`9def7421f`](https://github.com/apollographql/apollo-client/commit/9def7421f3d028c91fcaa7971878b3da8281424d) Thanks [@phryneas](https://github.com/phryneas)! - use `React.use` where available - [#11032](https://github.com/apollographql/apollo-client/pull/11032) [`6a4da900a`](https://github.com/apollographql/apollo-client/commit/6a4da900a1bc5da3524caabd64bb30945e66f675) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw errors in `useSuspenseQuery` for errors returned in incremental chunks when `errorPolicy` is `none`. This provides a more consistent behavior of the `errorPolicy` in the hook. #### Potentially breaking change Previously, if you issued a query with `@defer` and relied on `errorPolicy: 'none'` to set the `error` property returned from `useSuspenseQuery` when the error was returned in an incremental chunk, this error is now thrown. Switch the `errorPolicy` to `all` to avoid throwing the error and instead return it in the `error` property. - [#10960](https://github.com/apollographql/apollo-client/pull/10960) [`ee407ef97`](https://github.com/apollographql/apollo-client/commit/ee407ef97317bf29c554732237aaf11552e06b01) Thanks [@alessbell](https://github.com/alessbell)! - Adds support for `returnPartialData` and `refetchWritePolicy` options in `useBackgroundQuery` hook. - [#10809](https://github.com/apollographql/apollo-client/pull/10809) [`49d28f764`](https://github.com/apollographql/apollo-client/commit/49d28f764980d132089ef8f6beca6e766b6120c0) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixed the ability to use `refetch` and `fetchMore` with React's `startTransition`. The hook will now behave correctly by allowing React to avoid showing the Suspense fallback when these functions are wrapped by `startTransition`. This change deprecates the `suspensePolicy` option in favor of `startTransition`. - [#11082](https://github.com/apollographql/apollo-client/pull/11082) [`0f1cde3a2`](https://github.com/apollographql/apollo-client/commit/0f1cde3a207699edb742dfaada817a815488d594) Thanks [@phryneas](https://github.com/phryneas)! - Restore Apollo Client 3.7 `getApolloContext` behaviour - [#10969](https://github.com/apollographql/apollo-client/pull/10969) [`525a9317a`](https://github.com/apollographql/apollo-client/commit/525a9317af729309f699fd6f8b787647a5f63eac) Thanks [@phryneas](https://github.com/phryneas)! - Slightly decrease bundle size and memory footprint of `SuspenseCache` by changing how cache entries are stored internally. - [#11025](https://github.com/apollographql/apollo-client/pull/11025) [`6092b6edf`](https://github.com/apollographql/apollo-client/commit/6092b6edf67ef311954c18c778ed0bdca1b77258) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useSuspenseQuery` and `useBackgroundQuery` will now properly apply changes to its options between renders. - [#10872](https://github.com/apollographql/apollo-client/pull/10872) [`96b4f8837`](https://github.com/apollographql/apollo-client/commit/96b4f8837881db67e951272b775dc62282e50d49) Thanks [@phryneas](https://github.com/phryneas)! - The "per-React-Version-Singleton" ApolloContext is now stored on `globalThis`, not `React.createContext`, and throws an error message when accessed from React Server Components. - [#10450](https://github.com/apollographql/apollo-client/pull/10450) [`f8bc33387`](https://github.com/apollographql/apollo-client/commit/f8bc33387f66e28456aede53bae75694c9a7a45f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add support for the `subscribeToMore` and `client` fields returned in the `useSuspenseQuery` result.
    ## 3.7.17 ### Patch Changes - [#10631](https://github.com/apollographql/apollo-client/pull/10631) [`b93388d75`](https://github.com/apollographql/apollo-client/commit/b93388d7582d88859c4975dff524c1ceb5bd2b4e) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery.getCurrentResult: skip the cache if the running query should not access the cache ## 3.7.16 ### Patch Changes - [#10806](https://github.com/apollographql/apollo-client/pull/10806) [`cb1540504`](https://github.com/apollographql/apollo-client/commit/cb15405041e0bd644fcf23d1b8fcaa09762c5a6a) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug in `PersistedQueryLink` that would cause it to permanently skip persisted queries after a 400 or 500 status code. - [#10807](https://github.com/apollographql/apollo-client/pull/10807) [`b32369592`](https://github.com/apollographql/apollo-client/commit/b3236959269ce27b18b8c2cae72106098a3ba1b8) Thanks [@phryneas](https://github.com/phryneas)! - `PersistedQueryLink` will now also check for error codes in `extensions`. - [#10982](https://github.com/apollographql/apollo-client/pull/10982) [`b9be7a814`](https://github.com/apollographql/apollo-client/commit/b9be7a814a64fc6b3e6ce23dd97a4f0c7140aba7) Thanks [@sdeleur-sc](https://github.com/sdeleur-sc)! - Update `relayStylePagination` to avoid populating `startCursor` when only a single cursor is present under the `edges` field. Use that cursor only as the `endCursor`. - [#10962](https://github.com/apollographql/apollo-client/pull/10962) [`772cfa3cb`](https://github.com/apollographql/apollo-client/commit/772cfa3cb563dccee878177e58c8250c4e5b5013) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `useGETForQueries` option in `BatchHttpLink.Options` type since it is not supported. ## 3.7.15 ### Patch Changes - [#10891](https://github.com/apollographql/apollo-client/pull/10891) [`ab42a5c08`](https://github.com/apollographql/apollo-client/commit/ab42a5c08840193cb915f4e66d71fac3834fec68) Thanks [@laverdet](https://github.com/laverdet)! - Fixes a bug in how multipart responses are read when using `@defer`. When reading a multipart body, `HttpLink` no longer attempts to parse the boundary (e.g. `"---"` or other boundary string) within the response data itself, only when reading the beginning of each mulitpart chunked message. - [#10789](https://github.com/apollographql/apollo-client/pull/10789) [`23a4e1578`](https://github.com/apollographql/apollo-client/commit/23a4e15786fe99658d741585366f3b02bcffb97f) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where other fields could be aliased to `__typename` or `id`, in which case an incoming result would be merged into the wrong cache entry. ## 3.7.14 ### Patch Changes - [#10764](https://github.com/apollographql/apollo-client/pull/10764) [`1b0a61fe5`](https://github.com/apollographql/apollo-client/commit/1b0a61fe5a6593f319da26fec8692359232ccf9b) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate `useFragment` `returnPartialData` option - [#10810](https://github.com/apollographql/apollo-client/pull/10810) [`a6252774f`](https://github.com/apollographql/apollo-client/commit/a6252774f43fd9a4be9c50b48b7a6d5a1c8e64ec) Thanks [@dleavitt](https://github.com/dleavitt)! - Fix type signature of `ServerError`. In <3.7 `HttpLink` and `BatchHttpLink` would return a `ServerError.message` of e.g. `"Unexpected token 'E', \"Error! Foo bar\" is not valid JSON"` and a `ServerError.result` of `undefined` in the case where a server returned a >= 300 response code with a response body containing a string that could not be parsed as JSON. In >=3.7, `message` became e.g. `Response not successful: Received status code 302` and `result` became the string from the response body, however the type in `ServerError.result` was not updated to include the `string` type, which is now properly reflected. ## 3.7.13 ### Patch Changes - [#10805](https://github.com/apollographql/apollo-client/pull/10805) [`a5503666c`](https://github.com/apollographql/apollo-client/commit/a5503666c2cc8220ac1d877e3296556e54e58ff6) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential memory leak in SSR scenarios when many `persistedQuery` instances were created over time. - [#10718](https://github.com/apollographql/apollo-client/pull/10718) [`577c68bdd`](https://github.com/apollographql/apollo-client/commit/577c68bdd26519f8341fd1188ea4b8aabe357856) Thanks [@Hsifnus](https://github.com/Hsifnus)! - Delay Concast subscription teardown slightly in `useSubscription` to prevent unexpected Concast teardown when one `useSubscription` hook tears down its in-flight Concast subscription immediately followed by another `useSubscription` hook reusing and subscribing to that same Concast ## 3.7.12 ### Patch Changes - [#10735](https://github.com/apollographql/apollo-client/pull/10735) [`895bcdcff`](https://github.com/apollographql/apollo-client/commit/895bcdcff146bc4575c8f3423c30fa9e885be16b) Thanks [@alessbell](https://github.com/alessbell)! - If a multipart chunk contains only `hasNext: false`, immediately complete the observable. ## 3.7.11 ### Patch Changes - [#10586](https://github.com/apollographql/apollo-client/pull/10586) [`4175af594`](https://github.com/apollographql/apollo-client/commit/4175af59419dbb698c32c074f44229f3a5b3b83d) Thanks [@alessbell](https://github.com/alessbell)! - Improve WebSocket error handling for generic `Event` received on error. For more information see [https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/error_event](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/error_event). - [#10411](https://github.com/apollographql/apollo-client/pull/10411) [`152baac34`](https://github.com/apollographql/apollo-client/commit/152baac343b8b68c7a2d4691d5dc60d9e43e62bb) Thanks [@lovasoa](https://github.com/lovasoa)! - Simplify error message generation and make 'undefined' an impossible message string. - [#10592](https://github.com/apollographql/apollo-client/pull/10592) [`cdb98ae08`](https://github.com/apollographql/apollo-client/commit/cdb98ae082ae4c7da6cd6a0fd5ad8457810fceda) Thanks [@alessbell](https://github.com/alessbell)! - Adds support for multipart subscriptions in `HttpLink`. - [#10698](https://github.com/apollographql/apollo-client/pull/10698) [`38508a251`](https://github.com/apollographql/apollo-client/commit/38508a251423057fd8a0df50230f50e0a5dde5fd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the behavior of `useLazyQuery` introduced in [#10427](https://github.com/apollographql/apollo-client/pull/10427) where unmounting a component before a query was resolved would reject the promise with an abort error. Instead, the promise will now resolve naturally with the result from the request. Other notable fixes: - Kicking off multiple requests in parallel with the execution function will now ensure each returned promise is resolved with the data from its request. Previously, each promise was resolved with data from the last execution. - Re-rendering `useLazyQuery` with a different query document will now ensure the execution function uses the updated query document. Previously, only the query document rendered the first time would be used for the request. - [#10660](https://github.com/apollographql/apollo-client/pull/10660) [`364bee98f`](https://github.com/apollographql/apollo-client/commit/364bee98fe193a7915664c1a5b206fd52793f85a) Thanks [@alessbell](https://github.com/alessbell)! - Upgrades TypeScript to v5. This change is fully backward-compatible and transparent to users. - [#10597](https://github.com/apollographql/apollo-client/pull/10597) [`8fb9d190d`](https://github.com/apollographql/apollo-client/commit/8fb9d190dbf48147412517643e3e425a7d48c49c) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where an incoming cache update could prevent future updates from the active link. - [#10629](https://github.com/apollographql/apollo-client/pull/10629) [`02605bb3c`](https://github.com/apollographql/apollo-client/commit/02605bb3c9e148bf87a6e52b4a9ecc7d523ef9f6) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery`: delay unsubscribe to fix race conditions ## 3.7.10 ### Patch Changes - [#9438](https://github.com/apollographql/apollo-client/pull/9438) [`52a9c8ea1`](https://github.com/apollographql/apollo-client/commit/52a9c8ea1ac08ee53fe1ddbd4ded899ea00a1f9f) Thanks [@dciesielkiewicz](https://github.com/dciesielkiewicz)! - Ensure the `client` option passed to `useMutation`'s execute function is used when provided. Previously this option was ignored. - [#9124](https://github.com/apollographql/apollo-client/pull/9124) [`975b923c0`](https://github.com/apollographql/apollo-client/commit/975b923c0c0e7ddc8553917a91981e9f41713bc1) Thanks [@andrebrantom](https://github.com/andrebrantom)! - Make `ApolloClient.writeQuery` and `ApolloClient.writeFragment` behave more like `cache.writeQuery` and `cache.writeFragment` by returning the reference returned by the cache. ## 3.7.9 ### Patch Changes - [#10560](https://github.com/apollographql/apollo-client/pull/10560) [`a561ecf43`](https://github.com/apollographql/apollo-client/commit/a561ecf4306c56770ba0713f0136174275887f1a) Thanks [@benjamn](https://github.com/benjamn)! - Keep `__typename` fragment when it does not contain `@client` directive and strip out inline fragments which use a `@client` directive. Thanks @Gazler and @mtsmfm! - [#10560](https://github.com/apollographql/apollo-client/pull/10560) [`251a12806`](https://github.com/apollographql/apollo-client/commit/251a12806d1fa38bc8723540fb2d696c39db1097) Thanks [@benjamn](https://github.com/benjamn)! - Refactor `removeDirectivesFromDocument` to fix AST ordering sensitivities and avoid 1/3 AST traversals, potentially improving performance for large queries ## 3.7.8 ### Patch Changes - [#7555](https://github.com/apollographql/apollo-client/pull/7555) [`45562d6fa`](https://github.com/apollographql/apollo-client/commit/45562d6fa20eab658bd86d79d092862ace4e1225) Thanks [@TheCeloReis](https://github.com/TheCeloReis)! - Adds `TVariables` generic to `GraphQLRequest` and `MockedResponse` interfaces. - [#10526](https://github.com/apollographql/apollo-client/pull/10526) [`1d13de4f1`](https://github.com/apollographql/apollo-client/commit/1d13de4f190150e96d61a9e987274ee6c249dbef) Thanks [@benjamn](https://github.com/benjamn)! - Tolerate undefined `concast.sources` if `complete` called earlier than `concast.start` - [#10497](https://github.com/apollographql/apollo-client/pull/10497) [`8a883d8a1`](https://github.com/apollographql/apollo-client/commit/8a883d8a1c8899f94a3e2ae09cb2069bde2b2150) Thanks [@nevir](https://github.com/nevir)! - Update `SingleExecutionResult` and `IncrementalPayload`'s `data` types such that they no longer include `undefined`, which was not a valid runtime value, to fix errors when TypeScript's `exactOptionalPropertyTypes` is enabled. ## 3.7.7 ### Patch Changes - [#10502](https://github.com/apollographql/apollo-client/pull/10502) [`315faf9ca`](https://github.com/apollographql/apollo-client/commit/315faf9ca5b326852919ab7fc2082d6ba92bcb59) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Log a warning to the console when a mock passed to `MockedProvider` or `MockLink` cannot be matched to a query during a test. This makes it easier to debug user errors in the mock setup, such as typos, especially if the query under test is using an `errorPolicy` set to `ignore`, which makes it difficult to know that a match did not occur. - [#10499](https://github.com/apollographql/apollo-client/pull/10499) [`9e54f5dfa`](https://github.com/apollographql/apollo-client/commit/9e54f5dfa05fd363e534c432ba8c569bb96a6e35) Thanks [@phryneas](https://github.com/phryneas)! - Allow the execution function returned by `useLazyQuery` to change the query. - [#10362](https://github.com/apollographql/apollo-client/pull/10362) [`14a56b105`](https://github.com/apollographql/apollo-client/commit/14a56b105fefcbb2ce5daa9fd6924e5decafcc16) Thanks [@mccraveiro](https://github.com/mccraveiro)! - Fix error when server returns an error and we are also querying for a local field ## 3.7.6 ### Patch Changes - [#10470](https://github.com/apollographql/apollo-client/pull/10470) [`47435e879`](https://github.com/apollographql/apollo-client/commit/47435e879ebc867d9fc3de5b6fd5785204b4dbd4) Thanks [@alessbell](https://github.com/alessbell)! - Bumps TypeScript to `4.9.4` (previously `4.7.4`) and updates types to account for changes in TypeScript 4.8 by [propagating contstraints on generic types](https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#unconstrained-generics-no-longer-assignable-to). Technically this makes some types stricter as attempting to pass `null|undefined` into certain functions is now disallowed by TypeScript, but these were never expected runtime values in the first place. This should only affect you if you are wrapping functions provided by Apollo Client with your own abstractions that pass in their generics as type arguments, in which case you might get an error like `error TS2344: Type 'YourGenericType' does not satisfy the constraint 'OperationVariables'`. In that case, make sure that `YourGenericType` is restricted to a type that only accepts objects via `extends`, like `Record` or `@apollo/client`'s `OperationVariables`: ```diff import { QueryHookOptions, QueryResult, useQuery, + OperationVariables, } from '@apollo/client'; - export function useWrappedQuery( + export function useWrappedQuery( query: DocumentNode, queryOptions: QueryHookOptions ): QueryResult { const [execute, result] = useQuery(query); } ``` - [#10408](https://github.com/apollographql/apollo-client/pull/10408) [`55ffafc58`](https://github.com/apollographql/apollo-client/commit/55ffafc585e9eb66314755b4f40804b8b8affb13) Thanks [@zlrlo](https://github.com/zlrlo)! - fix: modify BatchHttpLink to have a separate timer for each different batch key - [#9573](https://github.com/apollographql/apollo-client/pull/9573) [`4a4f48dda`](https://github.com/apollographql/apollo-client/commit/4a4f48dda8dd290ef110aed9e4e73d0c1c977c31) Thanks [@vladar](https://github.com/vladar)! - Improve performance of local resolvers by only executing selection sets that contain an `@client` directive. Previously, local resolvers were executed even when the field did not contain `@client`. While the result was properly discarded, the unncessary work could negatively affect query performance, sometimes signficantly. ## 3.7.5 ### Patch Changes - [#10458](https://github.com/apollographql/apollo-client/pull/10458) [`b5ccef229`](https://github.com/apollographql/apollo-client/commit/b5ccef229046d230e82a68a4834ac09ae1ef2009) Thanks [@lennyburdette](https://github.com/lennyburdette)! - Passes `getServerSnapshot` to `useSyncExternalStore` so that it doesn't trigger a `Missing getServerSnapshot` error when using `useFragment_experimental` on the server. - [#10471](https://github.com/apollographql/apollo-client/pull/10471) [`895ddcb54`](https://github.com/apollographql/apollo-client/commit/895ddcb546b5692cd53caae1b604412728641374) Thanks [@alessbell](https://github.com/alessbell)! - More robust type definition for `headers` property passed to `createHttpLink` - [#10321](https://github.com/apollographql/apollo-client/pull/10321) [`bbaa3ef2d`](https://github.com/apollographql/apollo-client/commit/bbaa3ef2d95a03e2453ef86a25096c314fbd8998) Thanks [@alessbell](https://github.com/alessbell)! - Refetch should not return partial data with `errorPolicy: none` and `notifyOnNetworkStatusChange: true`. - [#10402](https://github.com/apollographql/apollo-client/pull/10402) [`0b07aa955`](https://github.com/apollographql/apollo-client/commit/0b07aa955bab2e929f21590b565507a66f930539) Thanks [@Hugodby](https://github.com/Hugodby)! - Improve context types - [#10469](https://github.com/apollographql/apollo-client/pull/10469) [`328c58f90`](https://github.com/apollographql/apollo-client/commit/328c58f90d3fd985a58a68d8ba07f7c03f9808f6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add generic type defaults when using `useFragment` to allow passing `TData` directly to the function without needing to specify `TVars`. ## 3.7.4 ### Patch Changes - [#10427](https://github.com/apollographql/apollo-client/pull/10427) [`28d909cff`](https://github.com/apollographql/apollo-client/commit/28d909cff086f8352e2ea75421a1cac590917573) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure in-flight promises executed by `useLazyQuery` are rejected when `useLazyQuery` unmounts. - [#10383](https://github.com/apollographql/apollo-client/pull/10383) [`5c5ca9b01`](https://github.com/apollographql/apollo-client/commit/5c5ca9b01a2b9905f94de85e5b80ffc29522e2e3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `onError` callback is called when the `errorPolicy` is set to "all" and partial data is returned. - [#10425](https://github.com/apollographql/apollo-client/pull/10425) [`86e35a6d2`](https://github.com/apollographql/apollo-client/commit/86e35a6d25e9838f39a9de652e52a358b9c08488) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prefer the `onError` and `onCompleted` callback functions passed to the execute function returned from `useMutation` instead of calling both callback handlers. ## 3.7.3 ### Patch Changes - [#10334](https://github.com/apollographql/apollo-client/pull/10334) [`7d923939d`](https://github.com/apollographql/apollo-client/commit/7d923939dd7e6db7d69f04f598c666104b076e78) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Better handle deferred queries that have cached or partial cached data for them - [#10368](https://github.com/apollographql/apollo-client/pull/10368) [`46b58e976`](https://github.com/apollographql/apollo-client/commit/46b58e9762abbffaee5c9abda8e309bea6d7a785) Thanks [@alessbell](https://github.com/alessbell)! - Fix: unblocks support for defer in mutations If the `@defer` directive is present in the document passed to `mutate`, the Promise will resolve with the final merged data after the last multipart chunk has arrived in the response. ## 3.7.2 ### Patch Changes - Only show dev tools suggestion in the console when `connectToDevTools` is `true`.
    [@chris110408](https://github.com/chris110408) in [#10258](https://github.com/apollographql/apollo-client/pull/10258) - Pass `TCache` generic to `MutationHookOptions` for better type support in `useMutation`.
    [@igrlk](https://github.com/igrlk) in [#10223](https://github.com/apollographql/apollo-client/pull/10223) - Add `name` property to `ApolloError` to ensure better type safety and help error reporting tools better identify the error.
    [@aaronadamsCA](https://github.com/aaronadamsCA) in [#9323](https://github.com/apollographql/apollo-client/pull/9323) - Export a `ModifierDetails` type for the `details` parameter of a `Modifier` function.
    [@KeithGillette](https://github.com/KeithGillette) in [#7133](https://github.com/apollographql/apollo-client/pull/7133) - Revert use of `cloneDeep` to clone options when fetching queries.
    [@MrDoomBringer](https://github.com/MrDoomBringer) in [#10215](https://github.com/apollographql/apollo-client/pull/10215) ## 3.7.1 ### Patch Changes - Fix issue where `loading` remains `true` after `observer.refetch` is called repeatedly with different variables when the same data are returned.
    [@alessbell](https://github.com/alessbell) in [#10143](https://github.com/apollographql/apollo-client/pull/10143) - Fix race condition where `useFragment_experimental` could receive cache updates before initially calling `cache.watch` in `useEffect`.
    [@benjamn](https://github.com/benjamn) in [#10212](https://github.com/apollographql/apollo-client/pull/10212) ## 3.7.0 ### Minor Changes - Implement preview support for the [`@defer` directive](https://github.com/graphql/graphql-spec/pull/742).
    [@alessbell](https://github.com/alessbell) and [@benjamn](https://github.com/benjamn) in [#10018](https://github.com/apollographql/apollo-client/pull/10018) - Implement `useFragment_experimental` hook, which represents a lightweight live binding into the `ApolloCache`, and never triggers network requests of its own.
    [@benjamn](https://github.com/benjamn) in [#8782](https://github.com/apollographql/apollo-client/pull/8782) - Allow registering named fragments with `InMemoryCache` to support using `...NamedFragment` in queries without redeclaring `NamedFragment` repeatedly in every query that uses it.
    [@benjamn](https://github.com/benjamn) in [#9764](https://github.com/apollographql/apollo-client/pull/9764) - Support `onError` callback for `useSubscription` hook.
    [@jeroenvisser101](https://github.com/jeroenvisser101) in [#9495](https://github.com/apollographql/apollo-client/pull/9495) - Implement `preserveHeaderCase` option for `http` context object, enabling preserved header capitalization for non-http-spec-compliant servers.
    [@mrdoombringer](https://github.com/mrdoombringer) in [#9891](https://github.com/apollographql/apollo-client/pull/9891) ### Patch Changes - Delay calling `onCompleted` and `onError` callbacks passed to `useQuery` using `Promise.resolve().then(() => ...)` to fix issue [#9794](https://github.com/apollographql/apollo-client/pull/9794).
    [@dylanwulf](https://github.com/dylanwulf) in [#9823](https://github.com/apollographql/apollo-client/pull/9823) - Replace `concast.cleanup` method with simpler `concast.beforeNext` API, which promises to call the given callback function just before the next result/error is delivered. In addition, `concast.removeObserver` no longer takes a `quietly?: boolean` parameter, since that parameter was partly responsible for cleanup callbacks sometimes not getting called.
    [@benjamn](https://github.com/benjamn) in [#9718](https://github.com/apollographql/apollo-client/pull/9718) - Allow preserving header name capitalization when creating an `HttpLink` with `createHttpLink({ uri, preserveHeaderCase: true })`. Otherwise, header names are converted to lowercase to prevent case-sensitivity bugs.
    [@MrDoomBringer](https://github.com/MrDoomBringer) in [#9891](https://github.com/apollographql/apollo-client/pull/9891) - Make queries with a `pollInterval` respect the `no-cache` fetch policy, instead of writing polled results into the cache.
    [@MrDoomBringer](https://github.com/MrDoomBringer) in [#10020](https://github.com/apollographql/apollo-client/pull/10020) - Deprecate the `onSubscriptionData` callback in favor of a new `onData` callback for the `useSubscription` hook. Deprecate the `onSubscriptionComplete` callback in favor of a new `onComplete` callback for the `useSubscription` hook.
    [@jerelmiller](https://github.com/jerelmiller) in [#10134](https://github.com/apollographql/apollo-client/pull/10134) ### Potentially disruptive - The optional `subscribeAndCount` testing utility exported from `@apollo/client/testing/core` now takes a single generic `TResult` type parameter, instead of `TData`. This type will typically be inferred from the `observable` argument type, but if you have any explicit calls to `subscribeAndCount(...)` in your own codebase, you may need to adjust those calls accordingly.
    [@benjamn](https://github.com/benjamn) in [#9718](https://github.com/apollographql/apollo-client/pull/9718) ## Apollo Client 3.6.10 (2022-09-29) ### Improvements - The client options (`variables`, `context`, etc.) used for `mutation` calls are now available as the second argument to the `onCompleted` and `onError` callback functions.
    [@MrDoomBringer](https://github.com/MrDoomBringer) in [#10052](https://github.com/apollographql/apollo-client/pull/10052) ## Apollo Client 3.6.9 (2022-06-21) ### Bug Fixes - Leave `fetchPolicy` unchanged when `skip: true` (or in standby) and `nextFetchPolicy` is available, even if `variables` change.
    [@benjamn](https://github.com/benjamn) in [#9823](https://github.com/apollographql/apollo-client/pull/9823) ## Apollo Client 3.6.8 (2022-06-10) ### Bug Fixes - Fix incorrect `variables` passed in `FieldFunctionOptions` for nested `readField` calls in `read` and `merge` functions.
    [@stardustxx](https://github.com/stardustxx) in [#9808](https://github.com/apollographql/apollo-client/pull/9808) - Improve repository build scripts to work better on Windows.
    [@dylanwulf](https://github.com/dylanwulf) in [#9805](https://github.com/apollographql/apollo-client/pull/9805) - Ensure `useQuery(query, { skip: true }).called === false` rather than always returning `called` as `true`.
    [@KucharskiPiotr](https://github.com/KucharskiPiotr) in [#9798](https://github.com/apollographql/apollo-client/pull/9798) - Allow abandoned `reobserve` requests to unsubscribe from their underlying `Observable`.
    [@javier-garcia-meteologica](https://github.com/javier-garcia-meteologica) in [#9791](https://github.com/apollographql/apollo-client/pull/9791) ## Apollo Client 3.6.7 (2022-06-10) ### Bug Fixes - Fix regression (introduced in v3.6.0) that caused `BatchHttpLink` to discard pending batched queries on early completion of the underlying `Observable`.
    [@benjamn](https://github.com/benjamn) in [#9793](https://github.com/apollographql/apollo-client/pull/9793) ## Apollo Client 3.6.6 (2022-05-26) ### Bug Fixes - Allow `useLazyQuery(query, { defaultOptions })` to benefit from `defaultOptions.variables` and `client.defaultOptions.watchQuery.variables` merging.
    [@benjamn](https://github.com/benjamn) in [#9762](https://github.com/apollographql/apollo-client/pull/9762) ## Apollo Client 3.6.5 (2022-05-23) ### Bug Fixes - Restore pre-v3.6 `variables` replacement behavior of `ObservableQuery#reobserve` method, fixing a regression that prevented removal of variables.
    [@benjamn](https://github.com/benjamn) in [#9741](https://github.com/apollographql/apollo-client/pull/9741) - Preserve `previousData` even when different query or client provided to `useQuery`, instead of resetting `previousData` to undefined in those cases, matching behavior prior to v3.6.0.
    [@benjamn](https://github.com/benjamn) in [#9734](https://github.com/apollographql/apollo-client/pull/9734) - Fix bug where `onCompleted()` and `onError()` are stale for `useMutation()`.
    [@charle692](https://github.com/charle692) in [#9740](https://github.com/apollographql/apollo-client/pull/9740) - Limit scope of `DeepMerger` object reuse, and avoid using `Object.isFrozen`, which can introduce differences between development and production if objects that were frozen using `Object.freeze` in development are left unfrozen in production.
    [@benjamn](https://github.com/benjamn) in [#9742](https://github.com/apollographql/apollo-client/pull/9742) - Properly merge `variables` from original `useLazyQuery(query, { variables })` with `variables` passed to execution function.
    [@benjamn](https://github.com/benjamn) in [#9758](https://github.com/apollographql/apollo-client/pull/9758) ## Apollo Client 3.6.4 (2022-05-16) ### Bug Fixes - Guarantee `Concast` cleanup without `Observable cancelled prematurely` rejection, potentially solving long-standing issues involving that error.
    [@benjamn](https://github.com/benjamn) in [#9701](https://github.com/apollographql/apollo-client/pull/9701) - Ensure `useSubscription` subscriptions are properly restarted after unmounting/remounting by React 18 in ``.
    [@kazekyo](https://github.com/kazekyo) in [#9707](https://github.com/apollographql/apollo-client/pull/9707) ### Improvements - Internalize `useSyncExternalStore` shim, for more control than `use-sync-external-store` provides, fixing some React Native issues.
    [@benjamn](https://github.com/benjamn) in [#9675](https://github.com/apollographql/apollo-client/pull/9675) and [#9709](https://github.com/apollographql/apollo-client/pull/9709) - Provide `@apollo/client/**/*.cjs.native.js` versions of every `@apollo/client/**/*.cjs` bundle (including dependencies `ts-invariant` and `zen-observable-ts`) to help React Native's Metro bundler automatically resolve CommonJS entry point modules. **These changes should render unnecessary [the advice we gave in the v3.5.4 section below about `metro.config.js`](#apollo-client-354-2021-11-19).**
    [@benjamn](https://github.com/benjamn) in [#9716](https://github.com/apollographql/apollo-client/pull/9716) - Handle falsy `incoming` data more gracefully in `offetLimitPagination().merge` function.
    [@shobhitsharma](https://github.com/shobhitsharma) in [#9705](https://github.com/apollographql/apollo-client/pull/9705) ## Apollo Client 3.6.3 (2022-05-05, only tagged `next` on npm) ### Bug Fixes - Simplify `useQuery(query, { defaultOptions })` default options processing in order to fix bug where `skip: true` queries failed to execute upon switching to `skip: false`.
    [@benjamn](https://github.com/benjamn) in [#9665](https://github.com/apollographql/apollo-client/pull/9665) - Add tests of skipping/unskipping and `useLazyQuery` with `defaultOptions`, and fix a bug causing duplicate requests.
    [@benjamn](https://github.com/benjamn) in [#9666](https://github.com/apollographql/apollo-client/pull/9666) - Update `ts-invariant` to version 0.10.2 to fix source map warnings.
    [@benjamn](https://github.com/benjamn) in [#9672](https://github.com/apollographql/apollo-client/pull/9672) - Test that `useQuery` queries with `skip: true` do not stall server-side rendering.
    [@nathanmarks](https://github.com/nathanmarks) and [@benjamn](https://github.com/benjamn) in [#9677](https://github.com/apollographql/apollo-client/pull/9677) - Prevent `useLazyQuery` from making duplicate requests when its execution function is first called, and stop rejecting the `Promise` it returns when `result.error` is defined.
    [@benjamn](https://github.com/benjamn) in [#9684](https://github.com/apollographql/apollo-client/pull/9684) - Fix issue with `useQuery` returning `loading: true` state during server-side rendering with `skip: true`.
    [@nathanmarks](https://github.com/nathanmarks) in [#9679](https://github.com/apollographql/apollo-client/pull/9679) ## Apollo Client 3.6.2 (2022-05-02) ### Bug Fixes - Pass `getServerSnapshot` function to `useSyncExternalStore` in addition to `getSnapshot`, though the two functions behave identically. This change should fix/unbreak React 18 server rendering.
    [@hungphongbk](https://github.com/hungphongbk) in [#9652](https://github.com/apollographql/apollo-client/pull/9652) ### Improvements - Consider `networkError.result.errors` in addition to `result.errors` in `PersistedQueryLink`.
    [@redaid113](https://github.com/redaid113) and [@benjamn](https://github.com/benjamn) in [#9410](https://github.com/apollographql/apollo-client/pull/9410) ## Apollo Client 3.6.1 (2022-04-28) ### Bug Fixes - Remove recently-added, internal `fetchBlockingPromise` option from the `WatchQueryOptions` interface, due to regressions.
    [@benjamn](https://github.com/benjamn) in [#9504](https://github.com/apollographql/apollo-client/pull/9504) ## Apollo Client 3.6.0 (2022-04-26) ### Potentially disruptive changes - Calling `fetchMore` for queries using the `cache-and-network` or `network-only` fetch policies will no longer trigger additional network requests when cache results are complete. Instead, those complete cache results will be delivered as if using the `cache-first` fetch policy.
    [@benjamn](https://github.com/benjamn) in [#9504](https://github.com/apollographql/apollo-client/pull/9504) - Reimplement `useQuery` and `useLazyQuery` to use the [proposed `useSyncExternalStore` API](https://github.com/reactwg/react-18/discussions/86) from React 18.
    [@brainkim](https://github.com/brainkim) and [@benjamn](https://github.com/benjamn) in [#8785](https://github.com/apollographql/apollo-client/pull/8785) and [#9596](https://github.com/apollographql/apollo-client/pull/9596) - Fixed bug where the `useLazyQuery` execution function would always use the `refetch` method of `ObservableQuery`, instead of properly reapplying the current `fetchPolicy` using the `reobserve` method.
    [@benjamn](https://github.com/benjamn) in [#9564](https://github.com/apollographql/apollo-client/pull/9564) > Since this `reobserve` method is useful and used internally, we have now exposed it as `use[Lazy]Query(...).reobserve` (which optionally takes a `Partial` of new options), to supplement the existing `refetch` method. Note that `reobserve` permanently updates the `variables` and other options of the `ObservableQuery`, unlike `refetch({ ...variables })`, which does not save those `variables`. - The internal use of `options.fetchBlockingPromise` by `useQuery` and `useLazyQuery` may slightly delay the delivery of network results, compared to previous versions of Apollo Client. Since network results are already delivered asynchronously, these timing differences should not be disruptive in most cases. Nevertheless, please open an issue if the timing differences are a problem for you (and you have no easy workaround).
    [@benjamn](https://github.com/benjamn) in [#9599](https://github.com/apollographql/apollo-client/pull/9599) ### React 18 In both its `peerDependencies` and its internal implementation, Apollo Client v3.6 should no longer prevent you from updating to React 18 in your applications. Internally, we have refactored `useQuery` and `useLazyQuery` to be implemented in terms of React's new (shimmable) `useSyncExternalStore` hook, demonstrating Apollo Client can serve as an external store with a referentially stable, synchronous API, as needed by React. As part of this refactoring, we also improved the behavior of `useQuery` and `useLazyQuery` when used in ``, which [double-renders components in development](https://github.com/reactwg/react-18/discussions/96). While this double-rendering always results in calling `useQuery` twice, forcing Apollo Client to create and then discard an unnecessary `ObservableQuery` object, we now have multiple defenses in place against executing any network queries for the unused `ObservableQuery` objects. In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling our server-side rendering utilities (`getDataFromTree` et al.), and introducing suspenseful versions of our hooks, to take full advantage of the new patterns React 18+ enables for data management libraries like Apollo Client. ### Improvements - Allow `BatchLink` to cancel queued and in-flight operations.
    [@PowerKiKi](https://github.com/PowerKiKi) and [@benjamn](https://github.com/benjamn) in [#9248](https://github.com/apollographql/apollo-client/pull/9248) - Add `GraphQLWsLink` in `@apollo/client/link/subscriptions`. This link is similar to the existing `WebSocketLink` in `@apollo/client/link/ws`, but uses the newer [`graphql-ws`](https://www.npmjs.com/package/graphql-ws) package and protocol instead of the older `subscriptions-transport-ws` implementation. This functionality was technically first released in `@apollo/client@3.5.10`, but semantically belongs in the 3.6.0 minor version. [@glasser](https://github.com/glasser) in [#9369](https://github.com/apollographql/apollo-client/pull/9369) - Allow passing `defaultOptions` to `useQuery` to avoid clobbering/resetting existing options when `useQuery` is called repeatedly.
    [@benjamn](https://github.com/benjamn) in [#9563](https://github.com/apollographql/apollo-client/pull/9563), superseding [#9223](https://github.com/apollographql/apollo-client/pull/9223) - Provide additional context to `nextFetchPolicy` functions to assist with `fetchPolicy` transitions. More details can be found in the [`nextFetchPolicy` documentation](https://www.apollographql.com/docs/react/data/queries/#nextfetchpolicy).
    [@benjamn](https://github.com/benjamn) in [#9222](https://github.com/apollographql/apollo-client/pull/9222) - Remove nagging deprecation warning about passing an `options.updateQuery` function to `fetchMore`.
    [@benjamn](https://github.com/benjamn) in [#9504](https://github.com/apollographql/apollo-client/pull/9504) - Let `addTypenameToDocument` take any `ASTNode` (including `DocumentNode`, as before).
    [@benjamn](https://github.com/benjamn) in [#9595](https://github.com/apollographql/apollo-client/pull/9595) - Set `useMutation` internal `isMounted` variable to `true` again when component remounted.
    [@devpeerapong](https://github.com/devpeerapong) in [#9561](https://github.com/apollographql/apollo-client/pull/9561) ## Apollo Client 3.5.10 (2022-02-24) ### Improvements - Add `GraphQLWsLink` in `@apollo/client/link/subscriptions`. This link is similar to the existing `WebSocketLink` in `@apollo/client/link/ws`, but uses the newer [`graphql-ws`](https://www.npmjs.com/package/graphql-ws) package and protocol instead of the older `subscriptions-transport-ws` implementation.
    [@glasser](https://github.com/glasser) in [#9369](https://github.com/apollographql/apollo-client/pull/9369) > Note from [@benjamn](https://github.com/benjamn): since `GraphQLWsLink` is new functionality, we would normally wait for the next minor version (v3.6), but we were asked to expedite this release. These changes are strictly additive/opt-in/backwards-compatible, so shipping them in a patch release (3.5.10) seems safe, if unusual. ## Apollo Client 3.5.9 (2022-02-15) ### Improvements - Interpret `keyFields: [...]` and `keyArgs: [...]` configurations in `InMemoryCache` type/field policies as `ReadonlyArray`s, since they are never mutated internally.
    [@julienfouilhe](https://github.com/julienfouilhe) in [#9339](https://github.com/apollographql/apollo-client/pull/9339) - Avoid declaring a global type for the `__DEV__` constant, to avoid conflict with other such global declarations.
    [@benjamn](https://github.com/benjamn) in [#9386](https://github.com/apollographql/apollo-client/pull/9386) ### Bug Fixes - Fix `useSubscription` executing `skip`ped subscription when input changes.
    [@levrik](https://github.com/levrik) in [#9299](https://github.com/apollographql/apollo-client/pull/9299) - Fix partial data appearing in `useQuery().data` when `notifyOnNetworkStatusChange: true`.
    [@brainkim](https://github.com/brainkim) in [#9367](https://github.com/apollographql/apollo-client/pull/9367) - Prevent `Promise`s returned by `useLazyQuery` execute functions from causing unhandled `Promise` rejection errors if uncaught.
    [@brainkim](https://github.com/brainkim) in [#9380](https://github.com/apollographql/apollo-client/pull/9380) ## Apollo Client 3.5.8 (2022-01-24) ### Bug Fixes - Fix the type of the `called` property returned by `useQuery()` and `useLazyQuery()`.
    [@sztadii](https://github.com/sztadii) in [#9304](https://github.com/apollographql/apollo-client/pull/9304) ### Bug Fixes (by [@brainkim](https://github.com/brainkim) in [#9328](https://github.com/apollographql/apollo-client/pull/9328)) - Fix `refetch()` not being called when `skip` is true. - Fix the promise returned from the `useLazyQuery()` execution function having stale variables. - Fix the promise returned from the `useLazyQuery()` execution function not rejecting when a query errors. ## Apollo Client 3.5.7 (2022-01-10) ### Bug Fixes - Fix regression that prevented calling `onError` or `onCompleted` in some cases when using `useQuery`.
    [@mmahalwy](https://github.com/mmahalwy) in [#9226](https://github.com/apollographql/apollo-client/pull/9226) - Make `useQuery` respect `defaultOptions.watchQuery.fetchPolicy`.
    [@yasharzolmajdi](https://github.com/yasharzolmajdi) in [#9210](https://github.com/apollographql/apollo-client/pull/9210) ## Apollo Client 3.5.6 (2021-12-07) ### Bug Fixes (by [@brainkim](https://github.com/brainkim) in [#9144](https://github.com/apollographql/apollo-client/pull/9144)) - Restores old behavior where the callback passed to `useMutation()` is constant. - Fix `useMutation()` callbacks having stale closures. - Fix `useQuery()` variables being out of date. ## Apollo Client 3.5.5 (2021-11-23) ### Bug Fixes - Remove `printer: Printer` positional parameter from publicly-exported `selectHttpOptionsAndBody` function, whose addition in [#8699](https://github.com/apollographql/apollo-client/pull/8699) was a breaking change (starting in Apollo Client 3.5.0) for direct consumers of `selectHttpOptionsAndBody`.
    [@benjamn](https://github.com/benjamn) in [#9103](https://github.com/apollographql/apollo-client/pull/9103) ## Apollo Client 3.5.4 (2021-11-19) ### Notices > ⚠️ The following advice about `metro.config.js` should no longer be necessary, as of Apollo Client v3.6.4. - [Relevant if you use Apollo Client with React Native] Since Apollo Client v3.5.0, CommonJS bundles provided by `@apollo/client` use a `.cjs` file extension rather than `.cjs.js`, so Node.js won't interpret them as ECMAScript modules. While this change should be an implementation detail, it may cause problems for the [Metro bundler](https://facebook.github.io/metro/) used by React Native, whose [`resolver.sourceExts`](https://facebook.github.io/metro/docs/configuration#sourceexts) configuration does not include the `cjs` extension by default. As a workaround until [this issue](https://github.com/facebook/metro/issues/535) is resolved, you can configure Metro to understand the `.cjs` file extension by creating a `metro.config.js` file in the root of your React Native project: ```js // NOTE: No longer necessary in @apollo/client@3.6.4! const { getDefaultConfig } = require("metro-config"); const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues(); exports.resolver = { ...defaultResolver, sourceExts: [...defaultResolver.sourceExts, "cjs"], }; ``` ### Improvements - Restore the ability to pass `onError()` and `onCompleted()` to the mutation execution function.
    [@brainkim](https://github.com/brainkim) in [#9076](https://github.com/apollographql/apollo-client/pull/9076) - Work around webpack 5 errors of the form ``` The request 'ts-invariant/process' failed to resolve only because it was resolved as fully specified ``` by ensuring `import ... from 'ts-invariant/process'` is internally written to `import ... from 'ts-invariant/process/index.js'`.
    [@benjamn](https://github.com/benjamn) in [#9083](https://github.com/apollographql/apollo-client/pull/9083) ## Apollo Client 3.5.3 (2021-11-17) - Avoid rewriting non-relative imported module specifiers in `config/rewriteModuleIds.ts` script, thereby allowing bundlers to resolve those imports as they see fit.
    [@benjamn](https://github.com/benjamn) in [#9073](https://github.com/apollographql/apollo-client/pull/9073) - Ensure only current file is matched when running VSCode debugger.
    [@eps1lon](https://github.com/eps1lon) in [#9050](https://github.com/apollographql/apollo-client/pull/9050) ## Apollo Client 3.5.2 (2021-11-10) - Fix `useMutation` execute function returning non-identical execution functions when passing similar options.
    [@brainkim](https://github.com/brainkim) in [#9037](https://github.com/apollographql/apollo-client/pull/9037) ## Apollo Client 3.5.1 (2021-11-09) - Remove npm from dependencies, and avoid referencing graphql-js enum value.
    [@brainkim](https://github.com/brainkim) in [#9030](https://github.com/apollographql/apollo-client/pull/9030) ## Apollo Client 3.5.0 (2021-11-08) ### Improvements - Add `updateQuery` and `updateFragment` methods to `ApolloCache`, simplifying common `readQuery`/`writeQuery` cache update patterns.
    [@wassim-k](https://github.com/wassim-k) in [#8382](https://github.com/apollographql/apollo-client/pull/8382) - Field directives and their arguments can now be included along with field argument names when using [field policy `keyArgs: [...]` notation](https://www.apollographql.com/docs/react/pagination/key-args/). For example, if you have a `Query.feed` field that takes an argument called `type` and uses a `@connection(key:...)` directive to keep `feed` data from different queries separate within the cache, you might configure both using the following `InMemoryCache` field policy: ```ts new InMemoryCache({ typePolicies: { Query: { fields: { feed: { keyArgs: ["type", "@connection", ["key"]], }, }, }, }, }); ``` [@benjamn](https://github.com/benjamn) in [#8678](https://github.com/apollographql/apollo-client/pull/8678) - Report single `MissingFieldError` instead of a potentially very large `MissingFieldError[]` array for incomplete cache reads, improving performance and memory usage.
    [@benjamn](https://github.com/benjamn) in [#8734](https://github.com/apollographql/apollo-client/pull/8734) - When writing results into `InMemoryCache`, each written object is now identified using `policies.identify` _after_ traversing the fields of the object (rather than before), simplifying identification and reducing duplicate work. If you have custom `keyFields` functions, they still receive the raw result object as their first parameter, but the `KeyFieldsContext` parameter now provides `context.storeObject` (the `StoreObject` just processed by `processSelectionSet`) and `context.readField` (a helper function for reading fields from `context.storeObject` and any `Reference`s it might contain, similar to `readField` for `read`, `merge`, and `cache.modify` functions).
    [@benjamn](https://github.com/benjamn) in [#8996](https://github.com/apollographql/apollo-client/pull/8996) - Ensure `cache.identify` never throws when primary key fields are missing, and include the source object in the error message when `keyFields` processing fails.
    [@benjamn](https://github.com/benjamn) in [#8679](https://github.com/apollographql/apollo-client/pull/8679) - The `HttpLink` constructor now accepts an optional `print` function that can be used to customize how GraphQL `DocumentNode` objects are transformed back into strings before they are sent over the network.
    [@sarahgp](https://github.com/sarahgp) in [#8699](https://github.com/apollographql/apollo-client/pull/8699) - Make `@apollo/client/testing` a fully-fledged, independent entry point, instead of re-exporting `@apollo/client/utilities/testing` (which was never an entry point and no longer exists).
    [@benjamn](https://github.com/benjamn) in [#8769](https://github.com/apollographql/apollo-client/pull/8769) - A new nested entry point called `@apollo/client/testing/core` has been created. Importing from this entry point instead of `@apollo/client/testing` excludes any React-related dependencies.
    [@wassim-k](https://github.com/wassim-k) in [#8687](https://github.com/apollographql/apollo-client/pull/8687) - Make `cache.batch` return the result of calling the `options.update` function.
    [@benjamn](https://github.com/benjamn) in [#8696](https://github.com/apollographql/apollo-client/pull/8696) - The `NetworkError` and `ErrorResponse` types have been changed to align more closely.
    [@korywka](https://github.com/korywka) in [#8424](https://github.com/apollographql/apollo-client/pull/8424) - Include `graphql@16` in peer deps.
    [@brainkim](https://github.com/brainkim) in [#8997](https://github.com/apollographql/apollo-client/pull/8997) - Update `zen-observable-ts` to eliminate transitive dependency on `@types/zen-observable`.
    [@benjamn](https://github.com/benjamn) in [#8695](https://github.com/apollographql/apollo-client/pull/8695) ### React Refactoring #### Improvements (due to [@brainkim](https://github.com/brainkim) in [#8875](https://github.com/apollographql/apollo-client/pull/8875)): - The `useLazyQuery` function now returns a promise with the result. - The `useMutation` result now exposes a method which can be reset. #### Bug Fixes (due to [@brainkim](https://github.com/brainkim) in [#8596](https://github.com/apollographql/apollo-client/pull/8596)): - The `useQuery` and `useLazyQuery` hooks will now have `ObservableQuery` methods defined consistently. - Calling `useLazyQuery` methods like `startPolling` will start the query. - Calling the `useLazyQuery` execution function will now behave more like `refetch`. `previousData` will be preserved. - `standby` fetchPolicies will now act like `skip: true` more consistently. - Calling `refetch` on a skipped query will have no effect (issue [#8270](https://github.com/apollographql/apollo-client/issues/8270)). - Prevent `onError` and `onCompleted` functions from firing continuously, and improving their polling behavior. ## Apollo Client 3.4.17 (2021-11-08) ### Improvements - Allow `TOptions extends FieldFunctionOptions` to be passed as final (optional) type parameter of `FieldPolicy` type.
    [@VictorGaiva](https://github.com/VictorGaiva) in [#9000](https://github.com/apollographql/apollo-client/pull/9000) ## Apollo Client 3.4.16 ### Improvements - Prevent webpack from misresolving the `graphql` package as the local `@apollo/client/utilities/globals/graphql.js` module when `module.exports.resolve.preferRelative` is enabled in `webpack.config.js`. > Note: if you encounter strange module resolution errors like `export 'isType' (imported as 'isType') was not found in 'graphql' (possible exports: removeTemporaryGlobals)` please try removing `preferRelative: true` from your `webpack.config.js` file, or find a way to disable that resolution behavior for packages within `node_modules`. [@benjamn](https://github.com/benjamn) in [#8862](https://github.com/apollographql/apollo-client/pull/8862) - Avoid importing `isType` from the `graphql` package internally, to prevent bundlers from including as much as 3.4kB of unnecessary code.
    [@benjamn](https://github.com/benjamn) in [#8891](https://github.com/apollographql/apollo-client/pull/8891) - Make `client.resetStore` and `client.clearStore` pass appropriate `discardWatches` option to `cache.reset`.
    [@benjamn](https://github.com/benjamn) in [#8873](https://github.com/apollographql/apollo-client/pull/8873) ## Apollo Client 3.4.15 ### Bug Fixes - Require calling `cache.reset({ discardWatches: true })` to make `cache.reset` discard `cache.watches`, restoring behavior broken in v3.4.14 by [#8826](https://github.com/apollographql/apollo-client/pull/8826).
    [@benjamn](https://github.com/benjamn) in [#8852](https://github.com/apollographql/apollo-client/pull/8852) ## Apollo Client 3.4.14 ### Bug Fixes - Disable `InMemoryCache` [result object canonization](https://github.com/apollographql/apollo-client/pull/7439) by default, to prevent unexpected memory growth and/or reuse of object references, with multiple ways to reenable it (per-cache, per-query, or a mixture of both).
    [@benjamn](https://github.com/benjamn) in [#8822](https://github.com/apollographql/apollo-client/pull/8822) - Clear `InMemoryCache` `watches` set when `cache.reset()` called.
    [@benjamn](https://github.com/benjamn) in [#8826](https://github.com/apollographql/apollo-client/pull/8826) - Stop excluding observerless queries from `refetchQueries: [...]` selection.
    [@benjamn](https://github.com/benjamn) in [#8825](https://github.com/apollographql/apollo-client/pull/8825) - Prevent optimistic cache evictions from evicting non-optimistic data.
    [@benjamn](https://github.com/benjamn) in [#8829](https://github.com/apollographql/apollo-client/pull/8829) - Ensure `cache.broadcastWatch` passes all relevant `WatchOptions` to `cache.diff` as `DiffOptions`.
    [@benjamn](https://github.com/benjamn) in [#8832](https://github.com/apollographql/apollo-client/pull/8832) ## Apollo Client 3.4.13 ### Bug Fixes - Fix `componentDidUpate` typo in `withSubscription` higher-order component.
    [@YarBez](https://github.com/YarBez) in [#7506](https://github.com/apollographql/apollo-client/pull/7506) - Fix internal `canUseSymbol` import within `@apollo/client/utilities` to avoid breaking bundlers/builds.
    [@benjamn](https://github.com/benjamn) in [#8817](https://github.com/apollographql/apollo-client/pull/8817) - Tolerate unfreezable objects like `Uint8Array` and `Buffer` in `maybeDeepFreeze`.
    [@geekuillaume](https://github.com/geekuillaume) and [@benjamn](https://github.com/benjamn) in [#8813](https://github.com/apollographql/apollo-client/pull/8813) ## Apollo Client 3.4.12 ### Bug Fixes - Improve handling of falsy `existing` and/or `incoming` parameters in `relayStylePagination` field policy helper function.
    [@bubba](https://github.com/bubba) and [@benjamn](https://github.com/benjamn) in [#8733](https://github.com/apollographql/apollo-client/pull/8733) - Associate Apollo context with `React.createContext` (instead of using a local `WeakMap`) again, so multiple copies of `@apollo/client` (uncommon) can share the same context.
    [@benjamn](https://github.com/benjamn) in [#8798](https://github.com/apollographql/apollo-client/pull/8798) ## Apollo Client 3.4.11 ### Bug Fixes - Fix [Vite](https://vitejs.dev) tree-shaking by calling the `checkDEV()` function (at least once) in the module that exports it, `@apollo/client/utilities/globals/index.ts`.
    [@benjamn](https://github.com/benjamn) in [#8767](https://github.com/apollographql/apollo-client/pull/8767) ### Improvements - Export `PersistedQueryLink` namespace from `@apollo/client/link/persisted-queries`.
    [@vedrani](https://github.com/vedrani) in [#8761](https://github.com/apollographql/apollo-client/pull/8761) ### Documentation - Upgrade docs theme for new Algolia-powered search experience.
    [@trevorblades](https://github.com/trevorblades) in [#8768](https://github.com/apollographql/apollo-client/pull/8768) ## Apollo Client 3.4.10 ### Improvements - Warn when calling `refetch({ variables })` instead of `refetch(variables)`, except for queries that declare a variable named `$variables` (uncommon).
    [@benjamn](https://github.com/benjamn) in [#8702](https://github.com/apollographql/apollo-client/pull/8702) ### Bug Fixes - Fix `ObservableQuery.getCurrentResult()` returning cached `data` with certain fetch policies.
    [@brainkim](https://github.com/brainkim) in [#8718](https://github.com/apollographql/apollo-client/pull/8718) - Prevent `ssrMode`/`ssrForceFetchDelay` from causing queries to hang.
    [@brainkim](https://github.com/brainkim) in [#8709](https://github.com/apollographql/apollo-client/pull/8709) - Import `@apollo/client/utilities/globals` internally wherever `__DEV__` is used, not just in `@apollo/client/**/index.js` entry points.
    [@benjamn](https://github.com/benjamn) in [#8720](https://github.com/apollographql/apollo-client/pull/8720) ## Apollo Client 3.4.9 ### Bug Fixes - Fix unhandled `Promise` rejection warnings/errors whose message is `Observable cancelled prematurely`.
    [@benjamn](https://github.com/benjamn) in [#8676](https://github.com/apollographql/apollo-client/pull/8676) - Enforce that `__DEV__` is polyfilled by every `@apollo/client/*` entry point that uses it. This build step considers not only explicit `__DEV__` usage but also `__DEV__` references injected near `invariant(...)` and `new InvariantError(...)` expressions.
    [@benjamn](https://github.com/benjamn) in [#8689](https://github.com/apollographql/apollo-client/pull/8689) ## Apollo Client 3.4.8 ### Bug Fixes - Fix error thrown by nested `keyFields: ["a", ["b", "c"], "d"]` type policies when writing results into the cache where any of the key fields (`.a`, `.a.b`, `.a.c`, or `.d`) have been renamed by query field alias syntax.
    [@benjamn](https://github.com/benjamn) in [#8643](https://github.com/apollographql/apollo-client/pull/8643) - Fix regression from PR [#8422](https://github.com/apollographql/apollo-client/pull/8422) (first released in `@apollo/client@3.4.0-rc.15`) that caused `result.data` to be set to undefined in some cases after `ObservableQuery#getCurrentResult` reads an incomplete result from the cache.
    [@benjamn](https://github.com/benjamn) in [#8642](https://github.com/apollographql/apollo-client/pull/8642) ## Apollo Client 3.4.7 ### Bug Fixes - Fix accidental reuse of recycled `MergeTree` objects in `StoreWriter` class used by `InMemoryCache`.
    [@benjamn](https://github.com/benjamn) in [#8618](https://github.com/apollographql/apollo-client/pull/8618) ## Apollo Client 3.4.6 ### Improvements - Reevaluate `window.fetch` each time `HttpLink` uses it, if not configured using `options.fetch`. This change enables a variety of strategies for instrumenting `window.fetch`, without requiring those strategies to run before `@apollo/client/link/http` is first imported.
    [@benjamn](https://github.com/benjamn) in [#8603](https://github.com/apollographql/apollo-client/pull/8603) - Clarify mutation `fetchPolicy` options (`"network-only"` or `"no-cache"`) using [`MutationFetchPolicy`](https://github.com/apollographql/apollo-client/blob/fa52875341ab33f3e8192ded90af5e2c208e0f75/src/core/watchQueryOptions.ts#L33-L37) union type.
    [@benjamn](https://github.com/benjamn) in [#8602](https://github.com/apollographql/apollo-client/pull/8602) ### Bug Fixes - Restore full `@apollo/client/apollo-client.cjs.js` CommonJS bundle for older bundlers. > Note that Node.js and CommonJS bundlers typically use the bundles specified by `"main"` fields in our generated `package.json` files, which are all independent and non-overlapping CommonJS modules. However, `apollo-client.cjs.js` is just one big bundle, so mixing imports of `apollo-client.cjs.js` with the other CommonJS bundles is discouraged, as it could trigger the [dual package hazard](https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packages). In other words, please don't start using `apollo-client.cjs.js` if you're not already.
    [@benjamn](https://github.com/benjamn) in [#8592](https://github.com/apollographql/apollo-client/pull/8592) - Log `MissingFieldError`s in `ObservableQuery#getCurrentResult` using `invariant.debug`, rather than reporting them via `result.error`.
    [@benjamn](https://github.com/benjamn) in [#8604](https://github.com/apollographql/apollo-client/pull/8604) ## Apollo Client 3.4.5 ### Bug Fixes - Fix double registration bug for mutation `refetchQueries` specified using legacy one-time `refetchQueries: [{ query, variables }]` style. Though the bug is fixed, we recommend using `refetchQueries: [query]` instead (when possible) to refetch an existing query using its `DocumentNode`, rather than creating, executing, and then deleting a new query, as the legacy `{ query, variables }` style unfortunately does.
    [@benjamn](https://github.com/benjamn) in [#8586](https://github.com/apollographql/apollo-client/pull/8586) - Fix `useQuery`/`useLazyQuery` stalling when clients or queries change.
    [@brainkim](https://github.com/brainkim) in [#8589](https://github.com/apollographql/apollo-client/pull/8589) ## Apollo Client 3.4.4 ### Bug Fixes - Revert accidental addition of `engines.npm` section to published version of `@apollo/client/package.json`.
    [@benjamn](https://github.com/benjamn) in [#8578](https://github.com/apollographql/apollo-client/pull/8578) ## Apollo Client 3.4.3 ### Bug Fixes - Fix `{ ssr: false }` causing queries to hang on the client.
    [@brainkim](https://github.com/brainkim) in [#8574](https://github.com/apollographql/apollo-client/pull/8574) ## Apollo Client 3.4.2 ### Bug Fixes - Use more default type parameters for mutation-related types in `react/types/types.ts`, to provide smoother backwards compatibility for code using those types explicitly.
    [@benjamn](https://github.com/benjamn) in [#8573](https://github.com/apollographql/apollo-client/pull/8573) ## Apollo Client 3.4.1 ### Bug Fixes - Initialize `stringifyCanon` lazily, when `canonicalStringify` is first called, fixing `Uncaught ReferenceError: __DEV__ is not defined` errors due to usage of `__DEV__` before declaration.
    [@benjamn](https://github.com/benjamn) in [#8557](https://github.com/apollographql/apollo-client/pull/8557) ## Apollo Client 3.4.0 ### New documentation - [**Refetching queries**](https://www.apollographql.com/docs/react/data/refetching/) with `client.refetchQueries`.
    [@StephenBarlow](https://github.com/StephenBarlow) and [@benjamn](https://github.com/benjamn) in [#8265](https://github.com/apollographql/apollo-client/pull/8265) ### Improvements - `InMemoryCache` now _guarantees_ that any two result objects returned by the cache (from `readQuery`, `readFragment`, etc.) will be referentially equal (`===`) if they are deeply equal. Previously, `===` equality was often achievable for results for the same query, on a best-effort basis. Now, equivalent result objects will be automatically shared among the result trees of completely different queries. This guarantee is important for taking full advantage of optimistic updates that correctly guess the final data, and for "pure" UI components that can skip re-rendering when their input data are unchanged.
    [@benjamn](https://github.com/benjamn) in [#7439](https://github.com/apollographql/apollo-client/pull/7439) - Mutations now accept an optional callback function called `onQueryUpdated`, which will be passed the `ObservableQuery` and `Cache.DiffResult` objects for any queries invalidated by cache writes performed by the mutation's final `update` function. Using `onQueryUpdated`, you can override the default `FetchPolicy` of the query, by (for example) calling `ObservableQuery` methods like `refetch` to force a network request. This automatic detection of invalidated queries provides an alternative to manually enumerating queries using the `refetchQueries` mutation option. Also, if you return a `Promise` from `onQueryUpdated`, the mutation will automatically await that `Promise`, rendering the `awaitRefetchQueries` option unnecessary.
    [@benjamn](https://github.com/benjamn) in [#7827](https://github.com/apollographql/apollo-client/pull/7827) - Support `client.refetchQueries` as an imperative way to refetch queries, without having to pass `options.refetchQueries` to `client.mutate`.
    [@dannycochran](https://github.com/dannycochran) in [#7431](https://github.com/apollographql/apollo-client/pull/7431) - Improve standalone `client.refetchQueries` method to support automatic detection of queries needing to be refetched.
    [@benjamn](https://github.com/benjamn) in [#8000](https://github.com/apollographql/apollo-client/pull/8000) - Fix remaining barriers to loading [`@apollo/client/core`](https://cdn.jsdelivr.net/npm/@apollo/client@3.4.0/core/+esm) as native ECMAScript modules from a CDN like [esm.run](https://www.jsdelivr.com/esm). Importing `@apollo/client` from a CDN will become possible once we move all React-related dependencies into `@apollo/client/react` in Apollo Client 4.
    [@benjamn](https://github.com/benjamn) in [#8266](https://github.com/apollographql/apollo-client/issues/8266) - `InMemoryCache` supports a new method called `batch`, which is similar to `performTransaction` but takes named options rather than positional parameters. One of these named options is an `onDirty(watch, diff)` callback, which can be used to determine which watched queries were invalidated by the `batch` operation.
    [@benjamn](https://github.com/benjamn) in [#7819](https://github.com/apollographql/apollo-client/pull/7819) - Allow `merge: true` field policy to merge `Reference` objects with non-normalized objects, and vice-versa.
    [@benjamn](https://github.com/benjamn) in [#7778](https://github.com/apollographql/apollo-client/pull/7778) - Allow identical subscriptions to be deduplicated by default, like queries.
    [@jkossis](https://github.com/jkossis) in [#6910](https://github.com/apollographql/apollo-client/pull/6910) - Always use `POST` request when falling back to sending full query with `@apollo/client/link/persisted-queries`.
    [@rieset](https://github.com/rieset) in [#7456](https://github.com/apollographql/apollo-client/pull/7456) - The `FetchMoreQueryOptions` type now takes two instead of three type parameters (``), thanks to using `Partial` instead of `K extends typeof TVariables` and `Pick`.
    [@ArnaudBarre](https://github.com/ArnaudBarre) in [#7476](https://github.com/apollographql/apollo-client/pull/7476) - Pass `variables` and `context` to a mutation's `update` function. **Note:** The type of the `update` function is now named `MutationUpdaterFunction` rather than `MutationUpdaterFn`, since the older type was [broken beyond repair](https://github.com/apollographql/apollo-client/issues/8506#issuecomment-881706613). If you are using `MutationUpdaterFn` in your own code, please use `MutationUpdaterFunction` instead.
    [@jcreighton](https://github.com/jcreighton) in [#7902](https://github.com/apollographql/apollo-client/pull/7902) - A `resultCacheMaxSize` option may be passed to the `InMemoryCache` constructor to limit the number of result objects that will be retained in memory (to speed up repeated reads), and calling `cache.reset()` now releases all such memory.
    [@SofianHn](https://github.com/SofianHn) in [#8107](https://github.com/apollographql/apollo-client/pull/8107) - Fully remove result cache entries from LRU dependency system when the corresponding entities are removed from `InMemoryCache` by eviction, or by any other means.
    [@sofianhn](https://github.com/sofianhn) and [@benjamn](https://github.com/benjamn) in [#8147](https://github.com/apollographql/apollo-client/pull/8147) - Expose missing field errors in results.
    [@brainkim](github.com/brainkim) in [#8262](https://github.com/apollographql/apollo-client/pull/8262) - Add expected/received `variables` to `No more mocked responses...` error messages generated by `MockLink`.
    [@markneub](github.com/markneub) in [#8340](https://github.com/apollographql/apollo-client/pull/8340) - The `InMemoryCache` version of the `cache.gc` method now supports additional options for removing non-essential (recomputable) result caching data.
    [@benjamn](https://github.com/benjamn) in [#8421](https://github.com/apollographql/apollo-client/pull/8421) - Suppress noisy `Missing cache result fields...` warnings by default unless `setLogVerbosity("debug")` called.
    [@benjamn](https://github.com/benjamn) in [#8489](https://github.com/apollographql/apollo-client/pull/8489) - Improve interaction between React hooks and React Fast Refresh in development.
    [@andreialecu](https://github.com/andreialecu) in [#7952](https://github.com/apollographql/apollo-client/pull/7952) ### Potentially disruptive changes - To avoid retaining sensitive information from mutation root field arguments, Apollo Client v3.4 automatically clears any `ROOT_MUTATION` fields from the cache after each mutation finishes. If you need this information to remain in the cache, you can prevent the removal by passing the `keepRootFields: true` option to `client.mutate`. `ROOT_MUTATION` result data are also passed to the mutation `update` function, so we recommend obtaining the results that way, rather than using `keepRootFields: true`, if possible.
    [@benjamn](https://github.com/benjamn) in [#8280](https://github.com/apollographql/apollo-client/pull/8280) - Internally, Apollo Client now controls the execution of development-only code using the `__DEV__` global variable, rather than `process.env.NODE_ENV`. While this change should not cause any visible differences in behavior, it will increase your minified+gzip bundle size by more than 3.5kB, unless you configure your minifier to replace `__DEV__` with a `true` or `false` constant, the same way you already replace `process.env.NODE_ENV` with a string literal like `"development"` or `"production"`. For an example of configuring a Create React App project without ejecting, see this pull request for our [React Apollo reproduction template](https://github.com/apollographql/react-apollo-error-template/pull/51).
    [@benjamn](https://github.com/benjamn) in [#8347](https://github.com/apollographql/apollo-client/pull/8347) - Internally, Apollo Client now uses namespace syntax (e.g. `import * as React from "react"`) for imports whose types are re-exported (and thus may appear in `.d.ts` files). This change should remove any need to configure `esModuleInterop` or `allowSyntheticDefaultImports` in `tsconfig.json`, but might require updating bundler configurations that specify named exports of the `react` and `prop-types` packages, to include exports like `createContext` and `createElement` ([example](https://github.com/apollographql/apollo-client/commit/16b08e1af9ba9934041298496e167aafb128c15d)).
    [@devrelm](https://github.com/devrelm) in [#7742](https://github.com/apollographql/apollo-client/pull/7742) - Respect `no-cache` fetch policy (by not reading any `data` from the cache) for `loading: true` results triggered by `notifyOnNetworkStatusChange: true`.
    [@jcreighton](https://github.com/jcreighton) in [#7761](https://github.com/apollographql/apollo-client/pull/7761) - The TypeScript return types of the `getLastResult` and `getLastError` methods of `ObservableQuery` now correctly include the possibility of returning `undefined`. If you happen to be calling either of these methods directly, you may need to adjust how the calling code handles the methods' possibly-`undefined` results.
    [@benjamn](https://github.com/benjamn) in [#8394](https://github.com/apollographql/apollo-client/pull/8394) - Log non-fatal `invariant.error` message when fields are missing from result objects written into `InMemoryCache`, rather than throwing an exception. While this change relaxes an exception to be merely an error message, which is usually a backwards-compatible change, the error messages are logged in more cases now than the exception was previously thrown, and those new error messages may be worth investigating to discover potential problems in your application. The errors are not displayed for `@client`-only fields, so adding `@client` is one way to handle/hide the errors for local-only fields. Another general strategy is to use a more precise query to write specific subsets of data into the cache, rather than reusing a larger query that contains fields not present in the written `data`.
    [@benjamn](https://github.com/benjamn) in [#8416](https://github.com/apollographql/apollo-client/pull/8416) - The [`nextFetchPolicy`](https://github.com/apollographql/apollo-client/pull/6893) option for `client.watchQuery` and `useQuery` will no longer be removed from the `options` object after it has been applied, and instead will continue to be applied any time `options.fetchPolicy` is reset to another value, until/unless the `options.nextFetchPolicy` property is removed from `options`.
    [@benjamn](https://github.com/benjamn) in [#8465](https://github.com/apollographql/apollo-client/pull/8465) - The `fetchMore`, `subscribeToMore`, and `updateQuery` functions returned from the `useQuery` hook may now return undefined in edge cases where the functions are called when the component is unmounted
    [@noghartt](https://github.com/noghartt) in [#7980](https://github.com/apollographql/apollo-client/pull/7980). ### Bug fixes - In Apollo Client 2.x, a `refetch` operation would always replace existing data in the cache. With the introduction of field policy `merge` functions in Apollo Client 3, existing field values could be inappropriately combined with incoming field values by a custom `merge` function that does not realize a `refetch` has happened. To give you more control over this behavior, we have introduced an `overwrite?: boolean = false` option for `cache.writeQuery` and `cache.writeFragment`, and an option called `refetchWritePolicy?: "merge" | "overwrite"` for `client.watchQuery`, `useQuery`, and other functions that accept `WatchQueryOptions`. You can use these options to make sure any `merge` functions involved in cache writes for `refetch` operations get invoked with `undefined` as their first argument, which simulates the absence of any existing data, while still giving the `merge` function a chance to determine the internal representation of the incoming data. The default behaviors are `overwrite: true` and `refetchWritePolicy: "overwrite"`, which restores the Apollo Client 2.x behavior, but (if this change causes any problems for your application) you can easily recover the previous merging behavior by setting a default value for `refetchWritePolicy` in `defaultOptions.watchQuery`: ```ts new ApolloClient({ defaultOptions: { watchQuery: { refetchWritePolicy: "merge", }, }, }); ``` [@benjamn](https://github.com/benjamn) in [#7810](https://github.com/apollographql/apollo-client/pull/7810) - Make sure the `MockedResponse` `ResultFunction` type is re-exported.
    [@hwillson](https://github.com/hwillson) in [#8315](https://github.com/apollographql/apollo-client/pull/8315) - Fix polling when used with `skip`.
    [@brainkim](https://github.com/brainkim) in [#8346](https://github.com/apollographql/apollo-client/pull/8346) - `InMemoryCache` now coalesces `EntityStore` updates to guarantee only one `store.merge(id, fields)` call per `id` per cache write.
    [@benjamn](https://github.com/benjamn) in [#8372](https://github.com/apollographql/apollo-client/pull/8372) - Fix polling when used with ``.
    [@brainkim](https://github.com/brainkim) in [#8414](https://github.com/apollographql/apollo-client/pull/8414) - Fix the React integration logging `Warning: Can't perform a React state update on an unmounted component`.
    [@wuarmin](https://github.com/wuarmin) in [#7745](https://github.com/apollographql/apollo-client/pull/7745) - Make `ObservableQuery#getCurrentResult` always call `queryInfo.getDiff()`.
    [@benjamn](https://github.com/benjamn) in [#8422](https://github.com/apollographql/apollo-client/pull/8422) - Make `readField` default to reading from current object only when the `from` option/argument is actually omitted, not when `from` is passed to `readField` with an undefined value. A warning will be printed when this situation occurs.
    [@benjamn](https://github.com/benjamn) in [#8508](https://github.com/apollographql/apollo-client/pull/8508) - The `fetchMore`, `subscribeToMore`, and `updateQuery` functions no longer throw `undefined` errors
    [@noghartt](https://github.com/noghartt) in [#7980](https://github.com/apollographql/apollo-client/pull/7980). ## Apollo Client 3.3.21 ### Bug fixes - Fix race condition in `@apollo/client/link/context` that could leak subscriptions if the subscription is cancelled before `operation.setContext` is called.
    [@sofianhn](https://github.com/sofianhn) in [#8399](https://github.com/apollographql/apollo-client/pull/8399) - Prefer `existing.pageInfo.startCursor` and `endCursor` (if defined) in `read` function of `relayStylePagination` policies.
    [@benjamn](https://github.com/benjamn) in [#8438](https://github.com/apollographql/apollo-client/pull/8438) ### Improvements - Normalize user-provided `HttpLink` headers by lower-casing their names.
    [@benjamn](https://github.com/benjamn) in [#8449](https://github.com/apollographql/apollo-client/pull/8449) ## Apollo Client 3.3.20 ### Bug fixes - Fix policy merging bug when calling `cache.policies.addTypePolicies` multiple times for the same type policy.
    [@Banou26](https://github.com/Banou26) in [#8361](https://github.com/apollographql/apollo-client/pull/8361) ## Apollo Client 3.3.19 ### Bug fixes - Use `export ... from` syntax to re-export `graphql-tag` named exports, making tree-shaking easier for some bundlers.
    [@benjamn](https://github.com/benjamn) in [#8221](https://github.com/apollographql/apollo-client/pull/8221) ### Documentation - Replace Spectrum references with [community.apollographql.com](https://community.apollographql.com).
    [@hwillson](https://github.com/hwillson) in [#8238](https://github.com/apollographql/apollo-client/pull/8238) ## Apollo Client 3.3.18 ### Bug fixes - Add `"sideEffects": false` to all generated/published `package.json` files, to improve dead code elimination for nested entry points like `@apollo/client/cache`.
    [@benjamn](https://github.com/benjamn) in [#8213](https://github.com/apollographql/apollo-client/pull/8213) ## Apollo Client 3.3.17 ### Bug fixes - Make `useReactiveVar(rv)` recheck the latest `rv()` value in its `useEffect` callback, and immediately update state if the value has already changed, rather than calling `rv.onNextChange(setValue)` to listen for future changes.
    [@benjamn](https://github.com/benjamn) in [#8135](https://github.com/apollographql/apollo-client/pull/8135) ## Apollo Client 3.3.16 ### Bug fixes - Prevent `undefined` mutation result in `useMutation`.
    [@jcreighton](https://github.com/jcreighton) in [#8018](https://github.com/apollographql/apollo-client/pull/8018) - Fix `useReactiveVar` not rerendering for successive synchronous calls.
    [@brainkim](https://github.com/brainkim) in [#8022](https://github.com/apollographql/apollo-client/pull/8022) - Support `batchDebounce` option for `BatchLink` and `BatchHttpLink`.
    [@dannycochran](https://github.com/dannycochran) in [#8024](https://github.com/apollographql/apollo-client/pull/8024) ## Apollo Client 3.3.15 - Increment `queryInfo.lastRequestId` only when making a network request through the `ApolloLink` chain, rather than every time `fetchQueryByPolicy` is called.
    [@dannycochran](https://github.com/dannycochran) in [#7956](https://github.com/apollographql/apollo-client/pull/7956) - During server-side rendering, allow initial `useQuery` calls to return final `{ loading: false, data }` results when the cache already contains the necessary data.
    [@benjamn](https://github.com/benjamn) in [#7983](https://github.com/apollographql/apollo-client/pull/7983) ## Apollo Client 3.3.14 ### Improvements - Adjust TypeScript types to allow `keyFields` and `keyArgs` functions to return `false`.
    [@CarsonF](https://github.com/CarsonF) and [@benjamn](https://github.com/benjamn) in [#7900](https://github.com/apollographql/apollo-client/pull/7900) ### Bug fixes - Prevent `RenderPromises` memory leak by calling `renderPromises.clear()` after `getMarkupFromTree` finishes.
    [@benjamn](https://github.com/benjamn) in [#7943](https://github.com/apollographql/apollo-client/pull/7943) - Cancel pending notify timeout when stopping a `QueryInfo` object.
    [@hollandThomas](https://github.com/hollandThomas) in [#7935](https://github.com/apollographql/apollo-client/pull/7935) - Fix infinite rendering bug related to `useSubscription`.
    [@brainkim](https://github.com/brainkim) in [#7917](https://github.com/apollographql/apollo-client/pull/7917) ## Apollo Client 3.3.13 ### Improvements - Add missing `context` option to `useSubscription`.
    [@jcreighton](https://github.com/jcreighton) in [#7860](https://github.com/apollographql/apollo-client/pull/7860) - Remove unnecessary TypeScript global `Observable["@@observable"]` method declaration.
    [@benjamn](https://github.com/benjamn) in [#7888](https://github.com/apollographql/apollo-client/pull/7888) - Prevent skipped/observerless `ObservableQuery`s from being refetched by `refetchQueries`.
    [@dannycochran](https://github.com/dannycochran) in [#7877](https://github.com/apollographql/apollo-client/pull/7877) ## Apollo Client 3.3.12 ### Bug fixes - Maintain serial ordering of `asyncMap` mapping function calls, and prevent potential unhandled `Promise` rejection errors.
    [@benjamn](https://github.com/benjamn) in [#7818](https://github.com/apollographql/apollo-client/pull/7818) - Relax incompatible `children?: React.ReactElement` field type in `MockedProviderProps` interface.
    [@kevinperaza](https://github.com/kevinperaza) in [#7833](https://github.com/apollographql/apollo-client/pull/7833) ## Apollo Client 3.3.11 ### Bug fixes - Fix `useLazyQuery` `forceUpdate` loop regression introduced by [#7655](https://github.com/apollographql/apollo-client/pull/7655) in version 3.3.10.
    [@benjamn](https://github.com/benjamn) in [#7715](https://github.com/apollographql/apollo-client/pull/7715) ## Apollo Client 3.3.10 ### Bug fixes - Revert PR [#7276](https://github.com/apollographql/apollo-client/pull/7276), but test that garbage collection reclaims torn-down `ObservableQuery` objects.
    [@benjamn](https://github.com/benjamn) in [#7695](https://github.com/apollographql/apollo-client/pull/7695) - Reset `QueryInfo.diff` and `QueryInfo.dirty` after canceling notify timeout in `QueryInfo.markResult` and `QueryInfo.markError`.
    [@jcreighton](https://github.com/jcreighton) in [#7696](https://github.com/apollographql/apollo-client/pull/7696) ### Improvements - Avoid calling `forceUpdate` when component is unmounted.
    [@DylanVann](https://github.com/DylanVann) in [#7655](https://github.com/apollographql/apollo-client/pull/7655) - The `codemods/` top-level directory has been moved into the `scripts/` directory.
    [@benjamn](https://github.com/benjamn) in [#7675](https://github.com/apollographql/apollo-client/pull/7675) ## Apollo Client 3.3.9 ### Bug Fixes - Prevent reactive variables from retaining otherwise unreachable `InMemoryCache` objects.
    [@benjamn](https://github.com/benjamn) in [#7661](https://github.com/apollographql/apollo-client/pull/7661) ### Improvements - The [`graphql-tag`](https://www.npmjs.com/package/graphql-tag) dependency has been updated to version 2.12.0, after converting its repository to use TypeScript and ECMAScript module syntax. There should be no visible changes in behavior, though the internal changes seemed significant enough to mention here.
    [@abdonrd](https://github.com/abdonrd) in [graphql-tag#273](https://github.com/apollographql/graphql-tag/pull/273) and [@PowerKiKi](https://github.com/PowerKiKi) in [graphql-tag#325](https://github.com/apollographql/graphql-tag/pull/325) ## Apollo Client 3.3.8 ### Bug Fixes - Catch updates in `useReactiveVar` with an additional check.
    [@jcreighton](https://github.com/jcreighton) in [#7652](https://github.com/apollographql/apollo-client/pull/7652) - Reactivate forgotten reactive variables whenever `InMemoryCache` acquires its first watcher.
    [@benjamn](https://github.com/benjamn) in [#7657](https://github.com/apollographql/apollo-client/pull/7657) - Backport `Symbol.species` fix for `Concast` and `ObservableQuery` from [`release-3.4`](https://github.com/apollographql/apollo-client/pull/7399), fixing subscriptions in React Native Android when the Hermes JavaScript engine is enabled (among other benefits).
    [@benjamn](https://github.com/benjamn) in [#7403](https://github.com/apollographql/apollo-client/pull/7403) and [#7660](https://github.com/apollographql/apollo-client/pull/7660) ## Apollo Client 3.3.7 ### Bug Fixes - Fix a regression due to [#7310](https://github.com/apollographql/apollo-client/pull/7310) that caused `loading` always to be `true` for `skip: true` results during server-side rendering.
    [@rgrove](https://github.com/rgrove) in [#7567](https://github.com/apollographql/apollo-client/pull/7567) - Avoid duplicate `useReactiveVar` listeners when rendering in `React.StrictMode`.
    [@jcreighton](https://github.com/jcreighton) in [#7581](https://github.com/apollographql/apollo-client/pull/7581) ### Improvements - Set `displayName` on `ApolloContext` objects for easier debugging.
    [@dulmandakh](https://github.com/dulmandakh) in [#7550](https://github.com/apollographql/apollo-client/pull/7550) ## Apollo Client 3.3.6 ### Bug Fixes - Immediately apply `queryType: true`, `mutationType: true`, and `subscriptionType: true` type policies, rather than waiting for the first time the policy is used, fixing a [regression](https://github.com/apollographql/apollo-client/issues/7443) introduced by [#7065](https://github.com/apollographql/apollo-client/pull/7065).
    [@benjamn](https://github.com/benjamn) in [#7463](https://github.com/apollographql/apollo-client/pull/7463) - Check that `window` is defined even when `connectToDevTools` is `true`.
    [@yasupeke](https://github.com/yasupeke) in [#7434](https://github.com/apollographql/apollo-client/pull/7434) ### Improvements - Replace stray `console.debug` (undefined in React Native) with `invariant.log`.
    [@benjamn](https://github.com/benjamn) in [#7454](https://github.com/apollographql/apollo-client/pull/7454) - Suggest Firefox Apollo DevTools as well as the Chrome extension.
    [@benjamn](https://github.com/benjamn) in [#7461](https://github.com/apollographql/apollo-client/pull/7461) ## Apollo Client 3.3.5 ### Improvements - Restore `client.version` property, reflecting the current `@apollo/client` version from `package.json`.
    [@benjamn](https://github.com/benjamn) in [#7448](https://github.com/apollographql/apollo-client/pull/7448) ## Apollo Client 3.3.4 ### Improvements - Update `ts-invariant` to avoid potential [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)-violating `Function` fallback, thanks to [a clever new `globalThis` polyfill technique](https://mathiasbynens.be/notes/globalthis).
    [@benjamn](https://github.com/benjamn) in [#7414](https://github.com/apollographql/apollo-client/pull/7414) ## Apollo Client 3.3.3 ### Bug fixes - Make the `observer` parameter of `ApolloLink#onError` optional, fixing an unnecessary breaking change for any code that called `onError` directly.
    [@benjamn](https://github.com/benjamn) in [#7407](https://github.com/apollographql/apollo-client/pull/7407) ## Apollo Client 3.3.2 > ⚠️ **Note:** This version of `@apollo/client` contains no behavioral changes since version 3.3.1 ### Documentation - The [Pagination](https://www.apollographql.com/docs/react/pagination/overview/) article has been completely rewritten (and split into multiple pages) to cover Apollo Client 3 field policies.
    [@benjamn](https://github.com/benjamn) and [@StephenBarlow](https://github.com/StephenBarlow) in [#7175](https://github.com/apollographql/apollo-client/pull/7175) - Revamp [local state tutorial chapter](https://www.apollographql.com/tutorials/fullstack-quickstart/managing-local-state) for Apollo Client 3, including reactive variables.
    [@StephenBarlow](https://github.com/StephenBarlow) in [`apollographql@apollo#1050`](https://github.com/apollographql/apollo/pull/1050) - Add examples of using `ApolloLink` to modify response data asynchronously.
    [@alichry](https://github.com/alichry) in [#7332](https://github.com/apollographql/apollo-client/pull/7332) - Consolidate separate v2.4, v2.5, and v2.6 documentation versions into one v2 version.
    [@jgarrow](https://github.com/jgarrow) in [#7378](https://github.com/apollographql/apollo-client/pull/7378) ## Apollo Client 3.3.1 ### Bug Fixes - Revert back to `default`-importing `React` internally, rather than using a namespace import.
    [@benjamn](https://github.com/benjamn) in [113475b1](https://github.com/apollographql/apollo-client/commit/113475b163a19a40a67465c11e8e6f48a1de7e76) ## Apollo Client 3.3.0 ### Bug Fixes - Update `@wry/equality` to consider undefined properties equivalent to missing properties.
    [@benjamn](https://github.com/benjamn) in [#7108](https://github.com/apollographql/apollo-client/pull/7108) - Prevent memory leaks involving unused `onBroadcast` function closure created in `ApolloClient` constructor.
    [@kamilkisiela](https://github.com/kamilkisiela) in [#7161](https://github.com/apollographql/apollo-client/pull/7161) - Provide default empty cache object for root IDs like `ROOT_QUERY`, to avoid differences in behavior before/after `ROOT_QUERY` data has been written into `InMemoryCache`.
    [@benjamn](https://github.com/benjamn) in [#7100](https://github.com/apollographql/apollo-client/pull/7100) - Cancel `queryInfo.notifyTimeout` in `QueryInfo#markResult` to prevent unnecessary network requests when using a `FetchPolicy` of `cache-and-network` or `network-only` in a React component with multiple `useQuery` calls.
    [@benjamn](https://github.com/benjamn) in [#7347](https://github.com/apollographql/apollo-client/pull/7347) ### Potentially breaking changes - Ensure `cache.readQuery` and `cache.readFragment` always return `TData | null`, instead of throwing `MissingFieldError` exceptions when missing fields are encountered.
    [@benjamn](https://github.com/benjamn) in [#7098](https://github.com/apollographql/apollo-client/pull/7098) > Since this change converts prior exceptions to `null` returns, and since `null` was already a possible return value according to the `TData | null` return type, we are confident this change will be backwards compatible (as long as `null` was properly handled before). - `HttpLink` will now automatically strip any unused `variables` before sending queries to the GraphQL server, since those queries are very likely to fail validation, according to the [All Variables Used](https://spec.graphql.org/draft/#sec-All-Variables-Used) rule in the GraphQL specification. If you depend on the preservation of unused variables, you can restore the previous behavior by passing `includeUnusedVariables: true` to the `HttpLink` constructor (which is typically passed as `options.link` to the `ApolloClient` constructor).
    [@benjamn](https://github.com/benjamn) in [#7127](https://github.com/apollographql/apollo-client/pull/7127) - Ensure `MockLink` (used by `MockedProvider`) returns mock configuration errors (e.g. `No more mocked responses for the query ...`) through the Link's `Observable`, instead of throwing them. These errors are now available through the `error` property of a result.
    [@hwillson](https://github.com/hwillson) in [#7110](https://github.com/apollographql/apollo-client/pull/7110) > Returning mock configuration errors through the Link's `Observable` was the default behavior in Apollo Client 2.x. We changed it for 3, but the change has been problematic for those looking to migrate from 2.x to 3. We've decided to change this back with the understanding that not many people want or are relying on `MockLink`'s throwing exception approach. If you want to change this functionality, you can define custom error handling through `MockLink.setOnError`. - Unsubscribing the last observer from an `ObservableQuery` will once again unsubscribe from the underlying network `Observable` in all cases, as in Apollo Client 2.x, allowing network requests to be cancelled by unsubscribing.
    [@javier-garcia-meteologica](https://github.com/javier-garcia-meteologica) in [#7165](https://github.com/apollographql/apollo-client/pull/7165) and [#7170](https://github.com/apollographql/apollo-client/pull/7170). - The independent `QueryBaseOptions` and `ModifiableWatchQueryOptions` interface supertypes have been eliminated, and their fields are now defined by `QueryOptions`.
    [@DCtheTall](https://github.com/DCtheTall) in [#7136](https://github.com/apollographql/apollo-client/pull/7136) - Internally, Apollo Client now avoids nested imports from the `graphql` package, importing everything from the top-level package instead. For example, ```ts import { visit } from "graphql/language/visitor"; ``` is now just ```ts import { visit } from "graphql"; ``` Since the `graphql` package uses `.mjs` modules, your bundler may need to be configured to recognize `.mjs` files as ECMAScript modules rather than CommonJS modules.
    [@benjamn](https://github.com/benjamn) in [#7185](https://github.com/apollographql/apollo-client/pull/7185) ### Improvements - Support inheritance of type and field policies, according to `possibleTypes`.
    [@benjamn](https://github.com/benjamn) in [#7065](https://github.com/apollographql/apollo-client/pull/7065) - Allow configuring custom `merge` functions, including the `merge: true` and `merge: false` shorthands, in type policies as well as field policies.
    [@benjamn](https://github.com/benjamn) in [#7070](https://github.com/apollographql/apollo-client/pull/7070) - The verbosity of Apollo Client console messages can be globally adjusted using the `setLogVerbosity` function: ```ts import { setLogVerbosity } from "@apollo/client"; setLogVerbosity("log"); // display all messages setLogVerbosity("warn"); // display only warnings and errors (default) setLogVerbosity("error"); // display only errors setLogVerbosity("silent"); // hide all console messages ``` Remember that all logs, warnings, and errors are hidden in production.
    [@benjamn](https://github.com/benjamn) in [#7226](https://github.com/apollographql/apollo-client/pull/7226) - Modifying `InMemoryCache` fields that have `keyArgs` configured will now invalidate only the field value with matching key arguments, rather than invalidating all field values that share the same field name. If `keyArgs` has not been configured, the cache must err on the side of invalidating by field name, as before.
    [@benjamn](https://github.com/benjamn) in [#7351](https://github.com/apollographql/apollo-client/pull/7351) - Shallow-merge `options.variables` when combining existing or default options with newly-provided options, so new variables do not completely overwrite existing variables.
    [@amannn](https://github.com/amannn) in [#6927](https://github.com/apollographql/apollo-client/pull/6927) - Avoid displaying `Cache data may be lost...` warnings for scalar field values that happen to be objects, such as JSON data.
    [@benjamn](https://github.com/benjamn) in [#7075](https://github.com/apollographql/apollo-client/pull/7075) - In addition to the `result.data` property, `useQuery` and `useLazyQuery` will now provide a `result.previousData` property, which can be useful when a network request is pending and `result.data` is undefined, since `result.previousData` can be rendered instead of rendering an empty/loading state.
    [@hwillson](https://github.com/hwillson) in [#7082](https://github.com/apollographql/apollo-client/pull/7082) - Passing `validate: true` to the `SchemaLink` constructor will enable validation of incoming queries against the local schema before execution, returning validation errors in `result.errors`, just like a non-local GraphQL endpoint typically would.
    [@amannn](https://github.com/amannn) in [#7094](https://github.com/apollographql/apollo-client/pull/7094) - Allow optional arguments in `keyArgs: [...]` arrays for `InMemoryCache` field policies.
    [@benjamn](https://github.com/benjamn) in [#7109](https://github.com/apollographql/apollo-client/pull/7109) - Avoid registering `QueryPromise` when `skip` is `true` during server-side rendering.
    [@izumin5210](https://github.com/izumin5210) in [#7310](https://github.com/apollographql/apollo-client/pull/7310) - `ApolloCache` objects (including `InMemoryCache`) may now be associated with or disassociated from individual reactive variables by calling `reactiveVar.attachCache(cache)` and/or `reactiveVar.forgetCache(cache)`.
    [@benjamn](https://github.com/benjamn) in [#7350](https://github.com/apollographql/apollo-client/pull/7350) ## Apollo Client 3.2.9 ### Bug Fixes - Revert back to `default`-importing `React` internally, rather than using a namespace import.
    [@benjamn](https://github.com/benjamn) in [113475b1](https://github.com/apollographql/apollo-client/commit/113475b163a19a40a67465c11e8e6f48a1de7e76) ## Apollo Client 3.2.8 ### Bug Fixes - Ensure `sourcesContent` array is properly defined in `.js.map` files generated by `tsc`.
    [@benjamn](https://github.com/benjamn) in [#7371](https://github.com/apollographql/apollo-client/pull/7371) - Avoid relying on global `Symbol` properties in `ApolloContext.ts`.
    [@benjamn](https://github.com/benjamn) in [#7371](https://github.com/apollographql/apollo-client/pull/7371) ## Apollo Client 3.2.7 ### Bug Fixes - Revert updating `symbol-observable` from version 2.x to version 3, which caused TypeScript errors with some `@types/node` versions, especially in Angular applications.
    [@benjamn](https://github.com/benjamn) in [#7340](https://github.com/apollographql/apollo-client/pull/7340) ## Apollo Client 3.2.6 ### Bug Fixes - Always consider singleton IDs like `ROOT_QUERY` and `ROOT_MUTATION` to be root IDs during `cache.gc` garbage collection, regardless of whether they have been retained or released.
    [@benjamn](https://github.com/benjamn) in [#7333](https://github.com/apollographql/apollo-client/pull/7333) - Use optional chaining syntax (`this.currentObservable?.refetch`) in React `refetch` wrapper function to avoid crashing when an unmounted component is accidentally refetched.
    [@tm1000](https://github.com/tm1000) in [#6314](https://github.com/apollographql/apollo-client/pull/6314) and [@linmic](https://github.com/linmic) in [#7186](https://github.com/apollographql/apollo-client/pull/7186) ### Improvements - Handle older `react-apollo` package in `codemods/ac2-to-ac3/imports.js` migration script.
    [@tm1000](https://github.com/tm1000) in [#7216](https://github.com/apollographql/apollo-client/pull/7216) - Ensure `relayStylePagination` preserves `pageInfo.{start,end}Cursor` if `edges` is missing or empty.
    [@beaucollins](https://github.com/beaucollins) in [#7224](https://github.com/apollographql/apollo-client/pull/7224) ## Apollo Client 3.2.5 ### Improvements - Move `terser` dependency from `dependencies` to `devDependencies`.
    [@SimenB](https://github.com/SimenB) in [#7188](https://github.com/apollographql/apollo-client/pull/7188) - Avoid all sub-package imports from the `graphql` npm package.
    [@stoically](https://github.com/stoically) in [#7185](https://github.com/apollographql/apollo-client/pull/7185) ## Apollo Client 3.2.4 ### Improvements - Update the `optimism` npm dependency to version 0.13.0 in order to use the new `optimistic.forget` method to fix a potential `cache.watch` memory leak.
    [@benjamn](https://github.com/benjamn) in [#7157](https://github.com/apollographql/apollo-client/pull/7157) - Consider `cache.reset` a destructive method, like `cache.evict` and `cache.modify`.
    [@joshjg](https://github.com/joshjg) in [#7150](https://github.com/apollographql/apollo-client/pull/7150) - Avoid refetching observerless queries with `reFetchObservableQueries`.
    [@joshjg](https://github.com/joshjg) in [#7146](https://github.com/apollographql/apollo-client/pull/7146) ## Apollo Client 3.2.3 ### Improvements - Default `args.offset` to zero in `offsetLimitPagination`.
    [@benjamn](https://github.com/benjamn) in [#7141](https://github.com/apollographql/apollo-client/pull/7141) ## Apollo Client 3.2.2 ### Bug Fixes - Undo `TEdgeWrapper` approach for `relayStylePagination`, introduced by [f41e9efc](https://github.com/apollographql/apollo-client/commit/f41e9efc9e061b80fe5019456c049a3c56661e87) in [#7023](https://github.com/apollographql/apollo-client/pull/7023), since it was an unintended breaking change for existing code that used `cache.modify` to interact with field data managed by `relayStylePagination`.
    [@benjamn](https://github.com/benjamn) in [#7103](https://github.com/apollographql/apollo-client/pull/7103) ## Apollo Client 3.2.1 ### Bug Fixes - Fix `relayStylePagination` to handle the possibility that edges might be normalized `Reference` objects (uncommon).
    [@anark](https://github.com/anark) and [@benjamn](https://github.com/benjamn) in [#7023](https://github.com/apollographql/apollo-client/pull/7023) - Disable "Missing cache result fields" warnings when `returnPartialData` is `true`.
    [@hwillson](https://github.com/hwillson) in [#7055](https://github.com/apollographql/apollo-client/pull/7055) ### Improvements - Mark `subscriptions-transport-ws` `peerDependency` as optional.
    [@MasterOdin](https://github.com/MasterOdin) in [#7047](https://github.com/apollographql/apollo-client/pull/7047) ## Apollo Client 3.2.0 ### Bug Fixes - Use `options.nextFetchPolicy` internally to restore original `FetchPolicy` after polling with `fetchPolicy: "network-only"`, so that polling does not interfere with normal query watching.
    [@benjamn](https://github.com/benjamn) in [#6893](https://github.com/apollographql/apollo-client/pull/6893) - Initialize `ObservableQuery` in `updateObservableQuery` even if `skip` is `true`.
    [@mu29](https://github.com/mu29) in [#6999](https://github.com/apollographql/apollo-client/pull/6999) - Prevent full reobservation of queries affected by optimistic mutation updates, while still delivering results from the cache.
    [@benjamn](https://github.com/benjamn) in [#6854](https://github.com/apollographql/apollo-client/pull/6854) ### Improvements - In TypeScript, all APIs that take `DocumentNode` parameters now may alternatively take `TypeDocumentNode`. This type has the same JavaScript representation but allows the APIs to infer the data and variable types instead of requiring you to specify types explicitly at the call site.
    [@dotansimha](https://github.com/dotansimha) in [#6720](https://github.com/apollographql/apollo-client/pull/6720) - Bring back an improved form of heuristic fragment matching, by allowing `possibleTypes` to specify subtype regular expression strings, which count as matches if the written result object has all the fields expected for the fragment.
    [@benjamn](https://github.com/benjamn) in [#6901](https://github.com/apollographql/apollo-client/pull/6901) - Allow `options.nextFetchPolicy` to be a function that takes the current `FetchPolicy` and returns a new (or the same) `FetchPolicy`, making `nextFetchPolicy` more suitable for global use in `defaultOptions.watchQuery`.
    [@benjamn](https://github.com/benjamn) in [#6893](https://github.com/apollographql/apollo-client/pull/6893) - Implement `useReactiveVar` hook for consuming reactive variables in React components.
    [@benjamn](https://github.com/benjamn) in [#6867](https://github.com/apollographql/apollo-client/pull/6867) - Move `apollo-link-persisted-queries` implementation to `@apollo/client/link/persisted-queries`. Try running our [automated imports transform](https://github.com/apollographql/apollo-client/tree/main/scripts/codemods/ac2-to-ac3) to handle this conversion, if you're using `apollo-link-persisted-queries`.
    [@hwillson](https://github.com/hwillson) in [#6837](https://github.com/apollographql/apollo-client/pull/6837) - Disable feud-stopping logic after any `cache.evict` or `cache.modify` operation.
    [@benjamn](https://github.com/benjamn) in [#6817](https://github.com/apollographql/apollo-client/pull/6817) and [#6898](https://github.com/apollographql/apollo-client/pull/6898) - Throw if `writeFragment` cannot identify `options.data` when no `options.id` provided.
    [@jcreighton](https://github.com/jcreighton) in [#6859](https://github.com/apollographql/apollo-client/pull/6859) - Provide `options.storage` object to `cache.modify` functions, as provided to `read` and `merge` functions.
    [@benjamn](https://github.com/benjamn) in [#6991](https://github.com/apollographql/apollo-client/pull/6991) - Allow `cache.modify` functions to return `details.INVALIDATE` (similar to `details.DELETE`) to invalidate the current field, causing affected queries to rerun, even if the field's value is unchanged.
    [@benjamn](https://github.com/benjamn) in [#6991](https://github.com/apollographql/apollo-client/pull/6991) - Support non-default `ErrorPolicy` values (that is, `"ignore"` and `"all"`, in addition to the default value `"none"`) for mutations and subscriptions, like we do for queries.
    [@benjamn](https://github.com/benjamn) in [#7003](https://github.com/apollographql/apollo-client/pull/7003) - Remove invariant forbidding a `FetchPolicy` of `cache-only` in `ObservableQuery#refetch`.
    [@benjamn](https://github.com/benjamn) in [ccb0a79a](https://github.com/apollographql/apollo-client/pull/6774/commits/ccb0a79a588721f08bf87a131c31bf37fa3238e5), fixing [#6702](https://github.com/apollographql/apollo-client/issues/6702) ## Apollo Client 3.1.5 ### Bug Fixes - Make `ApolloQueryResult.data` field non-optional again.
    [@benjamn](https://github.com/benjamn) in [#6997](https://github.com/apollographql/apollo-client/pull/6997) ### Improvements - Allow querying `Connection` metadata without `args` in `relayStylePagination`.
    [@anark](https://github.com/anark) in [#6935](https://github.com/apollographql/apollo-client/pull/6935) ## Apollo Client 3.1.4 ### Bug Fixes - Restrict root object identification to `ROOT_QUERY` (the ID corresponding to the root `Query` object), allowing `Mutation` and `Subscription` as user-defined types.
    [@benjamn](https://github.com/benjamn) in [#6914](https://github.com/apollographql/apollo-client/pull/6914) - Prevent crash when `pageInfo` and empty `edges` are received by `relayStylePagination`.
    [@fracmak](https://github.com/fracmak) in [#6918](https://github.com/apollographql/apollo-client/pull/6918) ## Apollo Client 3.1.3 ### Bug Fixes - Consider only `result.data` (rather than all properties of `result`) when settling cache feuds.
    [@danReynolds](https://github.com/danReynolds) in [#6777](https://github.com/apollographql/apollo-client/pull/6777) ### Improvements - Provide [jscodeshift](https://www.npmjs.com/package/jscodeshift) transform for automatically converting Apollo Client 2.x `import` declarations to use Apollo Client 3.x packages. [Instructions](https://github.com/apollographql/apollo-client/tree/main/scripts/codemods/ac2-to-ac3).
    [@dminkovsky](https://github.com/dminkovsky) and [@jcreighton](https://github.com/jcreighton) in [#6486](https://github.com/apollographql/apollo-client/pull/6486) ## Apollo Client 3.1.2 ### Bug Fixes - Avoid making network requests when `skip` is `true`.
    [@hwillson](https://github.com/hwillson) in [#6752](https://github.com/apollographql/apollo-client/pull/6752) ### Improvements - Allow `SchemaLink.Options.context` function to be `async` (or return a `Promise`).
    [@benjamn](https://github.com/benjamn) in [#6735](https://github.com/apollographql/apollo-client/pull/6735) ## Apollo Client 3.1.1 ### Bug Fixes - Re-export cache types from `@apollo/client/core` (and thus also `@apollo/client`), again.
    [@benjamn](https://github.com/benjamn) in [#6725](https://github.com/apollographql/apollo-client/pull/6725) ## Apollo Client 3.1.0 ### Bug Fixes - Rework interdependencies between `@apollo/client/*` entry points, so that CommonJS and ESM modules are supported equally well, without any duplication of shared code.
    [@benjamn](https://github.com/benjamn) in [#6656](https://github.com/apollographql/apollo-client/pull/6656) and [#6657](https://github.com/apollographql/apollo-client/pull/6657) - Tolerate `!==` callback functions (like `onCompleted` and `onError`) in `useQuery` options, since those functions are almost always freshly evaluated each time `useQuery` is called.
    [@hwillson](https://github.com/hwillson) and [@benjamn](https://github.com/benjamn) in [#6588](https://github.com/apollographql/apollo-client/pull/6588) - Respect `context.queryDeduplication` if provided, and otherwise fall back to `client.deduplication` (as before).
    [@igaloly](https://github.com/igaloly) in [#6261](https://github.com/apollographql/apollo-client/pull/6261) and [@Kujawadl](https://github.com/Kujawadl) in [#6526](https://github.com/apollographql/apollo-client/pull/6526) - Refactor `ObservableQuery#getCurrentResult` to reenable immediate delivery of warm cache results. As part of this refactoring, the `ApolloCurrentQueryResult` type was eliminated in favor of `ApolloQueryResult`.
    [@benjamn](https://github.com/benjamn) in [#6710](https://github.com/apollographql/apollo-client/pull/6710) - Avoid clobbering `defaultOptions` with `undefined` values.
    [@benjamn](https://github.com/benjamn) in [#6715](https://github.com/apollographql/apollo-client/pull/6715) ### Improvements - Apollo Client will no longer modify `options.fetchPolicy` unless you pass `options.nextFetchPolicy` to request an explicit change in `FetchPolicy` after the current request. Although this is technically a breaking change, `options.nextFieldPolicy` makes it easy to restore the old behavior (by passing `cache-first`).
    [@benjamn](https://github.com/benjamn) in [#6712](https://github.com/apollographql/apollo-client/pull/6712), reverting [#6353](https://github.com/apollographql/apollo-client/pull/6353) - Errors of the form `Invariant Violation: 42` thrown in production can now be looked up much more easily, by consulting the auto-generated `@apollo/client/invariantErrorCodes.js` file specific to your `@apollo/client` version.
    [@benjamn](https://github.com/benjamn) in [#6665](https://github.com/apollographql/apollo-client/pull/6665) - Make the `client` field of the `MutationResult` type non-optional, since it is always provided.
    [@glasser](https://github.com/glasser) in [#6617](https://github.com/apollographql/apollo-client/pull/6617) - Allow passing an asynchronous `options.renderFunction` to `getMarkupFromTree`.
    [@richardscarrott](https://github.com/richardscarrott) in [#6576](https://github.com/apollographql/apollo-client/pull/6576) - Ergonomic improvements for `merge` and `keyArgs` functions in cache field policies.
    [@benjamn](https://github.com/benjamn) in [#6714](https://github.com/apollographql/apollo-client/pull/6714) ## Apollo Client 3.0.2 ### Bug Fixes - Avoid duplicating `graphql/execution/execute` dependency in CommonJS bundle for `@apollo/client/link/schema`, fixing `instanceof` errors reported in [#6621](https://github.com/apollographql/apollo-client/issues/6621) and [#6614](https://github.com/apollographql/apollo-client/issues/6614).
    [@benjamn](https://github.com/benjamn) in [#6624](https://github.com/apollographql/apollo-client/pull/6624) ## Apollo Client 3.0.1 ### Bug Fixes - Make sure `useQuery` `onCompleted` is not fired when `skip` is `true`.
    [@hwillson](https://github.com/hwillson) in [#6589](https://github.com/apollographql/apollo-client/pull/6589) - Revert changes to `peerDependencies` in `package.json` ([#6594](https://github.com/apollographql/apollo-client/pull/6594)), which would have allowed using incompatible future versions of `graphql` and/or `react` due to overly-permissive `>=` version constraints.
    [@hwillson](https://github.com/hwillson) in [#6605](https://github.com/apollographql/apollo-client/pull/6605) # Apollo Client 3.0.0 ## Improvements > ⚠️ **Note:** As of 3.0.0, Apollo Client uses a new package name: [`@apollo/client`](https://www.npmjs.com/package/@apollo/client) ### `ApolloClient` - **[BREAKING]** `ApolloClient` is now only available as a named export. The default `ApolloClient` export has been removed.
    [@hwillson](https://github.com/hwillson) in [#5425](https://github.com/apollographql/apollo-client/pull/5425) - **[BREAKING]** The `queryManager` property of `ApolloClient` instances is now marked as `private`, paving the way for a more aggressive redesign of its API. - **[BREAKING]** Apollo Client will no longer deliver "stale" results to `ObservableQuery` consumers, but will instead log more helpful errors about which cache fields were missing.
    [@benjamn](https://github.com/benjamn) in [#6058](https://github.com/apollographql/apollo-client/pull/6058) - **[BREAKING]** `ApolloError`'s thrown by Apollo Client no longer prefix error messages with `GraphQL error:` or `Network error:`. To differentiate between GraphQL/network errors, refer to `ApolloError`'s public `graphQLErrors` and `networkError` properties.
    [@lorensr](https://github.com/lorensr) in [#3892](https://github.com/apollographql/apollo-client/pull/3892) - **[BREAKING]** Support for the `@live` directive has been removed, but might be restored in the future if a more thorough implementation is proposed.
    [@benjamn](https://github.com/benjamn) in [#6221](https://github.com/apollographql/apollo-client/pull/6221) - **[BREAKING]** Apollo Client 2.x allowed `@client` fields to be passed into the `link` chain if `resolvers` were not set in the constructor. This allowed `@client` fields to be passed into Links like `apollo-link-state`. Apollo Client 3 enforces that `@client` fields are local only, meaning they are no longer passed into the `link` chain, under any circumstances.
    [@hwillson](https://github.com/hwillson) in [#5982](https://github.com/apollographql/apollo-client/pull/5982) - **[BREAKING?]** Refactor `QueryManager` to make better use of observables and enforce `fetchPolicy` more reliably.
    [@benjamn](https://github.com/benjamn) in [#6221](https://github.com/apollographql/apollo-client/pull/6221) - The `updateQuery` function previously required by `fetchMore` has been deprecated with a warning, and will be removed in the next major version of Apollo Client. Please consider using a `merge` function to handle incoming data instead of relying on `updateQuery`.
    [@benjamn](https://github.com/benjamn) in [#6464](https://github.com/apollographql/apollo-client/pull/6464) - Helper functions for generating common pagination-related field policies may be imported from `@apollo/client/utilities`. The most basic helper is `concatPagination`, which emulates the concatenation behavior of typical `updateQuery` functions. A more sophisticated helper is `offsetLimitPagination`, which implements offset/limit-based pagination. If you are consuming paginated data from a Relay-friendly API, use `relayStylePagination`. Feel free to use [these helper functions](https://github.com/apollographql/apollo-client/blob/main/src/utilities/policies/pagination.ts) as inspiration for your own field policies, and/or modify them to suit your needs.
    [@benjamn](https://github.com/benjamn) in [#6465](https://github.com/apollographql/apollo-client/pull/6465) - Updated to work with `graphql@15`.
    [@durchanek](https://github.com/durchanek) in [#6194](https://github.com/apollographql/apollo-client/pull/6194) and [#6279](https://github.com/apollographql/apollo-client/pull/6279)
    [@hagmic](https://github.com/hagmic) in [#6328](https://github.com/apollographql/apollo-client/pull/6328) - Apollo Link core and HTTP related functionality has been merged into `@apollo/client`. Functionality that was previously available through the `apollo-link`, `apollo-link-http-common` and `apollo-link-http` packages is now directly available from `@apollo/client` (e.g. `import { HttpLink } from '@apollo/client'`). The `ApolloClient` constructor has also been updated to accept new `uri`, `headers` and `credentials` options. If `uri` is specified, Apollo Client will take care of creating the necessary `HttpLink` behind the scenes.
    [@hwillson](https://github.com/hwillson) in [#5412](https://github.com/apollographql/apollo-client/pull/5412) - The `gql` template tag should now be imported from the `@apollo/client` package, rather than the `graphql-tag` package. Although the `graphql-tag` package still works for now, future versions of `@apollo/client` may change the implementation details of `gql` without a major version bump.
    [@hwillson](https://github.com/hwillson) in [#5451](https://github.com/apollographql/apollo-client/pull/5451) - `@apollo/client/core` can be used to import the Apollo Client core, which includes everything the main `@apollo/client` package does, except for all React related functionality.
    [@kamilkisiela](https://github.com/kamilkisiela) in [#5541](https://github.com/apollographql/apollo-client/pull/5541) - Several deprecated methods have been fully removed: - `ApolloClient#initQueryManager` - `QueryManager#startQuery` - `ObservableQuery#currentResult` - Apollo Client now supports setting a new `ApolloLink` (or link chain) after `new ApolloClient()` has been called, using the `ApolloClient#setLink` method.
    [@hwillson](https://github.com/hwillson) in [#6193](https://github.com/apollographql/apollo-client/pull/6193) - The final time a mutation `update` function is called, it can no longer accidentally read optimistic data from other concurrent mutations, which ensures the use of optimistic updates has no lasting impact on the state of the cache after mutations have finished.
    [@benjamn](https://github.com/benjamn) in [#6551](https://github.com/apollographql/apollo-client/pull/6551) - Apollo links that were previously maintained in https://github.com/apollographql/apollo-link have been merged into the Apollo Client project. They should be accessed using the new entry points listed in the [migration guide](./docs/source/migrating/apollo-client-3-migration.md).
    [@hwillson](https://github.com/hwillson) in [#](TODO) ### `InMemoryCache` > ⚠️ **Note:** `InMemoryCache` has been significantly redesigned and rewritten in Apollo Client 3.0. Please consult the [migration guide](https://www.apollographql.com/docs/react/v3.0-beta/migrating/apollo-client-3-migration/#cache-improvements) and read the new [documentation](https://www.apollographql.com/docs/react/v3.0-beta/caching/cache-configuration/) to understand everything that has been improved. - The `InMemoryCache` constructor should now be imported directly from `@apollo/client`, rather than from a separate package. The `apollo-cache-inmemory` package is no longer supported. > The `@apollo/client/cache` entry point can be used to import `InMemoryCache` without importing other parts of the Apollo Client codebase.
    > [@hwillson](https://github.com/hwillson) in [#5577](https://github.com/apollographql/apollo-client/pull/5577) - **[BREAKING]** `FragmentMatcher`, `HeuristicFragmentMatcher`, and `IntrospectionFragmentMatcher` have all been removed. We now recommend using `InMemoryCache`’s `possibleTypes` option instead. For more information see the [Defining `possibleTypes` manually](https://www.apollographql.com/docs/react/v3.0-beta/data/fragments/#defining-possibletypes-manually) section of the docs.
    [@benjamn](https://github.com/benjamn) in [#5073](https://github.com/apollographql/apollo-client/pull/5073) - **[BREAKING]** As promised in the [Apollo Client 2.6 blog post](https://blog.apollographql.com/whats-new-in-apollo-client-2-6-b3acf28ecad1), all cache results are now frozen/immutable.
    [@benjamn](https://github.com/benjamn) in [#5153](https://github.com/apollographql/apollo-client/pull/5153) - **[BREAKING]** Eliminate "generated" cache IDs to avoid normalizing objects with no meaningful ID, significantly reducing cache memory usage. This might be a backwards-incompatible change if your code depends on the precise internal representation of normalized data in the cache.
    [@benjamn](https://github.com/benjamn) in [#5146](https://github.com/apollographql/apollo-client/pull/5146) - **[BREAKING]** `InMemoryCache` will no longer merge the fields of written objects unless the objects are known to have the same identity, and the values of fields with the same name will not be recursively merged unless a custom `merge` function is defined by a field policy for that field, within a type policy associated with the `__typename` of the parent object.
    [@benjamn](https://github.com/benjamn) in [#5603](https://github.com/apollographql/apollo-client/pull/5603) - **[BREAKING]** `InMemoryCache` now _throws_ when data with missing or undefined query fields is written into the cache, rather than just warning in development.
    [@benjamn](https://github.com/benjamn) in [#6055](https://github.com/apollographql/apollo-client/pull/6055) - **[BREAKING]** `client|cache.writeData` have been fully removed. `writeData` usage is one of the easiest ways to turn faulty assumptions about how the cache represents data internally, into cache inconsistency and corruption. `client|cache.writeQuery`, `client|cache.writeFragment`, and/or `cache.modify` can be used to update the cache.
    [@benjamn](https://github.com/benjamn) in [#5923](https://github.com/apollographql/apollo-client/pull/5923) - `InMemoryCache` now supports tracing garbage collection and eviction. Note that the signature of the `evict` method has been simplified in a potentially backwards-incompatible way.
    [@benjamn](https://github.com/benjamn) in [#5310](https://github.com/apollographql/apollo-client/pull/5310) - **[beta-BREAKING]** Please note that the `cache.evict` method now requires `Cache.EvictOptions`, though it previously supported positional arguments as well.
    [@danReynolds](https://github.com/danReynolds) in [#6141](https://github.com/apollographql/apollo-client/pull/6141) [@benjamn](https://github.com/benjamn) in [#6364](https://github.com/apollographql/apollo-client/pull/6364) - Removing an entity object using the `cache.evict` method does not automatically remove dangling references to that entity elsewhere in the cache, but dangling references will be automatically filtered from lists whenever those lists are read from the cache. You can define a custom field `read` function to customize this behavior. See [#6412](https://github.com/apollographql/apollo-client/pull/6412), [#6425](https://github.com/apollographql/apollo-client/pull/6425), and [#6454](https://github.com/apollographql/apollo-client/pull/6454) for further explanation. - Cache methods that would normally trigger a broadcast, like `cache.evict`, `cache.writeQuery`, and `cache.writeFragment`, can now be called with a named options object, which supports a `broadcast: boolean` property that can be used to silence the broadcast, for situations where you want to update the cache multiple times without triggering a broadcast each time.
    [@benjamn](https://github.com/benjamn) in [#6288](https://github.com/apollographql/apollo-client/pull/6288) - `InMemoryCache` now `console.warn`s in development whenever non-normalized data is dangerously overwritten, with helpful links to documentation about normalization and custom `merge` functions.
    [@benjamn](https://github.com/benjamn) in [#6372](https://github.com/apollographql/apollo-client/pull/6372) - The result caching system (introduced in [#3394](https://github.com/apollographql/apollo-client/pull/3394)) now tracks dependencies at the field level, rather than at the level of whole entity objects, allowing the cache to return identical (`===`) results much more often than before.
    [@benjamn](https://github.com/benjamn) in [#5617](https://github.com/apollographql/apollo-client/pull/5617) - `InMemoryCache` now has a method called `modify` which can be used to update the value of a specific field within a specific entity object: ```ts cache.modify({ id: cache.identify(post), fields: { comments(comments: Reference[], { readField }) { return comments.filter( (comment) => idToRemove !== readField("id", comment) ); }, }, }); ``` This API gracefully handles cases where multiple field values are associated with a single field name, and also removes the need for updating the cache by reading a query or fragment, modifying the result, and writing the modified result back into the cache. Behind the scenes, the `cache.evict` method is now implemented in terms of `cache.modify`.
    [@benjamn](https://github.com/benjamn) in [#5909](https://github.com/apollographql/apollo-client/pull/5909) and [#6178](https://github.com/apollographql/apollo-client/pull/6178) - `InMemoryCache` provides a new API for storing client state that can be updated from anywhere: ```ts import { makeVar } from "@apollo/client"; const v = makeVar(123); console.log(v()); // 123 console.log(v(v() + 1)); // 124 console.log(v()); // 124 v("asdf"); // TS type error ``` These variables are _reactive_ in the sense that updating their values invalidates any previously cached query results that depended on the old values.
    [@benjamn](https://github.com/benjamn) in [#5799](https://github.com/apollographql/apollo-client/pull/5799), [#5976](https://github.com/apollographql/apollo-client/pull/5976), and [#6512](https://github.com/apollographql/apollo-client/pull/6512) - Various cache read and write performance optimizations, cutting read and write times by more than 50% in larger benchmarks.
    [@benjamn](https://github.com/benjamn) in [#5948](https://github.com/apollographql/apollo-client/pull/5948) - The `cache.readQuery` and `cache.writeQuery` methods now accept an `options.id` string, which eliminates most use cases for `cache.readFragment` and `cache.writeFragment`, and skips the implicit conversion of fragment documents to query documents performed by `cache.{read,write}Fragment`.
    [@benjamn](https://github.com/benjamn) in [#5930](https://github.com/apollographql/apollo-client/pull/5930) - Support `cache.identify(entity)` for easily computing entity ID strings.
    [@benjamn](https://github.com/benjamn) in [#5642](https://github.com/apollographql/apollo-client/pull/5642) - Support eviction of specific entity fields using `cache.evict(id, fieldName)`.
    [@benjamn](https://github.com/benjamn) in [#5643](https://github.com/apollographql/apollo-client/pull/5643) - Make `InMemoryCache#evict` remove data from all `EntityStore` layers.
    [@benjamn](https://github.com/benjamn) in [#5773](https://github.com/apollographql/apollo-client/pull/5773) - Stop paying attention to `previousResult` in `InMemoryCache`.
    [@benjamn](https://github.com/benjamn) in [#5644](https://github.com/apollographql/apollo-client/pull/5644) - Improve optimistic update performance by limiting cache key diversity.
    [@benjamn](https://github.com/benjamn) in [#5648](https://github.com/apollographql/apollo-client/pull/5648) - Custom field `read` functions can read from neighboring fields using the `readField(fieldName)` helper, and may also read fields from other entities by calling `readField(fieldName, objectOrReference)`.
    [@benjamn](https://github.com/benjamn) in [#5651](https://github.com/apollographql/apollo-client/pull/5651) - Expose cache `modify` and `identify` to the mutate `update` function.
    [@hwillson](https://github.com/hwillson) in [#5956](https://github.com/apollographql/apollo-client/pull/5956) - Add a default `gc` implementation to `ApolloCache`.
    [@justinwaite](https://github.com/justinwaite) in [#5974](https://github.com/apollographql/apollo-client/pull/5974) ### React - **[BREAKING]** The `QueryOptions`, `MutationOptions`, and `SubscriptionOptions` React Apollo interfaces have been renamed to `QueryDataOptions`, `MutationDataOptions`, and `SubscriptionDataOptions` (to avoid conflicting with similarly named and exported Apollo Client interfaces). - **[BREAKING]** Results with `loading: true` will no longer redeliver previous data, though they may provide partial data from the cache, when available.
    [@benjamn](https://github.com/benjamn) in [#6566](https://github.com/apollographql/apollo-client/pull/6566) - **[BREAKING?]** Remove `fixPolyfills.ts`, except when bundling for React Native. If you have trouble with `Map` or `Set` operations due to frozen key objects in React Native, either update React Native to version 0.59.0 (or 0.61.x, if possible) or investigate why `fixPolyfills.native.js` is not included in your bundle.
    [@benjamn](https://github.com/benjamn) in [#5962](https://github.com/apollographql/apollo-client/pull/5962) - The contents of the `@apollo/react-hooks` package have been merged into `@apollo/client`, enabling the following all-in-one `import`: ```ts import { ApolloClient, ApolloProvider, useQuery } from "@apollo/client"; ``` [@hwillson](https://github.com/hwillson) in [#5357](https://github.com/apollographql/apollo-client/pull/5357) - React SSR features (previously accessed via `@apollo/react-ssr`) can now be accessed from the separate Apollo Client entry point of `@apollo/client/react/ssr`. These features are not included in the default `@apollo/client` bundle.
    [@hwillson](https://github.com/hwillson) in [#6499](https://github.com/apollographql/apollo-client/pull/6499) ### General - **[BREAKING]** Removed `graphql-anywhere` since it's no longer used by Apollo Client.
    [@hwillson](https://github.com/hwillson) in [#5159](https://github.com/apollographql/apollo-client/pull/5159) - **[BREAKING]** Removed `apollo-boost` since Apollo Client 3.0 provides a boost like getting started experience out of the box.
    [@hwillson](https://github.com/hwillson) in [#5217](https://github.com/apollographql/apollo-client/pull/5217) - **[BREAKING]** We are no longer exporting certain (intended to be) internal utilities. If you are depending on some of the lesser known exports from `apollo-cache`, `apollo-cache-inmemory`, or `apollo-utilities`, they may no longer be available from `@apollo/client`.
    [@hwillson](https://github.com/hwillson) in [#5437](https://github.com/apollographql/apollo-client/pull/5437) and [#5514](https://github.com/apollographql/apollo-client/pull/5514) > Utilities that were previously externally available through the `apollo-utilities` package are now only available by importing from `@apollo/client/utilities`.
    > [@hwillson](https://github.com/hwillson) in [#5683](https://github.com/apollographql/apollo-client/pull/5683) - Make sure all `graphql-tag` public exports are re-exported.
    [@hwillson](https://github.com/hwillson) in [#5861](https://github.com/apollographql/apollo-client/pull/5861) - Fully removed `prettier`. The Apollo Client team has decided to no longer automatically enforce code formatting across the codebase. In most cases existing code styles should be followed as much as possible, but this is not a hard and fast rule.
    [@hwillson](https://github.com/hwillson) in [#5227](https://github.com/apollographql/apollo-client/pull/5227) - Make sure `ApolloContext` plays nicely with IE11 when storing the shared context.
    [@ms](https://github.com/ms) in [#5840](https://github.com/apollographql/apollo-client/pull/5840) - Migrated React Apollo HOC and Components functionality into Apollo Client, making it accessible from `@apollo/client/react/components` and `@apollo/client/react/hoc` entry points.
    [@hwillson](https://github.com/hwillson) in [#6558](https://github.com/apollographql/apollo-client/pull/6558) - Support passing a `context` object through the link execution chain when using subscriptions.
    [@sgtpepper43](https://github.com/sgtpepper43) in [#4925](https://github.com/apollographql/apollo-client/pull/4925) - `MockSubscriptionLink` now supports multiple subscriptions.
    [@dfrankland](https://github.com/dfrankland) in [#6081](https://github.com/apollographql/apollo-client/pull/6081) ### Bug Fixes - `useMutation` adjustments to help avoid an infinite loop / too many renders issue, caused by unintentionally modifying the `useState` based mutation result directly.
    [@hwillson](https://github/com/hwillson) in [#5770](https://github.com/apollographql/apollo-client/pull/5770) - Missing `__typename` fields no longer cause the `InMemoryCache#diff` result to be marked `complete: false`, if those fields were added by `InMemoryCache#transformDocument` (which calls `addTypenameToDocument`).
    [@benjamn](https://github.com/benjamn) in [#5787](https://github.com/apollographql/apollo-client/pull/5787) - Fixed an issue that allowed `@client @export` based queries to lead to extra unnecessary network requests being fired.
    [@hwillson](https://github.com/hwillson) in [#5946](https://github.com/apollographql/apollo-client/pull/5946) - Refined `useLazyQuery` types to help prevent runtime errors.
    [@benmosher](https://github.com/benmosher) in [#5935](https://github.com/apollographql/apollo-client/pull/5935) - Make sure `@client @export` variables used in watched queries are updated each time the query receives new data that changes the value of the `@export` variable.
    [@hwillson](https://github.com/hwillson) in [#5986](https://github.com/apollographql/apollo-client/pull/5986) - Ensure `useMutation` passes a defined `errorPolicy` option into its underlying `ApolloClient.mutate()` call.
    [@jamesreggio](https://github.com/jamesreggio) in [#5863](https://github.com/apollographql/apollo-client/pull/5863) - `useQuery`: Prevent new data re-render attempts during an existing render. This helps avoid React 16.13.0's "Cannot update a component from inside the function body of a different component" warning (https://github.com/facebook/react/pull/17099).
    [@hwillson](https://github.com/hwillson) in [#6107](https://github.com/apollographql/apollo-client/pull/6107) - Expand `ApolloError` typings to include `ServerError` and `ServerParseError`.
    [@dmarkow](https://github.com/dmarkow) in [#6319](https://github.com/apollographql/apollo-client/pull/6319) - Fast responses received over the link chain will no longer conflict with `skip` settings.
    [@hwillson](https://github.com/hwillson) in [#6587](https://github.com/apollographql/apollo-client/pull/6587) ## Apollo Client 2.6.8 ### Apollo Client (2.6.8) - Update the `fetchMore` type signature to accept `context`.
    [@koenpunt](https://github.com/koenpunt) in [#5147](https://github.com/apollographql/apollo-client/pull/5147) - Fix type for `Resolver` and use it in the definition of `Resolvers`.
    [@peoplenarthax](https://github.com/peoplenarthax) in [#4943](https://github.com/apollographql/apollo-client/pull/4943) - Local state resolver functions now receive a `fragmentMap: FragmentMap` object, in addition to the `field: FieldNode` object, via the `info` parameter.
    [@mjlyons](https://github.com/mjlyons) in [#5388](https://github.com/apollographql/apollo-client/pull/5388) - Documentation updates.
    [@tomquirk](https://github.com/tomquirk) in [#5645](https://github.com/apollographql/apollo-client/pull/5645)
    [@Sequoia](https://github.com/Sequoia) in [#5641](https://github.com/apollographql/apollo-client/pull/5641)
    [@phryneas](https://github.com/phryneas) in [#5628](https://github.com/apollographql/apollo-client/pull/5628)
    [@AryanJ-NYC](https://github.com/AryanJ-NYC) in [#5560](https://github.com/apollographql/apollo-client/pull/5560) ### GraphQL Anywhere (4.2.6) - Fix `filter` edge case involving `null`.
    [@lifeiscontent](https://github.com/lifeiscontent) in [#5110](https://github.com/apollographql/apollo-client/pull/5110) ### Apollo Boost (0.4.7) - Replace `GlobalFetch` reference with `WindowOrWorkerGlobalScope`.
    [@abdonrd](https://github.com/abdonrd) in [#5373](https://github.com/apollographql/apollo-client/pull/5373) - Add `assumeImmutableResults` typing to apollo boost `PresetConfig` interface.
    [@bencoullie](https://github.com/bencoullie) in [#5571](https://github.com/apollographql/apollo-client/pull/5571) ## Apollo Client (2.6.4) ### Apollo Client (2.6.4) - Modify `ObservableQuery` to allow queries with `notifyOnNetworkStatusChange` to be notified when loading after an error occurs.
    [@jasonpaulos](https://github.com/jasonpaulos) in [#4992](https://github.com/apollographql/apollo-client/pull/4992) - Add `graphql` as a `peerDependency` of `apollo-cache` and `graphql-anywhere`.
    [@ssalbdivad](https://github.com/ssalbdivad) in [#5081](https://github.com/apollographql/apollo-client/pull/5081) - Documentation updates.
    [@raibima](https://github.com/raibima) in [#5132](https://github.com/apollographql/apollo-client/pull/5132)
    [@hwillson](https://github.com/hwillson) in [#5141](https://github.com/apollographql/apollo-client/pull/5141) ## Apollo Client (2.6.3) ### Apollo Client (2.6.3) - A new `ObservableQuery.resetQueryStoreErrors()` method is now available that can be used to clear out `ObservableQuery` query store errors.
    [@hwillson](https://github.com/hwillson) in [#4941](https://github.com/apollographql/apollo-client/pull/4941) - Documentation updates.
    [@michael-watson](https://github.com/michael-watson) in [#4940](https://github.com/apollographql/apollo-client/pull/4940)
    [@hwillson](https://github.com/hwillson) in [#4969](https://github.com/apollographql/apollo-client/pull/4969) ## Apollo Client (2.6.1) ### Apollo Utilities 1.3.2 - Reimplement `isEqual` without pulling in massive `lodash.isequal`.
    [@benjamn](https://github.com/benjamn) in [#4924](https://github.com/apollographql/apollo-client/pull/4924) ## Apollo Client (2.6.1) - In all Apollo Client packages, the compilation of `lib/bundle.esm.js` to `lib/bundle.cjs.js` and `lib/bundle.umd.js` now uses Babel instead of Rollup, since Babel correctly compiles some [edge cases](https://github.com/apollographql/apollo-client/issues/4843#issuecomment-495717720) that neither Rollup nor TypeScript compile correctly.
    [@benjamn](https://github.com/benjamn) in [#4911](https://github.com/apollographql/apollo-client/pull/4911) ### Apollo Cache In-Memory 1.6.1 - Pretend that `__typename` exists on the root Query when matching fragments.
    [@benjamn](https://github.com/benjamn) in [#4853](https://github.com/apollographql/apollo-client/pull/4853) ### Apollo Utilities 1.3.1 - The `isEqual` function has been reimplemented using the `lodash.isequal` npm package, to better support circular references. Since the `lodash.isequal` package is already used by `react-apollo`, this change is likely to decrease total bundle size.
    [@capaj](https://github.com/capaj) in [#4915](https://github.com/apollographql/apollo-client/pull/4915) ## Apollo Client (2.6.0) - In production, `invariant(condition, message)` failures will now include a unique error code that can be used to trace the error back to the point of failure.
    [@benjamn](https://github.com/benjamn) in [#4521](https://github.com/apollographql/apollo-client/pull/4521) ### Apollo Client 2.6.0 - If you can be sure your application code does not modify cache result objects (see `freezeResults` note below), you can unlock substantial performance improvements by communicating this assumption via ```ts new ApolloClient({ assumeImmutableResults: true }); ``` which allows the client to avoid taking defensive snapshots of past results using `cloneDeep`, as explained by [@benjamn](https://github.com/benjamn) in [#4543](https://github.com/apollographql/apollo-client/pull/4543). - Identical overlapping queries are now deduplicated internally by `apollo-client`, rather than using the `apollo-link-dedup` package.
    [@benjamn](https://github.com/benjamn) in commit [7cd8479f](https://github.com/apollographql/apollo-client/pull/4586/commits/7cd8479f27ce38930f122e4f703c4081a75a63a7) - The `FetchPolicy` type has been split into two types, so that passing `cache-and-network` to `ApolloClient#query` is now forbidden at the type level, whereas previously it was forbidden by a runtime `invariant` assertion: ```ts export type FetchPolicy = | "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; ``` The exception thrown if you ignore the type error has also been improved to explain the motivation behind this restriction.
    [Issue #3130 (comment)](https://github.com/apollographql/apollo-client/issues/3130#issuecomment-478409066) and commit [cf069bc7](github.com/apollographql/apollo-client/commit/cf069bc7ee6577092234b0eb0ac32e05d50f5a1c) - Avoid updating (and later invalidating) cache watches when `fetchPolicy` is `'no-cache'`.
    [@bradleyayers](https://github.com/bradleyayers) in [PR #4573](https://github.com/apollographql/apollo-client/pull/4573), part of [issue #3452](https://github.com/apollographql/apollo-client/issues/3452) - Remove temporary `queryId` after `fetchMore` completes.
    [@doomsower](https://github.com/doomsower) in [#4440](https://github.com/apollographql/apollo-client/pull/4440) - Call `clearStore` callbacks after clearing store.
    [@ds8k](https://github.com/ds8k) in [#4695](https://github.com/apollographql/apollo-client/pull/4695) - Perform all `DocumentNode` transforms once, and cache the results.
    [@benjamn](https://github.com/benjamn) in [#4601](https://github.com/apollographql/apollo-client/pull/4601) - Accommodate `@client @export` variable changes in `ObservableQuery`.
    [@hwillson](https://github.com/hwillson) in [#4604](https://github.com/apollographql/apollo-client/pull/4604) - Support the `returnPartialData` option for watched queries again.
    [@benjamn](https://github.com/benjamn) in [#4743](https://github.com/apollographql/apollo-client/pull/4743) - Preserve `networkStatus` for incomplete `cache-and-network` queries.
    [@benjamn](https://github.com/benjamn) in [#4765](https://github.com/apollographql/apollo-client/pull/4765) - Preserve `cache-and-network` `fetchPolicy` when refetching.
    [@benjamn](https://github.com/benjamn) in [#4840](https://github.com/apollographql/apollo-client/pull/4840) - Update the React Native docs to remove the request for external example apps that we can link to. We're no longer going to manage a list of external example apps.
    [@hwillson](https://github.com/hwillson) in [#4531](https://github.com/apollographql/apollo-client/pull/4531) - Polling queries are no longer batched together, so their scheduling should be more predictable.
    [@benjamn](https://github.com/benjamn) in [#4800](https://github.com/apollographql/apollo-client/pull/4800) ### Apollo Cache In-Memory 1.6.0 - Support `new InMemoryCache({ freezeResults: true })` to help enforce immutability.
    [@benjamn](https://github.com/benjamn) in [#4514](https://github.com/apollographql/apollo-client/pull/4514) - Allow `IntrospectionFragmentMatcher` to match fragments against the root `Query`, as `HeuristicFragmentMatcher` does.
    [@rynobax](https://github.com/rynobax) in [#4620](https://github.com/apollographql/apollo-client/pull/4620) - Rerential identity (`===`) of arrays in cache results will now be preserved for unchanged data.
    [@benjamn](https://github.com/benjamn) in commit [f3091d6a](https://github.com/apollographql/apollo-client/pull/4586/commits/f3091d6a7e91be98549baea58903282cc540f460) - Avoid adding `__typename` field to `@client` selection sets that have been `@export`ed as input variables.
    [@benjamn](https://github.com/benjamn) in [#4784](https://github.com/apollographql/apollo-client/pull/4784) ### GraphQL Anywhere 4.2.2 - The `graphql` function can now be configured to ignore `@include` and `@skip` directives (useful when walking a fragment to generate prop types or filter result data).
    [@GreenGremlin](https://github.com/GreenGremlin) in [#4373](https://github.com/apollographql/apollo-client/pull/4373) ## Apollo Client 2.5.1 ### apollo-client 2.5.1 - Fixes `A tuple type element list cannot be empty` issue.
    [@benjamn](https://github.com/benjamn) in [#4502](https://github.com/apollographql/apollo-client/pull/4502) ### graphql-anywhere 4.2.1 - Adds back the missing `graphql-anywhere/lib/async` entry point.
    [@benjamn](https://github.com/benjamn) in [#4503](https://github.com/apollographql/apollo-client/pull/4503) ## Apollo Client (2.5.0) ### Apollo Client (2.5.0) - Introduces new local state management features (client-side schema and local resolver / `@client` support) and many overall code improvements, to help reduce the Apollo Client bundle size.
    [#4361](https://github.com/apollographql/apollo-client/pull/4361) - Revamped CJS and ESM bundling approach with Rollup.
    [@rosskevin](https://github.com/rosskevin) in [#4261](https://github.com/apollographql/apollo-client/pull/4261) - Fixes an issue where the `QueryManager` was accidentally returning cached data for `network-only` queries.
    [@danilobuerger](https://github.com/danilobuerger) in [#4352](https://github.com/apollographql/apollo-client/pull/4352) - Fixed an issue in the repo `.gitattributes` that was causing binary files to have their line endings adjusted, and cleaned up corrupted documentation images (ref: https://github.com/apollographql/apollo-client/pull/4232).
    [@rajington](https://github.com/rajington) in [#4438](https://github.com/apollographql/apollo-client/pull/4438) - Improve (and shorten) query polling implementation.
    [PR #4337](https://github.com/apollographql/apollo-client/pull/4337) ## Apollo Client (2.4.13) ### Apollo Client (2.4.13) - Resolve "invalidate" -> "invalidated" typo in `QueryManager`.
    [@quazzie](https://github.com/quazzie) in [#4041](https://github.com/apollographql/apollo-client/pull/4041) - Properly type `setQuery` and fix now typed callers.
    [@danilobuerger](https://github.com/danilobuerger) in [#4369](https://github.com/apollographql/apollo-client/pull/4369) - Align with the React Apollo decision that result `data` should be `TData | undefined` instead of `TData | {}`.
    [@danilobuerger](https://github.com/danilobuerger) in [#4356](https://github.com/apollographql/apollo-client/pull/4356) - Documentation updates.
    [@danilobuerger](https://github.com/danilobuerger) in [#4340](https://github.com/apollographql/apollo-client/pull/4340)
    [@justyn-clark](https://github.com/justyn-clark) in [#4383](https://github.com/apollographql/apollo-client/pull/4383)
    [@jtassin](https://github.com/jtassin) in [#4287](https://github.com/apollographql/apollo-client/pull/4287)
    [@Gongreg](https://github.com/Gongreg) in [#4386](https://github.com/apollographql/apollo-client/pull/4386)
    [@davecardwell](https://github.com/davecardwell) in [#4399](https://github.com/apollographql/apollo-client/pull/4399)
    [@michaelknoch](https://github.com/michaelknoch) in [#4384](https://github.com/apollographql/apollo-client/pull/4384)
    ## Apollo Client (2.4.12) ### Apollo Client (2.4.12) - Support `ApolloClient#stop` method for safe client disposal.
    [PR #4336](https://github.com/apollographql/apollo-client/pull/4336) ## Apollo Client (2.4.11) - Added explicit dependencies on the [`tslib`](https://www.npmjs.com/package/tslib) package to all client packages to fix [Issue #4332](https://github.com/apollographql/apollo-client/issues/4332). ### Apollo Client (2.4.11) - Reverted some breaking changes accidentally released in a patch version (2.4.10). [PR #4334](https://github.com/apollographql/apollo-client/pull/4334) ## Apollo Client (2.4.10) ### Apollo Client (2.4.10) - The `apollo-client` package no longer exports a `printAST` function from `graphql/language/printer`. If you need this functionality, import it directly: `import { print } from "graphql/language/printer"` - Query polling now uses a simpler scheduling strategy based on a single `setTimeout` interval rather than multiple `setInterval` timers. The new timer fires at the rate of the fastest polling interval, and queries with longer polling intervals fire whenever the time elapsed since they last fired exceeds their desired interval.
    [PR #4243](https://github.com/apollographql/apollo-client/pull/4243) ### Apollo Cache In-Memory (1.4.1) - The `optimism` npm package has been updated to a version (0.6.9) that provides its own TypeScript declarations, which should fix problems like [Issue #4327](https://github.com/apollographql/apollo-client/issues/4327).
    [PR #4331](https://github.com/apollographql/apollo-client/pull/4331) - Error messages involving GraphQL queries now print the queries using `JSON.stringify` instead of the `print` function exported by the `graphql` package, to avoid pulling unnecessary printing logic into your JavaScript bundle.
    [PR #4234](https://github.com/apollographql/apollo-client/pull/4234) - The `QueryKeyMaker` abstraction has been removed, meaning that cache results for non-identical queries (or sub-queries) with equivalent structure will no longer be cached together. This feature was a nice optimization in certain specific use cases, but it was not worth the additional complexity or bundle size.
    [PR #4245](https://github.com/apollographql/apollo-client/pull/4245) ### Apollo Utilities (1.1.1) - The `flattenSelections` helper function is no longer exported from `apollo-utilities`, since `getDirectiveNames` has been reimplemented without using `flattenSelections`, and `flattenSelections` has no clear purpose now. If you need the old functionality, use a visitor: ```ts import { visit } from "graphql/language/visitor"; function flattenSelections(selection: SelectionNode) { const selections: SelectionNode[] = []; visit(selection, { SelectionSet(ss) { selections.push(...ss.selections); }, }); return selections; } ``` ## Apollo Client (2.4.9) ### Apollo Client (2.4.9) - Apollo Client has been updated to use `graphql` 14.x as a dev dependency.
    [@hwillson](https://github.com/hwillson) in [#4233](https://github.com/apollographql/apollo-client/pull/4233) - The `onClearStore` function can now be used to register callbacks that should be triggered when calling `clearStore`.
    [@joe-re](https://github.com/joe-re) in [#4082](https://github.com/apollographql/apollo-client/pull/4082) - Make `isApolloError` available for external use.
    [@FredyC](https://github.com/FredyC) in [#4223](https://github.com/apollographql/apollo-client/pull/4223) - The `QueryManager` now calls `complete` on the observables used by Apollo Client's Subscription handling. This gives finite subscriptions a chance to handle cleanup.
    [@sujeetsr](https://github.com/sujeetsr) in [#4290](https://github.com/apollographql/apollo-client/pull/4290) - Documentation updates.
    [@lifedup](https://github.com/lifedup) in [#3931](https://github.com/apollographql/apollo-client/pull/3931)
    [@Dem0n3D](https://github.com/Dem0n3D) in [#4008](https://github.com/apollographql/apollo-client/pull/4008)
    [@anand-sundaram-zocdoc](https://github.com/anand-sundaram-zocdoc) in [#4009](https://github.com/apollographql/apollo-client/pull/4009)
    [@mattphoto](https://github.com/mattphoto) in [#4026](https://github.com/apollographql/apollo-client/pull/4026)
    [@birge](https://github.com/birge) in [#4029](https://github.com/apollographql/apollo-client/pull/4029)
    [@mxstbr](https://github.com/mxstbr) in [#4127](https://github.com/apollographql/apollo-client/pull/4127)
    [@Caerbannog](https://github.com/Caerbannog) in [#4140](https://github.com/apollographql/apollo-client/pull/4140)
    [@jedwards1211](https://github.com/jedwards1211) in [#4179](https://github.com/apollographql/apollo-client/pull/4179)
    [@nutboltu](https://github.com/nutboltu) in [#4182](https://github.com/apollographql/apollo-client/pull/4182)
    [@CarloPalinckx](https://github.com/CarloPalinckx) in [#4189](https://github.com/apollographql/apollo-client/pull/4189)
    [@joebernard](https://github.com/joebernard) in [#4206](https://github.com/apollographql/apollo-client/pull/4206)
    [@evans](https://github.com/evans) in [#4213](https://github.com/apollographql/apollo-client/pull/4213)
    [@danilobuerger](https://github.com/danilobuerger) in [#4214](https://github.com/apollographql/apollo-client/pull/4214)
    [@stubailo](https://github.com/stubailo) in [#4220](https://github.com/apollographql/apollo-client/pull/4220)
    [@haysclark](https://github.com/haysclark) in [#4255](https://github.com/apollographql/apollo-client/pull/4255)
    [@shelmire](https://github.com/shelmire) in [#4266](https://github.com/apollographql/apollo-client/pull/4266)
    [@peggyrayzis](https://github.com/peggyrayzis) in [#4280](https://github.com/apollographql/apollo-client/pull/4280)
    [@caydie-tran](https://github.com/caydie-tran) in [#4300](https://github.com/apollographql/apollo-client/pull/4300) ### Apollo Utilities (1.1.0) - Transformation utilities have been refactored to work with `graphql` 14.x. GraphQL AST's are no longer being directly modified.
    [@hwillson](https://github.com/hwillson) in [#4233](https://github.com/apollographql/apollo-client/pull/4233) ### Apollo Cache In-Memory (1.4.0) - The speed and memory usage of optimistic reads and writes has been improved dramatically using a new layering technique that does not require copying the non-optimistic contents of the cache.
    [PR #4319](https://github.com/apollographql/apollo-client/pull/4319/) - The `RecordingCache` abstraction has been removed, and thus is no longer exported from `apollo-cache-inmemory`.
    [PR #4319](https://github.com/apollographql/apollo-client/pull/4319/) - Export the optimism `wrap` function using ES2015 export syntax, instead of CommonJS.
    [@ardatan](https://github.com/ardatan) in [#4158](https://github.com/apollographql/apollo-client/pull/4158) ## Apollo Client (2.4.8) ### Apollo Client (2.4.8) - Documentation and config updates.
    [@justinanastos](https://github.com/justinanastos) in [#4187](https://github.com/apollographql/apollo-client/pull/4187)
    [@PowerKiKi](https://github.com/PowerKiKi) in [#3693](https://github.com/apollographql/apollo-client/pull/3693)
    [@nandito](https://github.com/nandito) in [#3865](https://github.com/apollographql/apollo-client/pull/3865) - Schema/AST tranformation utilities have been updated to work properly with `@client` directives.
    [@justinmakaila](https://github.com/justinmakaila) in [#3482](https://github.com/apollographql/apollo-client/pull/3482) ### Apollo Cache In-Memory (1.3.12) - Avoid using `DepTrackingCache` for optimistic reads. [PR #4521](https://github.com/apollographql/apollo-client/pull/4251) - When creating an `InMemoryCache` object, it's now possible to disable the result caching behavior introduced in [#3394](https://github.com/apollographql/apollo-client/pull/3394), either for diagnostic purposes or because the benefit of caching repeated reads is not worth the extra memory usage in your application: ```ts new InMemoryCache({ resultCaching: false, }); ``` Part of [PR #4521](https://github.com/apollographql/apollo-client/pull/4251). ## Apollo Client (2.4.7) ### Apollo Client (2.4.7) - The `ApolloClient` constructor has been updated to accept `name` and `version` params, that can be used to support Apollo Server [Client Awareness](https://www.apollographql.com/docs/apollo-server/v2/features/metrics.html#Client-Awareness) functionality. These client awareness properties are passed into the defined Apollo Link chain, and are then ultimately sent out as custom headers with outgoing requests.
    [@hwillson](https://github.com/hwillson) in [#4154](https://github.com/apollographql/apollo-client/pull/4154) ### Apollo Boost (0.1.22) - No changes. ### Apollo Cache (1.1.21) - No changes. ### Apollo Cache In-Memory (1.3.11) - No changes. ### Apollo Utilities (1.0.26) - No changes. ### Graphql Anywhere (4.1.23) - No changes. ## Apollo Client (2.4.6) ### Apollo Cache In-Memory (1.3.10) - Added some `return`s to prevent errors with `noImplicitReturns` TypeScript rule. [PR #4137](https://github.com/apollographql/apollo-client/pull/4137) - Exclude the `src/` directory when publishing `apollo-cache-inmemory`. [Issue #4083](https://github.com/apollographql/apollo-client/issues/4083) ## Apollo Client (2.4.5) - Optimistic tests cleanup. [PR #3834](https://github.com/apollographql/apollo-client/pull/3834) by [@joshribakoff](https://github.com/joshribakoff) - Documentation updates. [PR #3840](https://github.com/apollographql/apollo-client/pull/3840) by [@chentsulin](https://github.com/chentsulin) and [PR #3844](https://github.com/apollographql/apollo-client/pull/3844) by [@lorensr](https://github.com/lorensr) - Implement `ObservableQuery#isDifferentFromLastResult` to fix [Issue #4054](https://github.com/apollographql/apollo-client/issues/4054) and [Issue #4031](https://github.com/apollographql/apollo-client/issues/4031). [PR #4069](https://github.com/apollographql/apollo-client/pull/4069) ### Apollo Cache (1.1.20) - Add `readQuery` test to make sure options aren't mutated. [@CarloPalinckx](https://github.com/CarloPalinckx) in [#3838](https://github.com/apollographql/apollo-client/pull/3838) ### Apollo Cache In-Memory (1.3.9) - Avoid modifying source objects when merging cache results. [Issue #4081](https://github.com/apollographql/apollo-client/issues/4081) [PR #4089](https://github.com/apollographql/apollo-client/pull/4089) ### Apollo Utilities (1.0.25) - Fix `apollo-utilities` `isEqual` bug due to missing `hasOwnProperty` check. [PR #4072](https://github.com/apollographql/apollo-client/pull/4072) by [@samkline](https://github.com/samkline) ## Apollo Client (2.4.4) ### Apollo Utilities (1.0.24) - Discard property accessor functions in `cloneDeep` helper, to fix [issue #4034](https://github.com/apollographql/apollo-client/issues/4034). - Unconditionally remove `cloneDeep` property accessors. [PR #4039](https://github.com/apollographql/apollo-client/pull/4039) - Avoid copying non-enumerable and/or `Symbol` keys in `cloneDeep`. [PR #4052](https://github.com/apollographql/apollo-client/pull/4052) ### Apollo Cache In-Memory (1.3.7) - Throw when querying non-scalar objects without a selection set. [Issue #4025](https://github.com/apollographql/apollo-client/issues/4025) [PR #4038](https://github.com/apollographql/apollo-client/pull/4038) - Work around spec non-compliance of `Map#set` and `Set#add` in IE11. [Issue #4024](https://github.com/apollographql/apollo-client/issues/4024) [PR #4012](https://github.com/apollographql/apollo-client/pull/4012) ## Apollo Client (2.4.3) - Add additional checks to make sure we don't try to set the network status of queries in the store, when the store doesn't exist.
    [@i6mi6](https://github.com/i6mi6) in [#3914](https://github.com/apollographql/apollo-client/pull/3914) - Documentation updates.
    [@shanonvl](https://github.com/shanonvl) in [#3925](https://github.com/apollographql/apollo-client/pull/3925)
    [@ojh102](https://github.com/ojh102) in [#3920](https://github.com/apollographql/apollo-client/pull/3920)
    [@Bkucera](https://github.com/Bkucera) in [#3919](https://github.com/apollographql/apollo-client/pull/3919)
    [@j4chou](https://github.com/j4chou) in [#3915](https://github.com/apollographql/apollo-client/pull/3915)
    [@billfienberg](https://github.com/billfienberg) in [#3886](https://github.com/apollographql/apollo-client/pull/3886)
    [@TLadd](https://github.com/TLadd) in [#3884](https://github.com/apollographql/apollo-client/pull/3884) - The `ObservableQuery` class now makes a deep clone of `lastResult` when first received, so that the `isDifferentResult` logic will not be confused if the result object is modified later. [Issue #3992](https://github.com/apollographql/apollo-client/issues/3992) [PR #4032](https://github.com/apollographql/apollo-client/pull/4032/commits/e66027c5341dc7aaf71ee7ffcba1305b9a553525) ### Apollo Cache In-Memory (1.3.6) - Optimize repeated `apollo-cache-inmemory` reads by caching partial query results, for substantial performance improvements. As a consequence, watched queries will not be rebroadcast unless the data have changed. [PR #3394](https://github.com/apollographql/apollo-client/pull/3394) - Include root ID and fragment matcher function in cache keys computed by `StoreReader#executeStoreQuery` and `executeSelectionSet`, and work around bugs in the React Native `Map` and `Set` polyfills. [PR #3964](https://github.com/apollographql/apollo-client/pull/3964) [React Native PR #21492 (pending)](https://github.com/facebook/react-native/pull/21492) - The `apollo-cache-inmemory` package now allows `graphql@^14.0.0` as a peer dependency. [Issue #3978](https://github.com/apollographql/apollo-client/issues/3978) - The `apollo-cache-inmemory` package now correctly broadcasts changes even when the new data is `===` to the old data, since the contents of the data object may have changed. [Issue #3992](https://github.com/apollographql/apollo-client/issues/3992) [PR #4032](https://github.com/apollographql/apollo-client/pull/4032/commits/d6a673fbc1444e115e90cc9e4c7fa3fc67bb7e56) ### Apollo GraphQL Anywhere (4.1.20) - Make `graphql-anywhere` `filter` function generic (typescript).
    [@minznerjosh](https://github.com/minznerjosh) in [#3929](https://github.com/apollographql/apollo-client/pull/3929) ### Apollo Utilities (1.0.22) - The `fclone` package has been replaced with a custom `cloneDeep` implementation that is tolerant of cycles, symbol properties, and non-enumerable properties. [PR #4032](https://github.com/apollographql/apollo-client/pull/4032/commits/78e2ad89f950da2829f49c7876f968adb2bc1302) ### Apollo Boost (0.1.17) - Remove duplicate InMemoryCache export for Babel 6 compatibility. [Issue #3910](https://github.com/apollographql/apollo-client/issues/3910) [PR #3932](https://github.com/apollographql/apollo-client/pull/3932) ### Apollo Cache (1.1.18) - No changes. ## Apollo Client (2.4.2) ### Apollo Client (2.4.2) - Apollo Client no longer deep freezes query results. [@hwillson](https://github.com/hwillson) in [#3883](https://github.com/apollographql/apollo-client/pull/3883) - A new `clearStore` method has been added, that will remove all data from the store. Unlike `resetStore`, it will not refetch active queries after removing store data. [@hwillson](https://github.com/hwillson) in [#3885](https://github.com/apollographql/apollo-client/pull/3885) ### Apollo Utilities (1.0.21) - Replace the custom `cloneDeep` implementation with [`fclone`](https://www.npmjs.com/package/fclone), to avoid crashing when encountering circular references.
    [@hwillson](https://github.com/hwillson) in [#3881](https://github.com/apollographql/apollo-client/pull/3881) ### Apollo Boost (0.1.16) - No changes. ### Apollo Cache (1.1.17) - No changes. ### Apollo Cache In-Memory (1.2.10) - No changes. ### Apollo GraphQL Anywhere (4.1.19) - No changes. ## 2.4.1 (August 26, 2018) ### Apollo Client (2.4.1) - `mutate`'s `refetchQueries` option now allows queries to include a custom `context` option. This `context` will be used when refetching the query. For example: ```js context = { headers: { token: 'some auth token', }, }; client.mutate({ mutation: UPDATE_CUSTOMER_MUTATION, variables: { userId: user.id, firstName, ... }, refetchQueries: [{ query: CUSTOMER_MESSAGES_QUERY, variables: { userId: user.id }, context, }], context, }); ``` The `CUSTOMER_MESSAGES_QUERY` above will be refetched using `context`. Normally queries are refetched using the original context they were first started with, but this provides a way to override the context, if needed.
    [@hwillson](https://github.com/hwillson) in [#3852](https://github.com/apollographql/apollo-client/pull/3852) - Documentation updates.
    [@hwillson](https://github.com/hwillson) in [#3841](https://github.com/apollographql/apollo-client/pull/3841) ### Apollo Boost (0.1.15) - Various internal infrastructure changes related to building, bundling, testing, etc. [@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817) ### Apollo Cache (1.1.16) - Various internal infrastructure changes related to building, bundling, testing, etc. [@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817) ### Apollo Cache In-Memory (1.2.9) - Various internal infrastructure changes related to building, bundling, testing, etc. [@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817) ### Apollo Utilities (1.0.20) - Various internal infrastructure changes related to building, bundling, testing, etc. [@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817) ### Apollo GraphQL Anywhere (4.1.18) - Various internal infrastructure changes related to building, bundling, testing, etc. [@hwillson](https://github.com/hwillson) in [#3817](https://github.com/apollographql/apollo-client/pull/3817) ## 2.4.0 (August 17, 2018) ### Apollo Client (2.4.0) - Add proper error handling for subscriptions. If you have defined an `error` handler on your subscription observer, it will now be called when an error comes back in a result, and the `next` handler will be skipped (similar to how we're handling errors with mutations). Previously, the error was just passed in the result to the `next` handler. If you don't have an `error` handler defined, the previous functionality is maintained, meaning the error is passed in the result, giving the next handler a chance to deal with it. This should help address backwards compatibility (and is the reason for the minor version bumo in this release).
    [@clayne11](https://github.com/clayne11) in [#3800](https://github.com/apollographql/apollo-client/pull/3800) - Allow an `optimistic` param to be passed into `ApolloClient.readQuery` and `ApolloClient.readFragment`, that when set to `true`, will allow optimistic results to be returned. Is `false` by default.
    [@jay1337](https://github.com/jay1337) in [#2429](https://github.com/apollographql/apollo-client/pull/2429) - Optimistic tests cleanup.
    [@joshribakoff](https://github.com/joshribakoff) in [#3713](https://github.com/apollographql/apollo-client/pull/3713) - Make sure each package has its own `.npmignore`, so they're taken into consideration when publishing via lerna.
    [@hwillson](https://github.com/hwillson) in [#3828](https://github.com/apollographql/apollo-client/pull/3828) - Documentation updates.
    [@toolness](https://github.com/toolness) in [#3804](https://github.com/apollographql/apollo-client/pull/3804)
    [@pungggi](https://github.com/pungggi) in [#3798](https://github.com/apollographql/apollo-client/pull/3798)
    [@lorensr](https://github.com/lorensr) in [#3748](https://github.com/apollographql/apollo-client/pull/3748)
    [@joshribakoff](https://github.com/joshribakoff) in [#3730](https://github.com/apollographql/apollo-client/pull/3730)
    [@yalamber](https://github.com/yalamber) in [#3819](https://github.com/apollographql/apollo-client/pull/3819)
    [@pschreibs85](https://github.com/pschreibs85) in [#3812](https://github.com/apollographql/apollo-client/pull/3812)
    [@msreekm](https://github.com/msreekm) in [#3808](https://github.com/apollographql/apollo-client/pull/3808)
    [@kamaltmo](https://github.com/kamaltmo) in [#3806](https://github.com/apollographql/apollo-client/pull/3806)
    [@lorensr](https://github.com/lorensr) in [#3739](https://github.com/apollographql/apollo-client/pull/3739)
    [@brainkim](https://github.com/brainkim) in [#3680](https://github.com/apollographql/apollo-client/pull/3680) ### Apollo Cache In-Memory (1.2.8) - Fix typo in `console.warn` regarding fragment matching error message.
    [@combizs](https://github.com/combizs) in [#3701](https://github.com/apollographql/apollo-client/pull/3701) ### Apollo Boost (0.1.14) - No changes. ### Apollo Cache (1.1.15) - No changes. ### Apollo Utilities (1.0.19) - No changes. ### Apollo GraphQL Anywhere (4.1.17) - No changes. ## 2.3.8 (August 9, 2018) ### Apollo Client (2.3.8) - Adjusted the `graphql` peer dependency to cover explicit minor ranges. Since the ^ operator only covers any minor version if the major version is not 0 (since a major version of 0 is technically considered development by semver 2), the current ^0.11.0 || ^14.0.0 graphql range doesn't cover 0.12._ or 0.13._. This fixes the `apollo-client@X has incorrect peer dependency "graphql@^0.11.0 || ^14.0.0"` errors that people might have seen using `graphql` 0.12.x or 0.13.x.
    [@hwillson](https://github.com/hwillson) in [#3746](https://github.com/apollographql/apollo-client/pull/3746) - Document `setVariables` internal API status.
    [@PowerKiKi](https://github.com/PowerKiKi) in [#3692](https://github.com/apollographql/apollo-client/pull/3692) - Corrected `ApolloClient.queryManager` typing as it may be `undefined`.
    [@danilobuerger](https://github.com/danilobuerger) in [#3661](https://github.com/apollographql/apollo-client/pull/3661) - Make sure using a `no-cache` fetch policy with subscriptions prevents data from being cached.
    [@hwillson](https://github.com/hwillson) in [#3773](https://github.com/apollographql/apollo-client/pull/3773) - Fixed an issue that sometimes caused empty query results, when using the `no-cache` fetch policy.
    [@hwillson](https://github.com/hwillson) in [#3777](https://github.com/apollographql/apollo-client/pull/3777) - Documentation updates.
    [@hwillson](https://github.com/hwillson) in [#3750](https://github.com/apollographql/apollo-client/pull/3750)
    [@hwillson](https://github.com/hwillson) in [#3754](https://github.com/apollographql/apollo-client/pull/3754)
    [@TheMightyPenguin](https://github.com/TheMightyPenguin) in [#3725](https://github.com/apollographql/apollo-client/pull/3725)
    [@bennypowers](https://github.com/bennypowers) in [#3668](https://github.com/apollographql/apollo-client/pull/3668)
    [@hwillson](https://github.com/hwillson) in [#3762](https://github.com/apollographql/apollo-client/pull/3762)
    [@chentsulin](https://github.com/chentsulin) in [#3688](https://github.com/apollographql/apollo-client/pull/3688)
    [@chentsulin](https://github.com/chentsulin) in [#3687](https://github.com/apollographql/apollo-client/pull/3687)
    [@ardouglass](https://github.com/ardouglass) in [#3645](https://github.com/apollographql/apollo-client/pull/3645)
    [@hwillson](https://github.com/hwillson) in [#3764](https://github.com/apollographql/apollo-client/pull/3764)
    [@hwillson](https://github.com/hwillson) in [#3767](https://github.com/apollographql/apollo-client/pull/3767)
    [@hwillson](https://github.com/hwillson) in [#3774](https://github.com/apollographql/apollo-client/pull/3774)
    [@hwillson](https://github.com/hwillson) in [#3779](https://github.com/apollographql/apollo-client/pull/3779) ### Apollo Boost (0.1.13) - No changes. ### Apollo Cache In-Memory (1.2.7) - No changes. ### Apollo Cache (1.1.14) - No changes. ### Apollo Utilities (1.0.18) - No changes. ### Apollo GraphQL Anywhere (4.1.16) - No changes. ## 2.3.7 (July 24, 2018) ### Apollo Client (2.3.7) - Release 2.3.6 broke Typescript compilation. `QueryManager`'s `getQueryWithPreviousResult` method included an invalid `variables` return type in the auto-generated `core/QueryManager.d.ts` declaration file. The type definition had a locally referenced path, that appears to have been caused by the typescript compiler getting confused at compile/publish time. `getQueryWithPreviousResult` return types are now excplicity identified, which helps Typescript avoid the local type reference. For more details, see https://github.com/apollographql/apollo-client/issues/3729.
    [@hwillson](https://github.com/hwillson) in [#3731](https://github.com/apollographql/apollo-client/pull/3731) ### Apollo Boost (0.1.12) - No changes. ## 2.3.6 (July 24, 2018) ### Apollo Client (2.3.6) - Documentation updates.
    [@ananth99](https://github.com/ananth99) in [#3599](https://github.com/apollographql/apollo-client/pull/3599)
    [@hwillson](https://github.com/hwillson) in [#3635](https://github.com/apollographql/apollo-client/pull/3635)
    [@JakeDawkins](https://github.com/JakeDawkins) in [#3642](https://github.com/apollographql/apollo-client/pull/3642)
    [@hwillson](https://github.com/hwillson) in [#3644](https://github.com/apollographql/apollo-client/pull/3644)
    [@gbau](https://github.com/gbau) in [#3644](https://github.com/apollographql/apollo-client/pull/3600)
    [@chentsulin](https://github.com/chentsulin) in [#3608](https://github.com/apollographql/apollo-client/pull/3608)
    [@MikaelCarpenter](https://github.com/MikaelCarpenter) in [#3609](https://github.com/apollographql/apollo-client/pull/3609)
    [@Gamezpedia](https://github.com/Gamezpedia) in [#3612](https://github.com/apollographql/apollo-client/pull/3612)
    [@jinxac](https://github.com/jinxac) in [#3647](https://github.com/apollographql/apollo-client/pull/3647)
    [@abernix](https://github.com/abernix) in [#3705](https://github.com/apollographql/apollo-client/pull/3705)
    [@dandv](https://github.com/dandv) in [#3703](https://github.com/apollographql/apollo-client/pull/3703)
    [@hwillson](https://github.com/hwillson) in [#3580](https://github.com/apollographql/apollo-client/pull/3580)
    - Updated `graphql` `peerDependencies` to handle 14.x versions.
    [@ivank](https://github.com/ivank) in [#3598](https://github.com/apollographql/apollo-client/pull/3598) - Add optional generic type params for variables on low level methods.
    [@mvestergaard](https://github.com/mvestergaard) in [#3588](https://github.com/apollographql/apollo-client/pull/3588) - Add a new `awaitRefetchQueries` config option to the Apollo Client `mutate` function, that when set to `true` will wait for all `refetchQueries` to be fully refetched, before resolving the mutation call. `awaitRefetchQueries` is `false` by default.
    [@jzimmek](https://github.com/jzimmek) in [#3169](https://github.com/apollographql/apollo-client/pull/3169) ### Apollo Boost (0.1.11) - Allow `fetch` to be given as a configuration option to `ApolloBoost`.
    [@mbaranovski](https://github.com/mbaranovski) in [#3590](https://github.com/apollographql/apollo-client/pull/3590) - The `apollo-boost` `ApolloClient` constructor now warns about unsupported options.
    [@quentin-](https://github.com/quentin-) in [#3551](https://github.com/apollographql/apollo-client/pull/3551) ### Apollo Cache (1.1.13) - No changes. ### Apollo Cache In-Memory (1.2.6) - Add `__typename` and `id` properties to `dataIdFromObject` parameter (typescript)
    [@jfurler](https://github.com/jfurler) in [#3641](https://github.com/apollographql/apollo-client/pull/3641) - Fixed an issue caused by `dataIdFromObject` considering returned 0 values to be falsy, instead of being a valid ID, which lead to the store not being updated properly in some cases.
    [@hwillson](https://github.com/hwillson) in [#3711](https://github.com/apollographql/apollo-client/pull/3711) ### Apollo Utilities (1.0.17) - No changes. ### Apollo GraphQL Anywhere (4.1.15) - Add support for arrays to `graphql-anywhere`'s filter utility.
    [@jsweet314](https://github.com/jsweet314) in [#3591](https://github.com/apollographql/apollo-client/pull/3591) - Fix `Cannot convert object to primitive value` error that was showing up when attempting to report a missing property on an object.
    [@benjie](https://github.com/benjie) in [#3618](https://github.com/apollographql/apollo-client/pull/3618) ## 2.3.5 (June 19, 2018) ### Apollo Client (2.3.5) - Internal code formatting updates. - [@chentsulin](https://github.com/chentsulin) in [#3574](https://github.com/apollographql/apollo-client/pull/3574) - Documentation updates. - [@andtos90](https://github.com/andtos90) in [#3596](https://github.com/apollographql/apollo-client/pull/3596) - [@serranoarevalo](https://github.com/serranoarevalo) in [#3554](https://github.com/apollographql/apollo-client/pull/3554) - [@cooperka](https://github.com/cooperka) in [#3594](https://github.com/apollographql/apollo-client/pull/3594) - [@pravdomil](https://github.com/pravdomil) in [#3587](https://github.com/apollographql/apollo-client/pull/3587) - [@excitement-engineer](https://github.com/excitement-engineer) in [#3309](https://github.com/apollographql/apollo-client/pull/3309) ### Apollo Boost (0.1.10) - No changes. ### Apollo Cache (1.1.12) - No changes. ### Apollo Cache In-Memory (1.2.5) - No changes. ### Apollo Utilities (1.0.16) - Removed unnecessary whitespace from error message. - [@mbaranovski](https://github.com/mbaranovski) in [#3593](https://github.com/apollographql/apollo-client/pull/3593) ### Apollo GraphQL Anywhere (4.1.14) - No changes. ## 2.3.4 (June 13, 2018) ### Apollo Client (2.3.4) - Export the `QueryOptions` interface, to make sure it can be used by other projects (like `apollo-angular`). - Fixed an issue caused by typescript changes to the constructor `defaultOptions` param, that prevented `query` defaults from passing type checks. ([@hwillson](https://github.com/hwillson) in [#3585](https://github.com/apollographql/apollo-client/pull/3585)) ### Apollo Boost (0.1.9) - No changes ### Apollo Cache (1.1.11) - No changes ### Apollo Cache In-Memory (1.2.4) - No changes ### Apollo Utilities (1.0.15) - No changes ### Apollo GraphQL Anywhere (4.1.13) - No changes ## 2.3.3 (June 13, 2018) ### Apollo Client (2.3.3) - Typescript improvements. Made observable query parameterized on data and variables: `ObservableQuery` ([@excitement-engineer](https://github.com/excitement-engineer) in [#3140](https://github.com/apollographql/apollo-client/pull/3140)) - Added optional generics to cache manipulation methods (typescript). ([@mvestergaard](https://github.com/mvestergaard) in [#3541](https://github.com/apollographql/apollo-client/pull/3541)) - Typescript improvements. Created a new `QueryOptions` interface that is now used by `ApolloClient.query` options, instead of the previous `WatchQueryOptions` interface. This helps reduce confusion (especially in the docs) that made it look like `ApolloClient.query` accepted `ApolloClient.watchQuery` only options, like `pollingInterval`. ([@hwillson](https://github.com/hwillson) in [#3569](https://github.com/apollographql/apollo-client/pull/3569)) ### Apollo Boost (0.1.8) - Allow `cache` to be given as a configuration option to `ApolloBoost`. ([@dandean](https://github.com/dandean) in [#3561](https://github.com/apollographql/apollo-client/pull/3561)) - Allow `headers` and `credentials` to be passed in as configuration parameters to the `apollo-boost` `ApolloClient` constructor. ([@rzane](https://github.com/rzane) in [#3098](https://github.com/apollographql/apollo-client/pull/3098)) ### Apollo Cache (1.1.10) - Added optional generics to cache manipulation methods (typescript). ([@mvestergaard](https://github.com/mvestergaard) in [#3541](https://github.com/apollographql/apollo-client/pull/3541)) ### Apollo Cache In-Memory (1.2.3) - Added optional generics to cache manipulation methods (typescript). ([@mvestergaard](https://github.com/mvestergaard) in [#3541](https://github.com/apollographql/apollo-client/pull/3541)) - Restore non-enumerability of `resultFields[ID_KEY]`. ([@benjamn](https://github.com/benjamn) in [#3544](https://github.com/apollographql/apollo-client/pull/3544)) - Cache query documents transformed by InMemoryCache. ([@benjamn](https://github.com/benjamn) in [#3553](https://github.com/apollographql/apollo-client/pull/3553)) ### Apollo Utilities (1.0.14) - Store key names generated by `getStoreKeyName` now leverage a more deterministic approach to handling JSON based strings. This prevents store key names from differing when using `args` like `{ prop1: 'value1', prop2: 'value2' }` and `{ prop2: 'value2', prop1: 'value1' }`. ([@gdi2290](https://github.com/gdi2290) in [#2869](https://github.com/apollographql/apollo-client/pull/2869)) - Avoid needless `hasOwnProperty` check in `deepFreeze`. ([@benjamn](https://github.com/benjamn) in [#3545](https://github.com/apollographql/apollo-client/pull/3545)) ### Apollo GraphQL Anywhere (4.1.12) - No new changes. ## 2.3.2 (May 29, 2018) ### Apollo Client (2.3.2) - Fix SSR and `cache-and-network` fetch policy ([@dastoori](https://github.com/dastoori) in [#3372](https://github.com/apollographql/apollo-client/pull/3372)) - Fixed an issue where the `updateQuery` method passed to `ObservableQuery.fetchMore` was receiving the original query variables, instead of the new variables that it used to fetch more data. ([@abhiaiyer91](https://github.com/abhiaiyer91) in [#3500](https://github.com/apollographql/apollo-client/pull/3500)) - Fixed an issue involving `Object.setPrototypeOf()` not working on JSC (Android), by instead setting the `prototype` of `this` manually. ([@seklyza](https://github.com/seklyza) in [#3306](https://github.com/apollographql/apollo-client/pull/3306)) - Added safeguards to make sure `QueryStore.initQuery` and `QueryStore.markQueryResult` don't try to set the network status of a `fetchMoreForQueryId` query, if it does not exist in the store. This was happening when a query component was unmounted while a `fetchMore` was still in flight. ([@conrad-vanl](https://github.com/conrad-vanl) in [#3367](https://github.com/apollographql/apollo-client/pull/3367), [@doomsower](https://github.com/doomsower) in [#3469](https://github.com/apollographql/apollo-client/pull/3469)) ### Apollo Boost (0.1.7) - Various internal code cleanup, tooling and dependency changes. ### Apollo Cache (1.1.9) - Various internal code cleanup, tooling and dependency changes. ### Apollo Cache In-Memory (1.2.2) - Fixed an issue that caused fragment only queries to sometimes fail. ([@abhiaiyer91](https://github.com/abhiaiyer91) in [#3507](https://github.com/apollographql/apollo-client/pull/3507)) - Fixed cache invalidation for inlined mixed types in union fields within arrays. ([@dferber90](https://github.com/dferber90) in [#3422](https://github.com/apollographql/apollo-client/pull/3422)) ### Apollo Utilities (1.0.13) - Make `maybeDeepFreeze` a little more defensive, by always using `Object.prototype.hasOwnProperty` (to avoid cases where the object being frozen doesn't have its own `hasOwnProperty`). ([@jorisroling](https://github.com/jorisroling) in [#3418](https://github.com/apollographql/apollo-client/pull/3418)) - Remove certain small internal caches to prevent memory leaks when using SSR. ([@brunorzn](https://github.com/brunorzn) in [#3444](https://github.com/apollographql/apollo-client/pull/3444)) ### Apollo GraphQL Anywhere (4.1.11) - Source files are now excluded when publishing to npm. ([@hwillson](https://github.com/hwillson) in [#3454](https://github.com/apollographql/apollo-client/pull/3454)) ================================================ FILE: CLAUDE.md ================================================ # CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Apollo Client Overview Apollo Client is a comprehensive caching GraphQL client for TypeScript/JavaScript. The project is maintained at version 4.x.x and uses a monorepo structure with npm workspaces. ## Common Development Commands ### Build Commands - `npm run build` - Build the entire project - `npm run build -w codegen` - Build specific workspace (e.g., codegen) ### Testing Commands - `npm test` - Run all tests with Jest - `npm run test:type-benches` - Run type benchmarks - `npm run test:memory` - Run memory tests ### Code Quality Commands - `npm run typecheck` - Run TypeScript type checking - `npm run lint` - Run ESLint with extended rules - `npm run format` - Format code with Prettier - `npm run check:format` - Check if code is formatted correctly - `npm run knip` - Check for unused files/exports - `npm run madge` - Check for circular dependencies ### Documentation & API - `npm run extract-api` - Generate API documentation - `npm run typedoc` - Generate TypeDoc documentation - `npm run docmodel` - Generate API documentation model ### Release & Publishing - `npx changeset` - Create a changeset for your changes ## High-Level Architecture ### Core Modules 1. **Core (`src/core/`)** - Main Apollo Client implementation - `ApolloClient.ts` - Main client class - `ObservableQuery.ts` - Observable query implementation - `QueryManager.ts` - Query lifecycle management 2. **Cache (`src/cache/`)** - Caching layer - `inmemory/` - InMemoryCache implementation (default cache) - `core/` - Base cache abstractions 3. **Link (`src/link/`)** - Network layer abstraction - `http/` - HTTP link for GraphQL over HTTP - `batch/` - Batch link for combining queries - `error/` - Error handling link - `schema/` - Schema link for local execution - `ws/` - WebSocket link for subscriptions 4. **React Integration (`src/react/`)** - React hooks and components - `hooks/` - React hooks (useQuery, useMutation, etc.) - `ssr/` - Server-side rendering support - `context/` - React context providers 5. **Utilities (`src/utilities/`)** - Shared utilities - `graphql/` - GraphQL document utilities - `internal/` - Internal utilities - `invariant/` - Error handling utilities 6. **Testing (`src/testing/`)** - Testing utilities - `core/` - Core testing utilities - `react/` - React testing utilities (MockedProvider) 7. **Masking (`src/masking/`)** - Data masking for fragment colocation 8. **Local State (`src/local-state/`)** - Local state management ### TypeScript Configuration - Uses TypeScript 5.7.3 with strict mode enabled - Module resolution: NodeNext - Target: ESNext - Separate tsconfig files for different purposes: - `tsconfig.json` - Main configuration - `tsconfig.build.json` - Build configuration - `tsconfig.tests.json` - Test configuration ### Testing Infrastructure - Jest with ts-jest for testing - Custom test environment extending jsdom - React Testing Library for React component tests - Multiple React version testing (17, 18, 19) - Coverage reporting with lcov ### Build System - Uses custom build script (`config/build.ts`) - API Extractor for API documentation - Size limit checking for bundle size - Source map verification - Publint for package publishing validation ### Code Organization Patterns 1. **Exports** - All public exports go through index files 2. **Internal APIs** - Use `@apollo/client/*/internal` paths 3. **Environment-specific builds** - Production/development variants 4. **Type safety** - Heavy use of TypeScript generics and type inference 5. **Reactive programming** - Uses RxJS for observables 6. **Immutability** - Emphasizes immutable data structures ### Contributing Guidelines - All changes require a changeset (`npx changeset`) - PRs should include tests for bug fixes - Follow existing code style (enforced by ESLint/Prettier) - Large features need design discussion first - Code review required from core contributors ### Important Notes - This is a monorepo with workspaces: main package, codegen, and codemods - The project is currently at version 4.x.x (release candidate) - Supports multiple peer dependencies (React 17/18/19, GraphQL 16) - Uses patch-package for dependency patches - Has extensive CI checks that must pass before merging ## Additional Instructions @.claude/documentation.md @.claude/hooks.md ================================================ FILE: COLLABORATORS.md ================================================ # Apollo OSS Collaborator Guidelines Thanks for helping make Apollo OSS better! Here are a few quick repo maintenance guidelines intended to help keep Apollo projects happy and healthy. ## Overall - Please remember to be polite and respectful to all community members, no matter what is being reported, contributed, etc. People who are taking time out of their lives to participate in the Apollo ecosystem should feel welcomed, included and appreciated. ## Issues - Issues are for bugs only. All other requests should be redirected accordingly, then closed. Feature requests have their own [repo](https://github.com/apollographql/apollo-feature-requests), and requests for help should go to [our community forums](https://community.apollographql.com) or [Stack Overflow](http://stackoverflow.com). - If a bug report is valid, add the `confirmed` label, and optionally decide if community help should be requested using the `help-wanted` label. If you’re planning on working on it, assign the issue to yourself. - If an issue isn’t easily reproducible, ask for a reproduction and add a `reproduction-needed` label. - If a reproduction has been asked for but hasn’t been received in 1 week, close the issue. ## Pull Requests - Ensure PR’s have tests (when it makes sense, which is almost always). - Make sure `CHANGELOG`’s are updated/maintained. Either request that the PR author adds a `CHANGELOG` entry, or add one yourself. Make sure the PR is referenced along with their GitHub username, and link to their profile (to give them extra kudos). - Don’t forget to consider how a PR you’re merging will affect the docs; either ask contributors for docs changes, open a new issue to track outstanding changes, or consider implementing the docs changes yourself. - Always think about backwards compatibility; please don’t merge PR’s that require major version bumps, unless talking it over with the core team. - If the PR has a small number of commits, or a large number of semantically unimportant commits, squash and merge the PR. If the PR commits are well thought out, isolated and would add value to the git history if kept separate, do a merge commit. ================================================ FILE: CONTRIBUTING.md ================================================ # Apollo Contributor Guide Excited about Apollo and want to make it better? We’re excited too! Apollo is a community of developers just like you, striving to create the best tools and libraries around GraphQL. We welcome anyone who wants to contribute or provide constructive feedback, no matter the age or level of experience. If you want to help but don't know where to start, let us know, and we'll find something for you. Oh, and if you haven't already, join our [community forums](https://community.apollographql.com). Here are some ways to contribute to the project, from easiest to most difficult: - [Issues](#issues) - [Reporting bugs](#reporting-bugs) - [Improving the documentation](#improving-the-documentation) - [Responding to issues](#responding-to-issues) - [Changesets](#changesets) - [Small bug fixes](#small-bug-fixes) - [Suggesting features](#suggesting-features) - [Big PRs](#big-prs) - [Code review guidelines](#code-review-guidelines) - [Development](#development) - [Building](#building) - [Testing](#testing) - [Wiring a checkout into an application](#wiring-a-checkout-into-an-application) ## Issues ### Reporting bugs If you encounter a bug, please file an issue on GitHub via the repository of the sub-project you think contains the bug. If an issue you have is already reported, please add additional information or add a 👍 reaction to indicate your agreement. While we will try to be as helpful as we can on any issue reported, please include the following to maximize the chances of a quick fix: 1. **Intended outcome:** What you were trying to accomplish when the bug occurred, and as much code as possible related to the source of the problem. 2. **Actual outcome:** A description of what actually happened, including a screenshot or copy-paste of any related error messages, logs, or other output that might be related. Places to look for information include your browser console, server console, and network logs. Please avoid non-specific phrases like “didn’t work” or “broke”. 3. **How to reproduce the issue:** Instructions for how the issue can be reproduced by a maintainer or contributor. Be as specific as possible, and only mention what is necessary to reproduce the bug. If possible, build a reproduction with our [error template](https://github.com/apollographql/react-apollo-error-template) to isolate the exact circumstances in which the bug occurs. Avoid speculation over what the cause might be. Creating a good reproduction really helps contributors investigate and resolve your issue quickly. In many cases, the act of creating a minimal reproduction illuminates that the source of the bug was somewhere outside the library in question, saving time and effort for everyone. ### Improving the documentation Improving the documentation, examples, and other open source content can be the easiest way to contribute to the library. If you see a piece of content that can be better, open a PR with an improvement, no matter how small! If you would like to suggest a big change or major rewrite, we’d love to hear your ideas! Please open a feature request for discussion, over in the [Apollo Client Feature Request repo](https://github.com/apollographql/apollo-feature-requests), before writing the PR. ### Responding to issues In addition to reporting issues, a great way to contribute to Apollo is to respond to other peoples' issues and try to identify the problem or help them work around it. If you’re interested in taking a more active role in this process, please go ahead and respond to issues. And don't forget to say "Hi" in our [community forums](https://community.apollographql.com)! ### Changesets Apollo Client uses [changesets](https://github.com/changesets/changesets) to automate its versioning and release process. When contributing to Apollo Client, your PR should contain a "changeset" that can be generated by running `npx changeset` from your branch locally. The changeset CLI will ask you to enter the corresponding [semver bump type](https://semver.org/) and a description of your changes: feel free to enter a brief description via the command line and continue editing the generated Markdown file found inside of `.changeset` in your editor of choice. When editing your changeset's Markdown file, you can leverage any of the features of GitHub flavored markdown! The description you provide in your changeset will be used to generate an entry in `CHANGELOG.md` and the release notes in a future release, so the more complete and descriptive the better. ### Small bug fixes For a small bug fix change (less than 20 lines of code changed), feel free to open a pull request. We’ll try to merge it as fast as possible and ideally publish a new release on the same day. The only requirement is, make sure you also add a test that verifies the bug you are trying to fix. ### Suggesting features Most of the features in Apollo Client came from suggestions by you, the community! We welcome any ideas about how to make Apollo better for your use case. Head on over to the [Apollo Client Feature Request repo](https://github.com/apollographql/apollo-feature-requests), and open up a new feature request / discussion issue with your details. **Note:** Feature requests and non-bug related discussions are no longer managed in this repo's issue tracker. Feature request and/or discussions opened here will be closed. ## Big PRs This includes: - Big bug fixes - New features For significant changes to a repository, it’s important to settle on a design before starting on the implementation. This way, we can make sure that major improvements get the care and attention they deserve. Since big changes can be risky and might not always get merged, it’s good to reduce the amount of possible wasted effort by agreeing on an implementation design/plan first. 1. **Open an issue.** Open an issue about your bug in this repo, or about your feature request in the [Apollo Client Feature Request repo](https://github.com/apollographql/apollo-feature-requests). 2. **Reach consensus.** Some contributors and community members should reach an agreement that this feature or bug is important, and that someone should work on implementing or fixing it. 3. **Agree on intended behavior.** On the issue, reach an agreement about the desired behavior. In the case of a bug fix, it should be clear what it means for the bug to be fixed, and in the case of a feature, it should be clear what it will be like for developers to use the new feature. 4. **Agree on implementation plan.** Write a plan for how this feature or bug fix should be implemented. What modules need to be added or rewritten? Should this be one pull request or multiple incremental improvements? Who is going to do each part? 5. **Submit PR.** In the case where multiple dependent patches need to be made to implement the change, only submit one at a time. Otherwise, the others might get stale while the first is reviewed and merged. Make sure to avoid “while we’re here” type changes - if something isn’t relevant to the improvement at hand, it should be in a separate PR; this especially includes code style changes of unrelated code. 6. **Review.** At least one core contributor should sign off on the change before it’s merged. Look at the “code review” section below to learn about factors are important in the code review. If you want to expedite the code being merged, try to review your own code first! 7. **Merge and release!** ### Code review guidelines It’s important that every piece of code in Apollo packages is reviewed by at least one core contributor familiar with that codebase. Here are some things we look for: 1. **Required CI checks pass.** This is a prerequisite for the review, and it is the PR author's responsibility. As long as the tests don’t pass, the PR won't get reviewed. 2. **Simplicity.** Is this the simplest way to achieve the intended goal? If there are too many files, redundant functions, or complex lines of code, suggest a simpler way to do the same thing. In particular, avoid implementing an overly general solution when a simple, small, and pragmatic fix will do. 3. **Testing.** Do the tests ensure this code won’t break when other stuff changes around it? When it does break, will the tests added help us identify which part of the library has the problem? Did we cover an appropriate set of edge cases? Look at the test coverage report if there is one. Are all significant code paths in the new code exercised at least once? 4. **No unnecessary or unrelated changes.** PRs shouldn’t come with random formatting changes, especially in unrelated parts of the code. If there is some refactoring that needs to be done, it should be in a separate PR from a bug fix or feature, if possible. 5. **Code has appropriate comments.** Code should be commented, or written in a clear “self-documenting” way. 6. **Idiomatic use of the language.** In TypeScript, make sure the typings are specific and correct. In ES2015, make sure to use imports rather than require and const instead of var, etc. Ideally a linter enforces a lot of this, but use your common sense and follow the style of the surrounding code. ## Development ### Building **Build Apollo Client once:** ``` npm run build ``` ### Testing **Run all tests once:** ``` npm run test ``` **Run all tests in watch mode:** ``` npm run test:watch ``` **Run specific tests:** Call jest directly making sure to pass in the jest config, and use its `testRegex` option: ``` jest --config ./config/jest.config.ts --testRegex __tests__/useQuery.test.tsx ``` ### Wiring a checkout into an application It can be useful to link an Apollo Client checkout into an application, to test how Apollo Client development changes impact a real app. We'll use the [Apollo fullstack tutorial application](https://github.com/apollographql/fullstack-tutorial) to demonstrate this. 1. Clone and install Apollo Client. ``` git clone https://github.com/apollographql/apollo-client.git cd apollo-client npm i cd .. ``` > From this point forward `[apollo-client-root]` represents the root directory of your Apollo Client checkout (e.g. `/some/path/apollo-client`). 2. Clone and install the fullstack tutorial. ``` git clone https://github.com/apollographql/fullstack-tutorial.git cd fullstack-tutorial cd final/server npm i cd ../client npm i ``` > From this point forward `[fullstack-tutorial-root]` represents the root directory of your Fullstack Tutorial checkout (e.g. `/some/path/fullstack-tutorial`). 3. Link the application's `@apollo/client` package to your Apollo Client checkout's compiled files. ``` # ... assuming still in [fullstack-tutorial-root]/final/client from step 2 cd node_modules/@apollo rm -Rf ./client ln -s [apollo-client-root]/dist client ``` 4. If using React, prevent a duplicate React version lookup error by telling your application to use Apollo Client's React version. ``` # ... assuming still in [fullstack-tutorial-root]/final/client/node_modules/@apollo from step 3 cd .. rm -Rf ./react ./react-dom ln -s [apollo-client-root]/node_modules/react ln -s [apollo-client-root]/node_modules/react-dom ``` 5. Start the fullstack tutorial. Server: ``` # ... assuming still in [fullstack-tutorial-root]/final/client/node_modules from step 4 cd ../../server npm start ``` Client: ``` # ... in a separate terminal window cd [fullstack-tutorial-root]/final/client npm start ``` 6. Start building Apollo Client and watching for file changes. ``` # ... in a separate terminal window cd [apollo-client-root] npm run watch ``` 7. Verify Apollo Client changes show up in the fullstack tutorial. ``` # ... assuming still in [apollo-client-root] from step 6 cd src echo "console.log('it worked');" >> index.ts ``` Visit http://localhost:3000/ and open your browsers dev console. After the Apollo Client rebuild finishes, you should see `it worked` in the console. ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2022 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
    Apollo Logo

    Apollo Client

    **The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more.** Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development. ➡️ [**Get Started with Apollo Client →**](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
    [![npm version](https://badge.fury.io/js/%40apollo%2Fclient.svg)](https://badge.fury.io/js/%40apollo%2Fclient) [![Build Status](https://circleci.com/gh/apollographql/apollo-client.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-client) [![Join the community](https://img.shields.io/discourse/status?label=Join%20the%20community&server=https%3A%2F%2Fcommunity.apollographql.com)](https://community.apollographql.com)
    ## ❓ Why Choose Apollo Client? ✅ Zero-config caching - Intelligent caching out of the box
    ✅ Framework agnostic - Works with React, Vue, Angular, Svelte, and vanilla JavaScript
    ✅ TypeScript-first - Full type safety and IntelliSense support
    ✅ React 19 ready - Supports Suspense, RSC, Compiler, and more
    ✅ Production-tested - Powers countless apps worldwide that serve millions of end users
    ## 🚀 Quick Start ```sh npm install @apollo/client graphql ``` ## Apollo Client Skill Give your AI agent specialized Apollo Client knowledge and setup guidance: ```sh npx skills add apollographql/skills --skill apollo-client ``` ## 💡 Resources | Resource | Description | Link | | ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Getting Started Guide** | Complete setup and first query | [Start Here →](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | | **Full Documentation** | Comprehensive guides and examples | [Read Docs →](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | | **API Reference** | Complete API documentation | [Browse API →](https://www.apollographql.com/docs/react/api/apollo-client?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | | **VS Code Extension** | Enhanced development experience | [Install Extension →](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) | | **DevTools** | Debug your GraphQL apps | [Chrome](https://chrome.google.com/webstore/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm) \| [Firefox](https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/) | | **Free Course** | Learn GraphQL and Apollo Client | [Take Course →](https://odyssey.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | ## 💬 Get Support **Need help?** We're here for you: - [**Community Forum**](https://community.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Q\&A and discussions - [**GraphQL Discord**](https://discord.graphql.org) \- Real-time chat with the community ## 🧑‍🚀 About Apollo Deliver tomorrow's roadmap today with our comprehensive suite of API orchestration tools: - [**Apollo Client**](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Type-safe apps with GraphQL-powered on-device caching ([React](https://www.apollographql.com/docs/react?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [iOS](https://www.apollographql.com/docs/ios?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [Kotlin](https://www.apollographql.com/docs/kotlin?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) - [**Apollo Connectors**](https://www.apollographql.com/graphos/apollo-connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint - [**Apollo MCP Server**](https://www.apollographql.com/apollo-mcp-server?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- AI needs APIs. The fastest way to ship reliable AI experiences - [**Apollo Router**](https://www.apollographql.com/docs/router?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Scale your APIs seamlessly with GraphQL Federation, Security, Auth, and more - [**GraphOS**](https://www.apollographql.com/graphos?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Deploy, manage, govern, and explore your APIs ([start for free, no credit card needed](https://www.apollographql.com/pricing?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) [**Explore the Complete Apollo Platform →**](https://www.apollographql.com/?utm_source=github&utm_medium=apollographql-_apollo-client&utm_campaign=readme) ## 🛠️ Maintained by | Name | Username | | ----------------- | ---------------------------------------------- | | Jeff Auriemma | [@bignimbus](https://github.com/bignimbus) | | Jerel Miller | [@jerelmiller](https://github.com/jerelmiller) | | Lenz Weber-Tronic | [@phryneas](https://github.com/phryneas) | ## Versioning Policy While Apollo Client follows SemVer, it might introduce changes like changing transpilation targets, updating dependencies or dropping support for older versions of dependencies in minor releases. For more details, see our [Versioning Policy](./VERSIONING_POLICY.md). ## 🗺️ Roadmap We regularly update our [public roadmap](https://github.com/apollographql/apollo-client/blob/main/ROADMAP.md) with the status of our work-in-progress and upcoming features. ## 📣 Tell us what you think | ☑️ Apollo Client User Survey | | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. | ## 🗓️ Events Join these live events to meet other GraphQL users and learn more: 🎪 [**GraphQL Summit 2025**](https://summit.graphql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) Oct 6-8, 2025 • San Francisco _1000+ engineers, talks, workshops, and office hours_ 🌟 [**GraphQLConf 2025**](https://graphql.org/conf/2025) Sep 8-10, 2025 • Amsterdam _Celebrating 10 Years of GraphQL_ [**View All Events →**](https://www.apollographql.com/events?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) ## 🏆 Contributing Thank you for your interest in submitting a Pull Request to Apollo Client! Read our [guidelines](https://github.com/apollographql/apollo-client/blob/main/CONTRIBUTING.md) first, and don't hesitate to get in touch. **New to open source?** Check out our [**Good First Issues**](https://github.com/apollographql/apollo-client/issues?q=is%3Aopen%20label%3A%22%3Abooks%3A%20good-first-issue%22) to get started. ## 🤝 Code of Conduct Please read our [Code of Conduct](https://community.apollographql.com/faq). This applies to any space run by Apollo, including our GitHub repositories, the Apollo GraphOS Discord, the Apollo GraphQL Forum. The Code of Conduct reflects our commitment to making the Apollo Community a welcoming and safe space in which individuals can interact. ## 🪪 License Source code in this repository is available under the terms of the MIT License. Read the full text [here](https://github.com/apollographql/apollo-client/blob/main/LICENSE). ================================================ FILE: ROADMAP.md ================================================ # 🔮 Apollo Client Ecosystem Roadmap For up to date release notes, refer to the project's [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md). > **Please note:** This is an approximation of **larger effort** work planned for the next 6 - 12 months. It does not cover all new functionality that will be added, and nothing here is set in stone. Also note that each of these releases, and several patch releases in-between, will include bug fixes (based on issue triaging) and community submitted PRs. ## ✋ Community feedback & prioritization - Please report feature requests or bugs as a new [issue](https://github.com/apollographql/apollo-client/issues/new/choose). - If you already see an issue that interests you please add a 👍 or a comment so we can measure community interest. --- ## Ecosystem ### Apollo Client _No planned work_ ### GraphQL Testing Library _No planned work_ ### VSCode Extension _No planned work_ ### GraphQL Tag _No planned work_ ### Apollo Client DevTools - Support for inspecting Apollo Client instances in iframes ### Apollo Client React Framework Integrations - Client integration documentation **TanStack Start** - Support for Apollo Client Streaming in TanStack Start - will stay release candidate **React Router** - Support for Apollo Client Streaming in React Router 7 - will stay alpha ================================================ FILE: VERSIONING_POLICY.md ================================================ # Apollo Client Versioning Policy Apollo Client tries to follow SemVer versioning. However, we reserve the right to change transpilation targets, drop polyfills or update required dependencies. These changes will be released in minor versions. This is to ensure that Apollo Client can take advantage of the latest JavaScript features, performance improvements, and security fixes. This document outlines the versioning strategy for Apollo Client's dependencies. ## Syntax transpilation target The current transpilation target for Apollo Client is `@babel/preset-env` with the `browserlist` target `since 2023, node >= 20, not dead`. That means Apollo Client supports the following environments and their derivatives: | Environment | Version | | ---------------- | ------- | | Chrome | 97+ | | Firefox | 96+ | | Edge | 97+ | | Safari | 15.4+ | | Opera | 83+ | | Samsung Internet | 17+ | | Node.js | 20+ | Using Apollo Client in different environments may require you to transpile the syntax using a lower version, or polyfilling missing APIs. We reserve the right to update the transpilation target in minor releases, but we commit to always include at least two years of browser support and the officially supported Node.js versions in the target. ## Language features Apollo Client might start using new APIs and language features that are considered ["Baseline: Widely available"](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility) by MDN. Usage of new language features will be released in a new minor version. ### Non-polyfillable, non-transpilable language features We try to avoid new features that cannot be transpiled or polyfilled. However, we consider the following features to be supported widely enough that Apollo Client can use them at any time without considering it a major breaking change. - [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) (already used in Apollo Client) - [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) (already used in Apollo Client) - [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef) (already used by dependencies) - [`FinalizationRegistry`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry) (already used by dependencies) - [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) > [!NOTE] > Not all of the these features are currently used at this time. Usage of these features might fluctuate between minor versions. ## TypeScript types We reserve the right to update TypeScript types as needed, such as to fix bugs, align types with actual runtime behavior or add compatibility with changes in upcoming TypeScript versions. Updates to types might requires changes to your application, and while we are careful to keep such changes to a minimum, we do not consider these breaking changes in the sense of SemVer. ## Dependencies ### TypeScript We make an effort to only use TypeScript features that have been available as stable for at least one year. This generally means we support the [last four minor versions](https://github.com/microsoft/TypeScript/wiki/TypeScript%27s-Release-Process#how-often-does-typescript-release) of TypeScript. If you use a TypeScript version older than these, you might experience some type compatibility issues with Apollo Client. > Note that this is a shorter support window than [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window). However, we reserve the right to use newer syntax in new features, in a way that doesn't break compilation with older TypeScript versions. These new features might not be available to consumers on older TypeScript versions. ### React We aim to support, at minimum, the latest two major versions of React. Some Apollo Client features might require the latest major version of React and won't be available to consumers on older React versions (e.g. `useSuspenseQuery` which relies on React Suspense). We will note when such a case occurs so that you understand when a feature requires a specific React version. > Please note that the React team almost never backports bugfixes to older major versions. From time to time, you might encounter bugs when using Apollo Client caused by React itself that are fixed in recent React versions, but are unavailable in older major versions. We strongly recommend you keep up-to-date with the latest React version. ### React Native We try to support, at minimum, the latest version of React Native. Note that React Native relies on many polyfills that might differ from the implementations of other platforms. Some polyfills might also be missing. Where possible, we try to avoid using APIs that are not available in React Native. If an API is not available, we will try to provide workarounds using the [`react-native` exports condition](https://reactnative.dev/blog/2023/06/21/package-exports-support#the-new-react-native-condition). ### The `graphql` package We commit to supporting the latest major version of the `graphql` package, with a grace period of at least one year before we drop support for older versions. Within a `graphql` major, we only guarantee compatibility with the latest minor version. We strongly encourage consumers to regularly update the `graphql` package to get the latest bugfixes and features. ### Other dependencies We reserve the right to update dependencies in minor releases of Apollo Client, as well as dropping support for older versions of dependencies. ### Peer dependencies The rules stated above apply to peer dependencies as well. Peer dependencies can be updated in minor releases, just like regular dependencies. However, we do commit to not adding new peer dependencies during the lifetime of a major - but if an existing peer dependency is renamed, we might follow that rename in a minor release. ================================================ FILE: api-extractor.json ================================================ /** * Config file for API Extractor. For more info, please visit: https://api-extractor.com */ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "projectFolder": ".", "mainEntryPointFilePath": "/dist/core/index.d.ts", "bundledPackages": ["@apollo/client"], "newlineKind": "lf", "enumMemberOrder": "preserve", /** * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the * .api.json file is assigned an empty string to prevent spurious diffs in output files tracked for tests. * * DEFAULT VALUE: "false" */ // "testMode": false, /** * Determines how the TypeScript compiler engine will be invoked by API Extractor. */ "compiler": { "overrideTsconfig": { "compilerOptions": { "lib": ["ESNext"] } }, "skipLibCheck": true }, /** * Configures how the API report file (*.api.md) will be generated. */ "apiReport": { "enabled": true, "reportFileName": ".api.md", "reportFolder": "/.api-reports/", "reportTempFolder": "/.api-reports/temp/", "includeForgottenExports": true }, "docModel": { "enabled": false, "apiJsonFilePath": "/docs/public/.api.json", "includeForgottenExports": true }, "dtsRollup": { "enabled": false }, "tsdocMetadata": { "enabled": false, "tsdocMetadataFilePath": "/docs/public/tsdoc-metadata.json" }, /** * Configures how API Extractor reports error and warning messages produced during analysis. * * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. */ "messages": { /** * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing * the input .d.ts files. * * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" * * DEFAULT VALUE: A single "default" entry with logLevel=warning. */ "compilerMessageReporting": { /** * Configures the default routing for messages that don't match an explicit rule in this table. */ "default": { /** * Specifies whether the message should be written to the the tool's output log. Note that * the "addToApiReportFile" property may supersede this option. * * Possible values: "error", "warning", "none" * * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes * the "--local" option), the warning is displayed but the build will not fail. * * DEFAULT VALUE: "warning" */ "logLevel": "warning" /** * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), * then the message will be written inside that file; otherwise, the message is instead logged according to * the "logLevel" option. * * DEFAULT VALUE: false */ // "addToApiReportFile": false } // "TS2551": { // "logLevel": "warning", // "addToApiReportFile": true // }, // // . . . }, /** * Configures handling of messages reported by API Extractor during its analysis. * * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" * * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings */ "extractorMessageReporting": { "default": { "logLevel": "warning" // "addToApiReportFile": false }, "ae-missing-release-tag": { "logLevel": "none" }, "ae-internal-missing-underscore": { "logLevel": "none", "addToApiReportFile": false }, "ae-unresolved-link": { "logLevel": "warning", "addToApiReportFile": true } }, "tsdocMessageReporting": { "tsdoc-escape-greater-than": { "logLevel": "none", "addToApiReportFile": false } } } } ================================================ FILE: codegen/CHANGELOG.md ================================================ # @apollo/client-graphql-codegen ## 2.0.0 ### Major Changes - [#13014](https://github.com/apollographql/apollo-client/pull/13014) [`b9a1964`](https://github.com/apollographql/apollo-client/commit/b9a19647442842d1192a67bfded3bd8b27952832) Thanks [@phryneas](https://github.com/phryneas)! - bump upstream dependencies by major version ## 1.0.0 ### Major Changes - [#12617](https://github.com/apollographql/apollo-client/pull/12617) [`ea633a1`](https://github.com/apollographql/apollo-client/commit/ea633a110b7ffa138a33f68a0b41b0437aee61d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new GraphQL Codegen plugin aimed at creating resolver types for `LocalState`. This plugin is similar to `@graphql-codegen/typescript-resolvers` but tailored to provide types that work with `LocalState`. To use the plugin, install `@apollo/client-graphql-codegen` and add the following to your codegen config: ```ts // codegen.ts const config: CodegenConfig = { // ... generates: { "./path/to/local/resolvers.ts": { schema: ["./path/to/localSchema.graphql"], plugins: ["typescript", "@apollo/client-graphql-codegen/local-state"], // ... }, }, }; ``` This will generate a `Resolvers` type in the generated file that can be used to provide type information to `LocalState`. ```ts import type { Resolvers } from "./path/to/resolvers-types.ts"; const localState = new LocalState({ // ... }); ``` It is also recommended to add the following config: ```ts // codegen.ts import type { LocalStatePluginConfig } from "@apollo/client-graphql-codegen/local-state"; const config: CodegenConfig = { // ... generates: { "./path/to/local/resolvers.ts": { config: { // Ensures you return a `__typename` for any `@client` fields that // return object or array types nonOptionalTypename: true, // Required if your localSchema extends existing schema types. baseTypesPath: "./relative/path/to/base/schema/types", // If you provide a `context` function to customize the context value, // provide the path or type here. contextType: "./path/to/contextValue#ContextValue", } satisfies LocalStatePluginConfig, }, }, }; ``` NOTE: It is recommended that the schema file passed to the `schema` option is your local schema, not your entire app schema in order to only generate resolver types for your local fields, otherwise the plugin will generate resolver types for your entire remote schema as well. - [#12723](https://github.com/apollographql/apollo-client/pull/12723) [`1f9ed72`](https://github.com/apollographql/apollo-client/commit/1f9ed7200a249676e3efec6b61814376f47ce596) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only for codegen to release as `rc`. ## 1.0.0-rc.0 ### Major Changes - [#12723](https://github.com/apollographql/apollo-client/pull/12723) [`1f9ed72`](https://github.com/apollographql/apollo-client/commit/1f9ed7200a249676e3efec6b61814376f47ce596) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only for codegen to release as `rc`. ## 1.0.0-alpha.0 ### Major Changes - [#12617](https://github.com/apollographql/apollo-client/pull/12617) [`ea633a1`](https://github.com/apollographql/apollo-client/commit/ea633a110b7ffa138a33f68a0b41b0437aee61d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new GraphQL Codegen plugin aimed at creating resolver types for `LocalState`. This plugin is similar to `@graphql-codegen/typescript-resolvers` but tailored to provide types that work with `LocalState`. To use the plugin, install `@apollo/client-graphql-codegen` and add the following to your codegen config: ```ts // codegen.ts const config: CodegenConfig = { // ... generates: { "./path/to/local/resolvers.ts": { schema: ["./path/to/localSchema.graphql"], plugins: ["typescript", "@apollo/client-graphql-codegen/local-state"], // ... }, }, }; ``` This will generate a `Resolvers` type in the generated file that can be used to provide type information to `LocalState`. ```ts import type { Resolvers } from "./path/to/resolvers-types.ts"; const localState = new LocalState({ // ... }); ``` It is also recommended to add the following config: ```ts // codegen.ts import type { LocalStatePluginConfig } from "@apollo/client-graphql-codegen/local-state"; const config: CodegenConfig = { // ... generates: { "./path/to/local/resolvers.ts": { config: { // Ensures you return a `__typename` for any `@client` fields that // return object or array types nonOptionalTypename: true, // Required if your localSchema extends existing schema types. baseTypesPath: "./relative/path/to/base/schema/types", // If you provide a `context` function to customize the context value, // provide the path or type here. contextType: "./path/to/contextValue#ContextValue", } satisfies LocalStatePluginConfig, }, }, }; ``` NOTE: It is recommended that the schema file passed to the `schema` option is your local schema, not your entire app schema in order to only generate resolver types for your local fields, otherwise the plugin will generate resolver types for your entire remote schema as well. ================================================ FILE: codegen/local-state/config.ts ================================================ /** * Adapted from * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/config.ts * * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE * * The MIT License (MIT) * * Copyright (c) 2016 Dotan Simha * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import type { AvoidOptionalsConfig, RawConfig, } from "@graphql-codegen/visitor-plugin-common"; /** * This plugin generates TypeScript signature for `resolve` functions of your GraphQL API. * You can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers). * * You can find a blog post explaining the usage of this plugin here: https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen */ export interface LocalStatePluginConfig extends RawConfig { /** * Path to base schema types used to import schema type definitions for * extended types in your local schema. This is required if your schema type * definitions defines an extended type (i.e. `extend type User {...}`). * * @example * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: ["typescript", "@apollo/client/local-state/codegen"], * config: { * baseTypesPath: "./relative/path/to/schema/types", * }, * }, * }, * }; * export default config; * ``` */ baseTypesPath?: string; /** * The import name for the base schema types. * * @defaultValue BaseSchemaTypes * * @example * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: ["typescript", "@apollo/client/local-state/codegen"], * config: { * baseSchemaTypesImportName: "MyBaseSchemaTypes", * }, * }, * }, * }; * export default config; * ``` */ baseSchemaTypesImportName?: string; /** * This will cause the generator to avoid using optionals (`?`), * so all field resolvers must be implemented in order to avoid compilation errors. * @defaultValue false * * @example * * ## Override all definition types * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: ["typescript", "@apollo/client/local-state/codegen"], * config: { * avoidOptionals: true, * }, * }, * }, * }; * export default config; * ``` * * ## Override only specific definition types * * ```ts filename="codegen.ts" * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: ["typescript", "@apollo/client/local-state/codegen"], * config: { * avoidOptionals: { * field: true, * inputValue: true, * object: true, * defaultValue: true, * query: true, * mutation: true, * subscription: true, * }, * }, * }, * }, * }; * export default config; * ``` */ avoidOptionals?: boolean | AvoidOptionalsConfig; /** * Adds `_` to generated `Args` types in order to avoid duplicate identifiers. * * @example * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * addUnderscoreToArgsType: true, * }, * }, * }, * }; * export default config; * ``` */ addUnderscoreToArgsType?: boolean; /** * Use this configuration to set a custom type for your `context`, and it will * affect all the resolvers, without the need to override it using generics each time. * If you wish to use an external type and import it from another file, you can use `add` plugin * and add the required `import` statement, or you can use a `module#type` syntax. * * @example * * ## Custom Context Type * * ```ts filename="codegen.ts" * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * contextType: "MyContext", * }, * }, * }, * }; * export default config; * ``` * * ## Custom Context Type by Path * * Note that the path should be relative to the generated file. * * ```ts filename="codegen.ts" * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * contextType: "./my-types#MyContext", * }, * }, * }, * }; * export default config; * ``` */ contextType?: string; /** * Adds a suffix to the imported names to prevent name clashes. * * @example * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * mapperTypeSuffix: "Model", * }, * }, * }, * }; * export default config; * ``` */ mapperTypeSuffix?: string; /** * Replaces a GraphQL type usage with a custom type, allowing you to return custom object from * your resolvers. * You can use both `module#type` and `module#namespace#type` syntax. * * @example * * ## Custom Context Type * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * mappers: { * User: "./my-models#UserDbObject", * Book: "./my-models#Collections", * }, * }, * }, * }, * }; * export default config; * ``` */ mappers?: { [typeName: string]: string; }; /** * Allow you to set the default mapper when it's not being override by `mappers` or generics. * You can specify a type name, or specify a string in `module#type` or `module#namespace#type` format. * The default value of mappers is the TypeScript type generated by `typescript` package. * * @example * * ## Replace with any * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * defaultMapper: "any", * }, * }, * }, * }; * export default config; * ``` * * ## Custom Base Object * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * defaultMapper: "./my-file#BaseObject", * }, * }, * }, * }; * export default config; * ``` * * ## Wrap default types with Partial * * You can also specify a custom wrapper for the original type, without overriding the original generated types, use `{T}` to specify the identifier. (for flow, use `$Shape<{T}>`) * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * // plugins... * config: { * defaultMapper: "Partial<{T}>", * }, * }, * }, * }; * export default config; * ``` * * ## Allow deep partial with `utility-types` * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: [ * "typescript", * "@apollo/client/local-state/codegen", * { add: { content: "import { DeepPartial } from 'utility-types';" } }, * ], * config: { * defaultMapper: "DeepPartial<{T}>", * avoidCheckingAbstractTypesRecursively: true, // required if you have complex nested abstract types * }, * }, * }, * }; * export default config; * ``` */ defaultMapper?: string; /** * Warns about unused mappers. * * @defaultValue true * * @example * * ```ts * import type { CodegenConfig } from "@graphql-codegen/cli"; * * const config: CodegenConfig = { * // ... * generates: { * "path/to/file": { * plugins: ["typescript", "@apollo/client/local-state/codegen"], * config: { * showUnusedMappers: true, * }, * }, * }, * }; * export default config; * ``` */ showUnusedMappers?: boolean; /** * Generates immutable types by adding `readonly` to properties and uses `ReadonlyArray`. * * @defaultValue false */ immutableTypes?: boolean; /** * Prefixes all GraphQL related generated types with that value, as namespaces import. * You can use this feature to allow separation of plugins to different files. * * @defaultValue '' */ namespacedImportName?: string; /** * Suffix we add to each generated type resolver. * * @defaultValue Resolvers */ resolverTypeSuffix?: string; /** * The type name to use when exporting all resolvers signature as unified type. * * @defaultValue Resolvers */ allResolversTypeName?: string; } ================================================ FILE: codegen/local-state/index.ts ================================================ export type { LocalStatePluginConfig } from "./config.js"; export { plugin } from "./plugin.js"; ================================================ FILE: codegen/local-state/plugin.ts ================================================ /** * Adapted from * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/index.ts * * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE * * The MIT License (MIT) * * Copyright (c) 2016 Dotan Simha * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import type { PluginFunction, Types } from "@graphql-codegen/plugin-helpers"; import { getCachedDocumentNodeFromSchema, oldVisit, } from "@graphql-codegen/plugin-helpers"; import type { RootResolver } from "@graphql-codegen/visitor-plugin-common"; import type { GraphQLSchema } from "graphql"; import type { LocalStatePluginConfig } from "./config.js"; import { LocalStateVisitor } from "./visitor.js"; export const plugin: PluginFunction< LocalStatePluginConfig, Types.ComplexPluginOutput<{ generatedResolverTypes: RootResolver["generatedResolverTypes"]; }> > = async ( schema: GraphQLSchema, _documents: Types.DocumentFile[], config: LocalStatePluginConfig ) => { const imports: string[] = []; const showUnusedMappers = typeof config.showUnusedMappers === "boolean" ? config.showUnusedMappers : true; const importType = config.useTypeImports ? "import type" : "import"; const prepend: string[] = []; // Extended types are types that extend existing schema types (i.e. `extend type User {...}`) const extendedTypes = Object.entries(schema.getTypeMap()).reduce( (memo, [typename, type]) => { return type.astNode?.loc?.startToken.value === "extend" ? memo.add(typename) : memo; }, new Set() ); if (extendedTypes.size > 0) { if (!config.baseTypesPath) { throw new Error( "`baseTypesPath` must be defined when your local schema extends existing schema types." ); } prepend.push( `import * as ${ config.baseSchemaTypesImportName ?? "BaseSchemaTypes" } from '${config.baseTypesPath}';` ); } const visitor = new LocalStateVisitor(config, schema, extendedTypes); const astNode = getCachedDocumentNodeFromSchema(schema); // runs visitor const visitorResult = oldVisit(astNode, { leave: visitor as any }); const resolversTypeMapping = visitor.buildResolversTypes(); const resolversParentTypeMapping = visitor.buildResolversParentTypes(); const resolversUnionTypeMapping = visitor.buildResolversUnionTypes(); const resolversInterfaceTypeMapping = visitor.buildResolversInterfaceTypes(); const { getRootResolver, mappersImports, unusedMappers } = visitor; if (showUnusedMappers && unusedMappers.length) { console.warn(`Unused mappers: ${unusedMappers.join(",")}`); } if (imports.length) { prepend.push(`${importType} { ${imports.join(", ")} } from 'graphql';`); } prepend.push( `${importType} { LocalState } from '@apollo/client/local-state'`, `${importType} { DeepPartial } from '@apollo/client/utilities';` ); prepend.push(...mappersImports, ...visitor.globalDeclarations); const rootResolver = getRootResolver(); return { prepend, content: [ resolversTypeMapping, resolversParentTypeMapping, resolversInterfaceTypeMapping, resolversUnionTypeMapping, ...visitorResult.definitions.filter( (d: unknown) => typeof d === "string" ), rootResolver.content, ].join("\n"), meta: { generatedResolverTypes: rootResolver.generatedResolverTypes, }, }; }; ================================================ FILE: codegen/local-state/visitor.ts ================================================ /** * Adapted from * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/visitor.ts * * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE * * The MIT License (MIT) * * Copyright (c) 2016 Dotan Simha * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import { TypeScriptOperationVariablesToObject } from "@graphql-codegen/typescript"; import type { DeclarationKind, FieldDefinitionResult, ParsedMapper, ParsedResolversConfig, ResolverTypes, RootResolver, } from "@graphql-codegen/visitor-plugin-common"; import { BaseResolversVisitor, DeclarationBlock, getBaseTypeNode, getConfigValue, indent, normalizeAvoidOptionals, parseMapper, } from "@graphql-codegen/visitor-plugin-common"; import type { DirectiveDefinitionNode, EnumTypeDefinitionNode, FieldDefinitionNode, GraphQLNamedType, GraphQLSchema, InterfaceTypeDefinitionNode, ListTypeNode, NamedTypeNode, NonNullTypeNode, ObjectTypeDefinitionNode, ScalarTypeDefinitionNode, UnionTypeDefinitionNode, } from "graphql"; import { isEnumType, isInterfaceType, isObjectType, isUnionType, Kind, } from "graphql"; import type { LocalStatePluginConfig } from "./config.js"; type FieldDefinitionPrintFn = ( parentName: string, avoidResolverOptionals: boolean ) => string | null; const ENUM_RESOLVERS_SIGNATURE = "export type EnumResolverSignature = { [key in keyof T]?: AllowedValues };"; interface ParsedTypeScriptResolversConfig extends ParsedResolversConfig { allowParentTypeOverride: boolean; extendedTypes: Set; baseSchemaTypesImportName: string; contextType: ParsedMapper; rootValueType: never; } export class LocalStateVisitor extends BaseResolversVisitor< LocalStatePluginConfig, ParsedTypeScriptResolversConfig > { constructor( pluginConfig: LocalStatePluginConfig, schema: GraphQLSchema, extendedTypes: Set ) { super( pluginConfig, { avoidOptionals: normalizeAvoidOptionals(pluginConfig.avoidOptionals), allowParentTypeOverride: false, contextType: parseMapper( pluginConfig.contextType || "@apollo/client#DefaultContext", "DefaultContext" ), baseSchemaTypesImportName: getConfigValue( pluginConfig.baseSchemaTypesImportName, "BaseSchemaTypes" ), extendedTypes, } as ParsedTypeScriptResolversConfig, schema ); this.setVariablesTransformer( new TypeScriptOperationVariablesToObject( this.scalars, this.convertName, this.config.avoidOptionals, this.config.immutableTypes, this.config.namespacedImportName, [], this.config.enumPrefix, this.config.enumSuffix, this.config.enumValues ) ); } protected applyResolverTypeWrapper(str: string): string { return str; } protected createResolversFields({ applyWrapper, clearWrapper, getTypeToUse, currentType, shouldInclude, }: { applyWrapper: (str: string) => string; clearWrapper: (str: string) => string; getTypeToUse: (str: string) => string; currentType: "ResolversTypes" | "ResolversParentTypes"; shouldInclude?: (type: GraphQLNamedType) => boolean; }): ResolverTypes { if (currentType === "ResolversTypes") { return super.createResolversFields({ applyWrapper, clearWrapper, getTypeToUse, currentType, shouldInclude, onNotMappedObjectType: ({ typeName, initialType }) => { let result = initialType; if ( this._federation.getMeta()[typeName]?.referenceSelectionSetsString ) { result += ` | ${this.convertName( "FederationReferenceTypes" )}['${typeName}']`; } return result; }, }); } const allSchemaTypes = this.schema.getTypeMap(); const typeNames = this._federation.filterTypeNames( Object.keys(allSchemaTypes) ); // avoid checking all types recursively if we have no `mappers` defined if (Object.keys(this.config.mappers).length > 0) { for (const typeName of typeNames) { if (this["_shouldMapType"][typeName] === undefined) { const schemaType = allSchemaTypes[typeName]; this["_shouldMapType"][typeName] = this.shouldMapType(schemaType); } } } return typeNames.reduce((prev: ResolverTypes, typeName: string) => { const schemaType = allSchemaTypes[typeName]; if ( typeName.startsWith("__") || (shouldInclude && !shouldInclude(schemaType)) ) { return prev; } const isRootType = this._rootTypeNames.has(typeName); const isMapped = this.config.mappers[typeName]; const isScalar = this.config.scalars[typeName]; const hasDefaultMapper = !!this.config.defaultMapper?.type; if (isRootType) { if (this.config.extendedTypes.has(typeName)) { const node = allSchemaTypes[typeName] .astNode as ObjectTypeDefinitionNode; const baseType = `DeepPartial<${this.config.baseSchemaTypesImportName}.${typeName}>`; const localFieldNames = node.fields?.map((field) => `'${field.name.value}'`) ?? []; prev[typeName] = applyWrapper( // Don't define fields from local resolvers on the root type // since the root value passed to a local root resolver only // contains keys from the server schema. The schema types might // however be generated from both the local and remote schema in // order to generate queries that contain both types of fields. // Filtering the local fields out ensures a more accurate type in // this situation. localFieldNames.length > 0 ? `Omit<${baseType}, ${localFieldNames.join(" | ")}>` : baseType ); } else { prev[typeName] = applyWrapper("{}"); } return prev; } if ( isMapped && this.config.mappers[typeName].type && !hasPlaceholder(this.config.mappers[typeName].type) ) { this.markMapperAsUsed(typeName); prev[typeName] = applyWrapper(this.config.mappers[typeName].type); } else if (isEnumType(schemaType) && this.config.enumValues[typeName]) { const isExternalFile = !!this.config.enumValues[typeName].sourceFile; prev[typeName] = isExternalFile ? this.convertName(this.config.enumValues[typeName].typeIdentifier, { useTypesPrefix: false, useTypesSuffix: false, }) : this.config.enumValues[typeName].sourceIdentifier!; } else if ( hasDefaultMapper && !hasPlaceholder(this.config.defaultMapper!.type) ) { prev[typeName] = applyWrapper(this.config.defaultMapper!.type); } else if (isScalar) { prev[typeName] = applyWrapper(this._getScalar(typeName)); } else if (isInterfaceType(schemaType)) { this._hasReferencedResolversInterfaceTypes = true; const type = this.convertName("ResolversInterfaceTypes"); const generic = this.convertName(currentType); prev[typeName] = applyWrapper(`${type}<${generic}>['${typeName}']`); return prev; } else if (isUnionType(schemaType)) { this._hasReferencedResolversUnionTypes = true; const type = this.convertName("ResolversUnionTypes"); const generic = this.convertName(currentType); prev[typeName] = applyWrapper(`${type}<${generic}>['${typeName}']`); } else if (isEnumType(schemaType)) { prev[typeName] = this.convertName( typeName, { useTypesPrefix: this.config.enumPrefix, useTypesSuffix: this.config.enumSuffix, }, true ); } else { prev[typeName] = this.convertName(typeName, {}, true); if (prev[typeName] !== "any" && isObjectType(schemaType)) { const relevantFields = this["getRelevantFieldsToOmit"]({ schemaType, getTypeToUse, shouldInclude, }); // If relevantFields, puts ResolverTypeWrapper on top of an entire type let internalType = relevantFields.length > 0 ? this.replaceFieldsInType(prev[typeName], relevantFields) : prev[typeName]; if (isMapped) { // replace the placeholder with the actual type if (hasPlaceholder(internalType)) { internalType = replacePlaceholder(internalType, typeName); } if ( this.config.mappers[typeName].type && hasPlaceholder(this.config.mappers[typeName].type) ) { internalType = replacePlaceholder( this.config.mappers[typeName].type, internalType ); } } if (this.config.extendedTypes.has(typeName)) { const node = allSchemaTypes[typeName]?.astNode; if (node?.kind !== Kind.OBJECT_TYPE_DEFINITION) { throw new Error( "Extended type must be an object type definition" ); } const baseType = `${this.config.baseSchemaTypesImportName}.${typeName}`; const localFieldNames = node.fields?.map((field) => `'${field.name.value}'`) ?? []; prev[typeName] = // Don't define fields from local resolvers on the parent type // since the parent type passed to a local resolver only contains // keys from the server schema. The schema types might however be // generated from both the local and remote schema in order to // generate queries that contain both types of fields. Filtering // the local fields out ensures a more accurate type in this // situation. localFieldNames.length > 0 ? `Omit, ${localFieldNames.join(" | ")}>` : baseType; } else { prev[typeName] = applyWrapper(internalType); } } } if ( !isMapped && hasDefaultMapper && hasPlaceholder(this.config.defaultMapper!.type) ) { const originalTypeName = isScalar ? this._getScalar(typeName) : prev[typeName]; if (isUnionType(schemaType)) { // Don't clear ResolverTypeWrapper from Unions prev[typeName] = replacePlaceholder( this.config.defaultMapper!.type, originalTypeName ); } else { const name = clearWrapper(originalTypeName); const replaced = replacePlaceholder( this.config.defaultMapper!.type, name ); prev[typeName] = applyWrapper(replaced); } } return prev; }, {} as ResolverTypes); } protected formatRootResolver( schemaTypeName: string, resolverType: string, declarationKind: DeclarationKind ): string { const avoidOptionals = this.config.avoidOptionals.resolvers; return `${schemaTypeName}${ avoidOptionals ? "" : "?" }: ${resolverType}${this.getPunctuation(declarationKind)}`; } private clearOptional(str: string): string { if (str.startsWith("Maybe")) { return str.replace(/Maybe<(.*?)>$/, "$1"); } return str; } ListType(node: ListTypeNode): string { return `Maybe<${super.ListType(node)}>`; } DirectiveDefinition( _node: DirectiveDefinitionNode, _key: string | number, _parent: any ): string { return ""; } EnumTypeDefinition(node: EnumTypeDefinitionNode): string { const rawTypeName = node.name.value; // If we have enumValues set, and it's point to an external enum - we need to allow internal values resolvers // In case we have enumValues set but as explicit values, no need to to do mapping since it's already // have type validation (the original enum has been modified by base types plugin). // If we have mapper for that type - we can skip if ( !this.config.mappers[rawTypeName] && !this.config.enumValues[rawTypeName] ) { return ""; } const name = this.convertName(node, { suffix: this.config.resolverTypeSuffix, }); this._collectedResolvers[rawTypeName] = { typename: name, baseGeneratedTypename: name, }; const hasExplicitValues = this.config.enumValues[rawTypeName]?.mappedValues; return new DeclarationBlock(this._declarationBlockConfig) .export() .asKind("type") .withName(name) .withContent( hasExplicitValues ? this.buildEnumResolversExplicitMappedValues( node, this.config.enumValues[rawTypeName].mappedValues! ) : this.buildEnumResolverContentBlock( node, this.getTypeToUse(rawTypeName) ) ).string; } ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string { const declarationKind = "type"; const name = this.convertName(node, { suffix: this.config.resolverTypeSuffix, }); const typeName = node.name.value; const rootType = ((): false | "query" | "mutation" | "subscription" => { if (this.schema.getQueryType()?.name === typeName) { return "query"; } if (this.schema.getMutationType()?.name === typeName) { return "mutation"; } if (this.schema.getSubscriptionType()?.name === typeName) { return "subscription"; } return false; })(); const fieldsContent = (node.fields as unknown as FieldDefinitionResult[]) .map((f) => { return f.printContent( node, (rootType === "query" && this.config.avoidOptionals.query) || (rootType === "mutation" && this.config.avoidOptionals.mutation) || (rootType === "subscription" && this.config.avoidOptionals.subscription) || (rootType === false && this.config.avoidOptionals.resolvers) ).value; }) .filter((v) => v); const block = new DeclarationBlock(this._declarationBlockConfig) .export() .asKind(declarationKind) .withName(name) .withBlock(fieldsContent.join("\n")); this._collectedResolvers[typeName] = { typename: name, baseGeneratedTypename: name, }; return block.string; } UnionTypeDefinition( _node: UnionTypeDefinitionNode, _key: string | number, _parent: any ): string { return ""; } FieldDefinition( node: FieldDefinitionNode, key: string | number, parent: any ): FieldDefinitionResult { const hasArguments = node.arguments && node.arguments.length > 0; const declarationKind = "type"; const original: FieldDefinitionNode = parent[key]; return { node: original, printContent: ( parentNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, avoidResolverOptionals ) => { const parentName = parentNode.name.value; let argsType = hasArguments ? this.convertName( parentName + (this.config.addUnderscoreToArgsType ? "_" : "") + this.convertName(node.name, { useTypesPrefix: false, useTypesSuffix: false, }) + "Args", { useTypesPrefix: true, }, true ) : null; if (argsType !== null) { const argsToForceRequire = original.arguments!.filter( (arg) => !!arg.defaultValue || arg.type.kind === "NonNullType" ); if (argsToForceRequire.length > 0) { argsType = this.applyRequireFields(argsType, argsToForceRequire); } else if (original.arguments!.length > 0) { argsType = this.applyOptionalFields(argsType, original.arguments!); } } const { mappedTypeKey, resolverType } = ((): { mappedTypeKey: string; resolverType: string; } => { const baseType = getBaseTypeNode(original.type); const realType = baseType.name.value; const typeToUse = this.getTypeToUse(realType); /** * Turns GraphQL type to TypeScript types (`mappedType`) e.g. * * - String! -> ResolversTypes['String']> * - String -> Maybe * - [String] -> Maybe>> * - [String!]! -> Array */ const mappedType = this._variablesTransformer.wrapAstTypeWithModifiers( typeToUse, original.type ); return { mappedTypeKey: mappedType, resolverType: "LocalState.Resolver", }; })(); const signature: { name: string; modifier: string; type: string; genericTypes: string[]; } = { name: node.name.value, modifier: avoidResolverOptionals ? "" : "?", type: resolverType, genericTypes: [ mappedTypeKey, this.getParentTypeToUse(parentName), this.config.contextType.type, argsType!, ].filter((f) => f), }; return { value: indent( `${signature.name}${signature.modifier}: ${ signature.type }<${signature.genericTypes.join(", ")}>${this.getPunctuation( declarationKind )}` ), meta: {}, }; }, }; } InterfaceTypeDefinition(_node: InterfaceTypeDefinitionNode): string { return ""; } public getRootResolver(): RootResolver { const name = this.convertName(this.config.allResolversTypeName); const declarationKind = "type"; const userDefinedTypes: RootResolver["generatedResolverTypes"]["userDefined"] = {}; const content = [ new DeclarationBlock(this._declarationBlockConfig) .export() .asKind(declarationKind) .withName(name) .withBlock( Object.keys(this._collectedResolvers) .map((schemaTypeName) => { const resolverType = this._collectedResolvers[schemaTypeName]; if (resolverType.baseGeneratedTypename) { userDefinedTypes[schemaTypeName] = { name: resolverType.baseGeneratedTypename, hasIsTypeOf: this._parsedSchemaMeta.typesWithIsTypeOf[schemaTypeName] || false, }; } return indent( this.formatRootResolver( schemaTypeName, resolverType.typename, declarationKind ) ); }) .join("\n") ).string, ].join("\n"); return { content, generatedResolverTypes: { resolversMap: { name }, userDefined: userDefinedTypes, }, }; } protected wrapWithListType(str: string): string { return `${this.config.immutableTypes ? "ReadonlyArray" : "Array"}<${str}>`; } protected getParentTypeForSignature(_node: FieldDefinitionNode) { return "ParentType"; } NamedType(node: NamedTypeNode): string { return `Maybe<${super.NamedType(node)}>`; } NonNullType(node: NonNullTypeNode): string { const baseValue = super.NonNullType(node); return this.clearOptional(baseValue); } ScalarTypeDefinition(node: ScalarTypeDefinitionNode): string { console.warn( `Custom scalars type '${node.name.value}' is ignored and cannot be resolved with \`LocalState\`. Please map the scalar type to a primitive with the \`scalars\` config.` ); this._hasScalars = true; return ""; } protected getPunctuation(_declarationKind: DeclarationKind): string { return ";"; } protected buildEnumResolverContentBlock( node: EnumTypeDefinitionNode, mappedEnumType: string ): string { const valuesMap = `{ ${(node.values || []) .map( (v) => `${v.name.value}${ this.config.avoidOptionals.resolvers ? "" : "?" }: any` ) .join(", ")} }`; this._globalDeclarations.add(ENUM_RESOLVERS_SIGNATURE); return `EnumResolverSignature<${valuesMap}, ${mappedEnumType}>`; } protected buildEnumResolversExplicitMappedValues( node: EnumTypeDefinitionNode, valuesMapping: { [valueName: string]: string | number } ): string { return `{ ${(node.values || []) .map((v) => { const valueName = v.name.value; const mappedValue = valuesMapping[valueName]; return `${valueName}: ${ typeof mappedValue === "number" ? mappedValue : `'${mappedValue}'` }`; }) .join(", ")} }`; } } function replacePlaceholder(pattern: string, typename: string): string { return pattern.replace(/\{T\}/g, typename); } function hasPlaceholder(pattern: string): boolean { return pattern.includes("{T}"); } ================================================ FILE: codegen/package.json ================================================ { "name": "@apollo/client-graphql-codegen", "version": "2.0.0", "description": "Apollo Client GraphQL Codegen Plugins", "keywords": [ "apollo", "client", "graphql", "codegen" ], "author": "packages@apollographql.com", "license": "MIT", "type": "module", "sideEffects": false, "repository": { "type": "git", "url": "git+https://github.com/apollographql/apollo-client.git", "directory": "codegen" }, "bugs": { "url": "https://github.com/apollographql/apollo-client/issues" }, "homepage": "https://www.apollographql.com/docs/react/", "exports": { "./local-state": "./dist/local-state/index.js" }, "files": [ "dist" ], "scripts": { "prebuild": "npm run clean", "clean": "rimraf dist", "build": "tsc", "prepack": "npm run build", "publint": "publint run --strict ." }, "devDependencies": { "typescript": "^5.8.3", "@graphql-codegen/plugin-helpers": "^6.0.0", "@graphql-codegen/typescript": "^5.0.0", "@graphql-codegen/visitor-plugin-common": "^6.0.0" }, "peerDependencies": { "@graphql-codegen/plugin-helpers": "^6.0.0", "@graphql-codegen/typescript": "^5.0.0", "@graphql-codegen/visitor-plugin-common": "^6.0.0" } } ================================================ FILE: codegen/tsconfig.json ================================================ { "compilerOptions": { "noEmit": false, "target": "ESNext", "module": "nodenext", "moduleResolution": "nodenext", "lib": ["DOM", "ES2022"], "paths": {}, "types": [], "rootDir": "./", "outDir": "./dist", "declaration": true, "sourceMap": true, "skipLibCheck": true, "strict": true }, "include": ["**/*.ts"], "exclude": ["node_modules", "dist"] } ================================================ FILE: config/FixJSDOMEnvironment.js ================================================ const { default: JSDOMEnvironment } = require("jest-environment-jsdom"); // https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string class FixJSDOMEnvironment extends JSDOMEnvironment { constructor(...args) { super(...args); // FIXME https://github.com/jsdom/jsdom/issues/1724 this.global.Headers = Headers; this.global.Request = Request; this.global.Response = Response; // FIXME: setting a global fetch breaks HttpLink tests // and setting AbortController breaks PersistedQueryLink tests, which may // indicate a memory leak // this.global.fetch = fetch; this.global.AbortController = AbortController; } } module.exports = FixJSDOMEnvironment; ================================================ FILE: config/apiExtractor.ts ================================================ import { spawnSync } from "node:child_process"; import fs from "node:fs"; import { readFile, writeFile } from "node:fs/promises"; import { format, join, parse } from "node:path"; import { parseArgs } from "node:util"; import * as path from "path"; import type { IConfigFile } from "@microsoft/api-extractor"; import { Extractor, ExtractorConfig, ExtractorLogLevel, } from "@microsoft/api-extractor"; import pkg from "../dist/package.json" with { type: "json" }; import type { ExportsCondition } from "./entryPoints.ts"; import { buildDocEntryPoints } from "./entryPoints.ts"; import { patchApiExtractorInternals, withPseudoNodeModules, } from "./helpers.ts"; patchApiExtractorInternals(); const parsed = parseArgs({ options: { generate: { type: "string", multiple: true, default: ["apiReport"], }, "main-only": { type: "boolean", default: false, }, }, }); if ( !parsed.values.generate!.every((v) => ["apiReport", "docModel"].includes(v)) ) { throw new Error( "invalid value for --generate. Only allowed values are `apiReport` and `docModel`!" ); } // Load and parse the api-extractor.json file const configObjectFullPath = path.resolve( import.meta.dirname, "../api-extractor.json" ); const baseConfig = ExtractorConfig.loadFile(configObjectFullPath); const packageJsonFullPath = path.resolve( import.meta.dirname, "../package.json" ); const reportFolder = baseConfig.apiReport.reportFolder!.replace( "", join(import.meta.dirname, "..") ); const entryPoints = Object.entries(pkg.exports as ExportsCondition) .filter(([key]) => !(key.includes("*") || key.includes(".json"))) .map(([key, value]) => { return { path: key.slice("./".length), key, value, }; }); process.exitCode = 0; const tempDir = fs.mkdtempSync( path.join(import.meta.dirname, "..", "dist", "api-model") ); try { if (parsed.values.generate?.includes("docModel")) { console.log( "\n\nCreating API extractor docmodel for the a combination of all entry points" ); const entryPointFile = path.join(tempDir, "entry.d.ts"); fs.writeFileSync( entryPointFile, buildDocEntryPoints({ rootDir: path.resolve(import.meta.dirname, ".."), targetDir: "dist", jsExt: "js", }) ); const result = await buildReport( "@apollo/client", entryPointFile, "docModel" ); if (process.exitCode === 50) { process.exitCode = 0; // if there were only warnings, we still want to exit with 0 } console.log("Creating file with all possible canonical references..."); const canonicalReferences = new Set(); const file = await readFile(result.extractorConfig.apiJsonFilePath, "utf8"); JSON.parse(file, (key, value) => { if ( key === "canonicalReference" && typeof value === "string" && value.startsWith("@apollo/client") ) { canonicalReferences.add(value); } return undefined; }); await writeFile( format({ ...parse(result.extractorConfig.apiJsonFilePath), base: "canonical-references.json", }), JSON.stringify([...canonicalReferences.values()], null, 2), "utf8" ); } if (parsed.values.generate?.includes("apiReport")) { for (const entryPoint of entryPoints) { let entry = entryPoint.value; while (typeof entry === "object") { entry = entry.types || Object.values(entry).at(-1); } const mainEntryPointFilePath = `/dist/${entry}` .replace("//", "/") .replace(/\.cjs$/, ".d.cts") .replace(/\.js$/, ".d.ts"); console.log( "\n\nCreating API extractor report for " + mainEntryPointFilePath ); const reportFileName = `api-report${ entryPoint.path ? "-" + entryPoint.path.replace(/\//g, "_") : "" }.api.md`; await buildReport( join("@apollo/client", entryPoint.key), mainEntryPointFilePath, "apiReport", reportFileName ); } } } finally { fs.rmSync(tempDir, { recursive: true }); } async function buildReport( bundledPackages: string | string[], mainEntryPointFilePath: string, mode: "apiReport" | "docModel", reportFileName = "" ) { if (!Array.isArray(bundledPackages)) { bundledPackages = [bundledPackages]; } const configObject: IConfigFile = { ...(JSON.parse(JSON.stringify(baseConfig)) as IConfigFile), mainEntryPointFilePath, }; configObject.bundledPackages = bundledPackages; if (mode === "apiReport") { configObject.apiReport!.enabled = true; configObject.docModel = { enabled: false }; configObject.messages!.extractorMessageReporting![ "ae-unresolved-link" ]!.logLevel = ExtractorLogLevel.None; configObject.apiReport!.reportFileName = reportFileName; } else { configObject.docModel!.enabled = true; configObject.apiReport = { enabled: false, // this has to point to an existing folder, otherwise the extractor will fail // but it will not write the file reportFileName: "disabled.md", reportFolder: tempDir, }; } const extractorConfig = ExtractorConfig.prepare({ configObject, packageJsonFullPath, configObjectFullPath, }); const extractorResult = await withPseudoNodeModules(() => Extractor.invoke(extractorConfig, { localBuild: process.env.CI === undefined || process.env.CI === "false", showVerboseMessages: true, }) ); if (extractorResult.succeeded) { console.log(`✅ API Extractor completed successfully`); } else { process.exitCode = extractorResult.errorCount === 0 ? 50 : 1; console.error( `❗ API Extractor completed with ${extractorResult.errorCount} errors` + ` and ${extractorResult.warningCount} warnings` ); if (extractorResult.apiReportChanged) { spawnSync( "diff", [ join(reportFolder, reportFileName), join(reportFolder, "temp", reportFileName), ], { stdio: "inherit", } ); } } return extractorResult; } ================================================ FILE: config/babel.ts ================================================ import { transformFromAstAsync } from "@babel/core"; import type { BuildStep } from "./build.ts"; import { applyRecast } from "./helpers.ts"; export const babelTransform: BuildStep = async (options) => { return applyRecast({ glob: `**/*.${options.jsExt}`, cwd: options.targetDir, async transformStep({ ast, sourceName, relativeSourcePath }) { const result = await transformFromAstAsync(ast as any, undefined, { filename: sourceName, sourceFileName: sourceName, sourceMaps: true, code: false, ast: true, cloneInputAst: false, retainLines: true, presets: [ [ "@babel/preset-env", { modules: false, targets: "since 2023, node >= 20, not dead", } satisfies import("@babel/preset-env").Options, ], ], }); return { ast: result.ast!, map: result.map }; }, }); }; ================================================ FILE: config/build.ts ================================================ import { join, resolve } from "node:path"; import { parseArgs } from "node:util"; import { $ } from "zx"; import { babelTransform } from "./babel.ts"; import { compileTs } from "./compileTs.ts"; import { deprecateInternals } from "./deprecateInternals.ts"; import { addExports } from "./exports.ts"; import { distDir } from "./helpers.ts"; import { inlineInheritDoc } from "./inlineInheritDoc.ts"; import { prepareDist } from "./prepareDist.ts"; import { preserveTsIgnore } from "./preserveTsIgnore.ts"; import { processInvariants } from "./processInvariants.ts"; import { reactCompiler } from "./react-compiler.ts"; import { verifySourceMaps } from "./verifySourceMaps.ts"; import { updateVersion, verifyVersion } from "./version.ts"; export interface BuildStepOptions { type: "esm" | "cjs"; rootDir: string; packageRoot: string; /** build target directory, relative to `rootDir` */ targetDir: string; jsExt: "js" | "cjs"; tsExt: "ts" | "cts"; first: boolean; last: boolean; } export type BuildStep = { (options: BuildStepOptions): void | Promise; }; type BuildSteps = Record; $.cwd = join(import.meta.dirname, ".."); $.verbose = true; const buildSteps = { prepareDist, addExports, typescript: compileTs, babelTransform, updateVersion, inlineInheritDoc, deprecateInternals, preserveTsIgnore, processInvariants, reactCompiler, verifyVersion, verifySourceMaps, } satisfies BuildSteps; const additionalSteps = {} satisfies BuildSteps; const args = parseArgs({ options: { step: { type: "string", multiple: true, default: ["build"], }, }, }); const allSteps = Object.assign( {}, buildSteps, additionalSteps ) satisfies BuildSteps; const runSteps = args.values.step.flatMap((step) => step === "build" ? Object.keys(buildSteps) : [step] ); const wrongSteps = runSteps.filter((step) => !(step in allSteps)); if (wrongSteps.length) { throw new Error( `Unknown steps: ${wrongSteps.join(", ")}. Valid steps are ${Object.keys( allSteps ).join(", ")}` ); } console.log("Running build steps: %s", runSteps.join(", ")); const buildStepOptions = [ // this order is important so that globs on the esm build don't accidentally match the cjs build { type: "esm", targetDir: "dist", jsExt: "js", tsExt: "ts" }, { type: "cjs", targetDir: "dist/__cjs", jsExt: "cjs", tsExt: "cts" }, ] satisfies Omit< BuildStepOptions, "first" | "last" | "rootDir" | "packageRoot" >[]; for (const options of buildStepOptions) { const first = options === buildStepOptions.at(0); const last = options === buildStepOptions.at(-1); const rootDir = resolve(import.meta.dirname, ".."); for (const step of runSteps) { const buildStep: BuildStep = allSteps[step]; console.log("--- Step %s: running ---", step); await buildStep({ ...options, first, last, rootDir, packageRoot: distDir }); if (process.exitCode) { console.error( `\n\nStep ${step} failed, exiting with code ${process.exitCode}` ); process.exit(); } console.log("--- Step %s: done ---", step); } } ================================================ FILE: config/bundlesize.ts ================================================ import { readFileSync } from "fs"; import { join } from "path"; import { gzipSync } from "zlib"; import bytes from "bytes"; const gzipBundleByteLengthLimit = bytes("35.25KB"); const minFile = join("dist", "apollo-client.min.cjs"); const minPath = join(import.meta.dirname, "..", minFile); const gzipByteLen = gzipSync(readFileSync(minPath)).byteLength; const overLimit = gzipByteLen > gzipBundleByteLengthLimit; const message = `Minified + GZIP-encoded bundle size for ${minFile} = ${bytes( gzipByteLen, { unit: "KB" } )}, ${overLimit ? "exceeding" : "under"} limit ${bytes( gzipBundleByteLengthLimit, { unit: "KB" } )}`; if (overLimit) { throw new Error(message); } else { console.log(message); } ================================================ FILE: config/compare-build-output-to.sh ================================================ #!/usr/bin/env bash set -euo pipefail upstream=$1 comparison="${RUNNER_TEMP:-/tmp}/comparison_checkout" root=$(git rev-parse --show-toplevel) temp=$(mktemp --tmpdir="${RUNNER_TEMP:-/tmp}") trap 'rm -f "$temp"' EXIT patterndiff(){ cd dist || { echo "dist folder not found"; exit 1; } count=0 while IFS= read -r -d '' file do if ! filediff="$(diff <(tr "'" '"' < "$comparison/dist/$file") <(tr "'" '"' < "$root/dist/$file"))"; then (( count++ )) echo "$file" if [[ "$file" == *.min.* ]]; then echo "> Minified file differs." else echo "$filediff" fi fi done >"$temp" < <(find . -name "$1" -print0) output="$(cat <"$temp")" cat < ### $count files with differences \`\`\`diff $output \`\`\` EOF cd .. } [ -z "$upstream" ] && { echo "need upstream argument"; exit 1; } git worktree add --force --detach --checkout "$comparison" "$upstream" || { cd "$comparison" && git checkout "$upstream"; } || exit 1 cd "$comparison" || { echo "checkout failed"; exit 1; } [ -d node_modules ] || cp -r "$root/node_modules" . npm i >&2 git status >&2 npm run build >&2 node config/apiExtractor.ts --main-only --generate docModel >&2 cd "$root" || exit 1 git status >&2 npm run build >&2 node config/apiExtractor.ts --main-only --generate docModel >&2 set +e patterndiff "*.js" patterndiff "*.cjs" patterndiff "*.d.ts" patterndiff "*.d.cts" cat < ### $(diff -qr "$comparison/docs/public" "docs/public" | wc -l) files with differences \`\`\`diff $(diff -r "$comparison/docs/public" "docs/public") \`\`\` ## differences in other files
    ### $(diff -qr "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -x "*.d.cts" -w | wc -l) files with differences \`\`\`diff $(diff -r "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -x "*.d.cts" -w) \`\`\`
    EOF ================================================ FILE: config/compileTs.ts ================================================ import { readFileSync } from "node:fs"; import { readFile, writeFile } from "node:fs/promises"; import { join } from "node:path"; import { visit } from "recast"; import { parseConfigFileTextToJson } from "typescript"; import { $ } from "zx"; import type { BuildStep, BuildStepOptions } from "./build.ts"; import type { ExportsCondition } from "./entryPoints.ts"; import { applyRecast, updatePackageJson } from "./helpers.ts"; export const compileTs: BuildStep = async (options) => { // TODO use `await using` instead of the `try..finally` here once Node supports it const tsconfig = await withBuildTsConfig(); try { if (options.type === "esm") { await $`npx tsc --project tsconfig.build.json --outDir ${options.targetDir}`; } else { const packageJsonPath = join(import.meta.dirname, "..", `package.json`); const originalPackageJson = await readFile( join(options.rootDir, "package.json"), "utf-8" ); try { // module `node18` will compile to CommonJS if the [detected module format](https://www.typescriptlang.org/docs/handbook/modules/reference.html#module-format-detection) // is CommonJS, so we temporarily overwrite the `package.json` file // this is the right way to build CommonJS, the `commonjs` module option should actually not be used // see https://www.typescriptlang.org/docs/handbook/modules/reference.html#commonjs await updatePackageJson(options.rootDir, (packageJson) => { packageJson.type = "commonjs"; }); // noCheck is required to suppress errors like // error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@wry/equality")' call instead. await $`npx tsc --project tsconfig.build.json --outDir ${options.targetDir} --module node16 --moduleResolution node16 --noCheck`; } finally { await writeFile(packageJsonPath, originalPackageJson); } await renameJsFilesToCjs(options); } } finally { await tsconfig[Symbol.asyncDispose](); } }; function renameJsFilesToCjs(options: BuildStepOptions) { return applyRecast({ glob: `**/*.{js,d.ts}`, cwd: options.targetDir, transformStep({ ast, sourceName }) { return { ast: visit(ast, { visitCallExpression(path) { const node = path.node; if ( node.callee.type === "Identifier" && node.callee.name === "require" && node.arguments.length === 1 && node.arguments[0].type === "StringLiteral" && node.arguments[0].value.startsWith(".") && node.arguments[0].value.endsWith(".js") ) { node.arguments[0].value = node.arguments[0].value.replace( /\.js$/, ".cjs" ); } this.traverse(path); }, visitExportAllDeclaration(path) { const node = path.node; if ( node.source && node.source.type === "StringLiteral" && node.source.value.startsWith(".") && node.source.value.endsWith(".js") ) { node.source.value = node.source.value.replace(/\.js$/, ".cjs"); } this.traverse(path); }, visitExportNamedDeclaration(path) { const node = path.node; if ( node.source && node.source.type === "StringLiteral" && node.source.value.startsWith(".") && node.source.value.endsWith(".js") ) { node.source.value = node.source.value.replace(/\.js$/, ".cjs"); } this.traverse(path); }, visitImportDeclaration(path) { const node = path.node; if ( node.source.type === "StringLiteral" && node.source.value.startsWith(".") && node.source.value.endsWith(".js") ) { node.source.value = node.source.value.replace(/\.js$/, ".cjs"); } this.traverse(path); }, visitTSImportType(path) { const node = path.node; if ( node.argument.type === "StringLiteral" && node.argument.value.startsWith(".") && node.argument.value.endsWith(".js") ) { node.argument.value = node.argument.value.replace( /\.js$/, ".cjs" ); } this.traverse(path); }, }), targetFileName: sourceName .replace(/\.js$/, ".cjs") .replace(/\.d\.ts$/, ".d.cts"), }; }, }); } async function withBuildTsConfig() { const tsconfigPath = join(import.meta.dirname, "..", `tsconfig.build.json`); const originalTsconfig = await readFile(tsconfigPath, "utf-8"); const tsconfig = parseConfigFileTextToJson( tsconfigPath, originalTsconfig ).config; tsconfig.files = getEntryPoints(); await writeFile(tsconfigPath, JSON.stringify(tsconfig, null, 2)); return { [Symbol.asyncDispose]() { return writeFile(tsconfigPath, originalTsconfig); }, }; } function getEntryPoints() { const pkg = JSON.parse( readFileSync(join(import.meta.dirname, "..", "package.json"), "utf-8") ); const acc = new Set([pkg.exports]); const results = new Set(["./src/react/types/types.documentation.ts"]); for (const entry of acc) { if (typeof entry === "string") { results.add(entry); } else if (typeof entry === "object") { Object.values(entry).forEach((e) => acc.add(e)); } } return Array.from(results); } ================================================ FILE: config/deprecateInternals.ts ================================================ import { visit } from "recast"; import type { BuildStep } from "./build.ts"; import { applyRecast, frameComment } from "./helpers.ts"; export const deprecateInternals: BuildStep = async (options) => applyRecast({ glob: `**/*.{${options.jsExt},d.${options.tsExt}}`, cwd: options.targetDir, transformStep({ ast }) { return { ast: visit(ast, { visitNode(path) { this.traverse(path); const node = path.node; if (!node.comments) { return; } for (const comment of node.comments) { if ( comment.type === "CommentBlock" && comment.value.includes("@internal") ) { if (comment.value.includes("@deprecated")) continue; comment.value = frameComment( comment.value.trim() + "\n\n@deprecated This is an internal API and should not be used directly. This can be removed or changed at any time." ); } } }, }), }; }, }); ================================================ FILE: config/dirname.cjs ================================================ // workaround for `entryPoints.ts` that needs access to the current directory, // but cannot use `import.meta` as the file is required by Jest, which transpiles // the file to CommonJS - ending up with "SyntaxError: Cannot use 'import.meta' outside a module" module.exports.__dirname = __dirname; ================================================ FILE: config/entryPoints.ts ================================================ import { readFileSync } from "fs"; import path from "path"; // @ts-ignore An import path can only end with a '.cts' extension when 'allowImportingTsExtensions' is enabled. import type { BuildStepOptions } from "./build.ts"; import { __dirname } from "./dirname.cjs"; const pkg = JSON.parse( readFileSync(path.resolve(__dirname, "../package.json"), { encoding: "utf-8", }) ) as typeof import("../package.json"); export type ExportsCondition = string | { [key: string]: ExportsCondition }; type EntryPoint = { dirs: string[]; key: string; value: ExportsCondition; }; export const entryPoints = Object.entries(pkg.exports).map( ([key, value]) => ({ dirs: key .slice("./".length) .split("/") .filter((d) => d !== ""), key, value, }) ); export const buildDocEntryPoints = ( options: Pick ) => { const acc = entryPoints.map((entryPoint) => { let identifier = ""; if (entryPoint.dirs.length) { identifier = `entrypoint_` + entryPoint.dirs.join("__").replace(/-/g, "_"); } if (identifier === "core") return; return `export * ${identifier ? `as ${identifier}` : ""} from "${path.join( "@apollo/client", ...entryPoint.dirs )}";`; }); acc.push( `export * from "${path.join( options.rootDir, options.targetDir, "react", "types", `types.documentation.${options.jsExt}` )}";` ); return acc.join("\n"); }; ================================================ FILE: config/exports.ts ================================================ import assert from "node:assert"; import { mkdir, readFile, writeFile } from "node:fs/promises"; import { join } from "node:path"; import type { BuildStep } from "./build.ts"; import { entryPoints } from "./entryPoints.ts"; import { updatePackageJson } from "./helpers.ts"; type ConditionRoot = { import?: string; "module-sync"?: string; module?: string; require?: string; default?: string; }; export const addExports: BuildStep = async (options) => { await updatePackageJson(options.packageRoot, (pkg) => { // normal entry points a la `@apollo/client` and `@apollo/client/core`. // these entry points will be used in most cases and point to the right file depending // on how the user is consuming the package. for (const entryPoint of entryPoints) { if (typeof entryPoint.value === "string") { pkg.exports[entryPoint.key] = processEntryPoint( entryPoint.value, pkg.exports[entryPoint.key] ); } else { for (const [key, value] of Object.entries(entryPoint.value)) { if (!pkg.exports[entryPoint.key]) { pkg.exports[entryPoint.key] = {}; } assert( typeof value === "string", "nesting of this complexity is not supported yet" ); pkg.exports[entryPoint.key][key] = processEntryPoint( value, pkg.exports[entryPoint.key][key] ); } } } }); // add legacy-style exports for `@apollo/client/index.js`, `@apollo/client/core/index.js`, // `@apollo/client/main.cjs`, `@apollo/client/core/core.cjs`, etc. // adding full entries for these would completely reiterate the other exports, // not doing so would break things like a `production`/`development` distinction. // instead, we create a new directory structure with stub files that `export * from "@apollo/client/..." // which will then be picked up by the detailed export maps for (const entryPoint of entryPoints) { const from = `@apollo/client/${entryPoint.key.substring(2)}`.replace( /\/$/, "" ); const baseName = options.type === "esm" ? "index" : entryPoint.dirs.at(-1) || "main"; await writeLegacyExport(entryPoint.dirs, baseName, from); } if (options.type === "cjs") { // Legacy entry point for `@apollo/client/apollo-client.cjs`. // This was a rolled-up build in the past, while now it's one of many compiled files. // It's probably still better to have this available in case someone ever used it with bundlers. await writeLegacyExport([], "apollo-client", "@apollo/client"); } function processEntryPoint(value: string, existing: ConditionRoot = {}) { value = value.replace( /^.\/src/, `.${options.targetDir.replace(/^dist/, "")}` ); if (options.type === "esm") { const target = value.replace(/\.ts$/, `.${options.jsExt}`); existing.module = target; existing["module-sync"] = target; // this will be handled by `default`, which directly follows, so we can omit it // existing.import = target; existing.default = target; } else { existing.require = value.replace(/\.ts$/, `.${options.jsExt}`); } return JSON.parse( JSON.stringify(existing, [ // ensure the order of keys is consistent "react-compiler", "module", "module-sync", "require", "import", "default", ]) ); } async function writeLegacyExport( dirs: string[], baseName: string, from: string ) { const dirname = join(options.packageRoot, "legacyEntryPoints", ...dirs); await mkdir(dirname, { recursive: true }); await writeFile( join(dirname, `${baseName}.d.${options.tsExt}`), `export * from "${from}";`, { encoding: "utf-8" } ); await writeFile( join(dirname, `${baseName}.${options.jsExt}`), options.type === "esm" ? `export * from "${from}";` : `module.exports = require("${from}");`, { encoding: "utf-8" } ); } }; ================================================ FILE: config/helpers.ts ================================================ import * as assert from "node:assert"; import { glob, unlink, writeFile } from "node:fs/promises"; import { mkdir, readFile, rm, symlink } from "node:fs/promises"; import { relative } from "node:path"; import * as path from "path"; import { ApiModelGenerator } from "@microsoft/api-extractor/lib/generators/ApiModelGenerator.js"; import type { ApiItem, ApiPackage } from "@microsoft/api-extractor-model"; import { ApiDeclaredItem, ApiEntryPoint, ApiNamespace, } from "@microsoft/api-extractor-model"; import { apiItem_onParentChanged } from "@microsoft/api-extractor-model/lib/items/ApiItem.js"; import { TSDocParser } from "@microsoft/tsdoc"; import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.js"; import * as recast from "recast"; import * as parser from "recast/parsers/babel.js"; import * as tsParser from "recast/parsers/typescript.js"; // @ts-ignore unfortunately we don't have types for this as it's JS with JSDoc // eslint-disable-next-line import/no-unresolved import * as sorcery from "sorcery"; import type { JSONSchemaForNPMPackageJsonFiles } from "./schema.package.json.ts"; export const distDir = path.resolve(import.meta.dirname, "..", "dist"); export function reparse(source: string) { return recast.parse(source, { parser }); } export function reprint(ast: ReturnType) { return recast.print(ast).code; } type MaybePromise = T | Promise; export async function applyRecast({ glob: globString, cwd, transformStep, }: { glob: string; cwd: string; transformStep: (options: { ast: recast.types.ASTNode; sourceName: string; relativeSourcePath: string; }) => MaybePromise<{ ast: recast.types.ASTNode; targetFileName?: string; copy?: boolean; }>; }) { for await (let sourceFile of glob(globString, { withFileTypes: true, cwd, exclude(fileName) { return fileName.parentPath.indexOf("legacyEntryPoints") !== -1; }, })) { const baseDir = sourceFile.parentPath; const sourceFileName = sourceFile.name; const sourcePath = path.join(baseDir, sourceFile.name); const source = await readFile(sourcePath, { encoding: "utf8" }); const sourceMapName = source.match(/\/\/# sourceMappingURL=(.*)$/m)?.[1]; assert.ok( sourceMapName, `No source map found for file ${sourcePath} in ${source}` ); const sourceMapPath = path.join(baseDir, sourceMapName); const sourceMapContents = JSON.parse( await readFile(sourceMapPath, { encoding: "utf8", }) ); // from now on, we're treating this data as if it were from an "intermediate" file instead // we might want to override the original source file after all // we place this in a "parallel folder" so relative paths have the same depth const intermediateName = path.join("../intermediate", sourceFileName); const intermediateNamePath = path.join(baseDir, intermediateName); const ast = recast.parse(source, { parser: tsParser, sourceFileName: intermediateName, }); const transformResult = await transformStep({ ast, sourceName: sourceFileName, relativeSourcePath: relative(cwd, sourcePath), }); const targetFileName = transformResult.targetFileName || sourceFileName; const targetFilePath = path.join(baseDir, targetFileName); const result = recast.print(transformResult.ast, { sourceMapName: `${targetFileName}.map`, }); if (!transformResult.copy) { if (targetFileName !== sourceFileName) { // we are renaming the files - as we won't be overriding in place, // delete the old files await rm(sourcePath); await rm(sourceMapPath); } else if (result.code === source) { // no changes, so we can skip writing the file, which guarantees no further // changes to the source map continue; } } // load the resulting "targetFileName" and the intermediate file into sorcery // it will read the original .ts source from the file system const virtualFiles = { content: { [intermediateNamePath]: source, [targetFilePath]: result.code, }, sourcemaps: { [intermediateNamePath]: sourceMapContents, [targetFilePath]: result.map, }, }; // we use sorcery to combine all these source maps back into one const chain = await sorcery.load(targetFilePath, virtualFiles); // save everything back to the file system, applying the source map changes of the transformation await chain.write(); } } /** * creates a pseudo "dist/node_modules" folder with * "dist/node_modules/@apollo/client" symlinked to "dist" * so that tools can pick up the client package as an "external" package */ export async function withPseudoNodeModules(fn: () => T) { const node_modules = path.join(distDir, "node_modules"); const parent = path.join(node_modules, "@apollo"); const link = path.join(parent, "client"); try { await mkdir(parent, { recursive: true }); await unlink(link).catch(() => {}); await symlink(distDir, link); return await fn(); } finally { await rm(node_modules, { recursive: true }); } } export function frameComment(text: string) { const framed = text .split("\n") .map((t) => (t.match(/\s+\*/) ? t.trim() : t)) .map((t) => (!t.startsWith("*") ? "* " + t : t)) .join("\n") .replaceAll(/(^(\s*\*\s*\n)*|(\n\s*\*\s*)*$)/g, ""); return `*\n${framed}\n`; } type PackageJson = Omit & { author: string; }; export async function updatePackageJson( dirname: string, updater: (pkg: PackageJson) => PackageJson | void, replacer: null | ((this: any, key: string, value: any) => any) = null ) { const packageJsonPath = path.join(dirname, "package.json"); const pkg = JSON.parse( await readFile(packageJsonPath, "utf8") ) as PackageJson; const newContents = updater(pkg) ?? pkg; await writeFile( packageJsonPath, JSON.stringify(newContents, replacer, 2) + "\n" ); } export function patchApiExtractorInternals() { // The TSDoc parser mangles some parts of DocBlocks in a way that's problematic // for us. // This code is used to keep the original DocComment intact, so that we can // use it later in the API docs. const orig_parseRange = TSDocParser.prototype.parseRange; TSDocParser.prototype.parseRange = function (range) { const parsed = orig_parseRange.call(this, range); parsed.docComment.emitAsTsdoc = function () { return range.toString(); }; return parsed; }; /* In `buildDocEntryPoints` we create a file with namespace re-exports for all sub-entrypoints. We don't want to actually export these as namespaces, but instead want to turn them into additional `EntryPoint` objects. API Extractor itself cannot load more than one entrypoint, although the file format supports it - so we patch the logic here to reorganize the structure before saving. */ const orig_buildApiPackage = ApiModelGenerator.prototype.buildApiPackage; ApiModelGenerator.prototype.buildApiPackage = function ( this: ApiModelGenerator ) { const mappings: Record = {}; const apiPackage: ApiPackage = orig_buildApiPackage.call(this); const mainEntrypoint = apiPackage.entryPoints[0]; for (const [index, namespace] of Object.entries( mainEntrypoint.members // we iterate backwards so that we can remove entries without affecting the indexes ).reverse()) { if ( !(namespace instanceof ApiNamespace) || !namespace.name.startsWith("entrypoint_") ) { continue; } // we want to turn namespaces into entry points const entryPoint = new ApiEntryPoint({ name: namespace.name .slice("entrypoint_".length) .replace(/__/g, "/") .replace(/_/g, "-"), members: [], }); for (const member of namespace.members) { // this is an internal function call - the only way to "detach" an existing node // from its parent, so that it can be added to the new entry point member[apiItem_onParentChanged](undefined); entryPoint.addMember(member); } apiPackage.addMember(entryPoint); (mainEntrypoint.members as ApiItem[]).splice(+index, 1); mappings[ namespace.canonicalReference.toString().slice(0, -":namespace".length) ] = entryPoint.canonicalReference.toString(); } function fixup(item: ApiItem) { item.members.forEach(fixup); if (item instanceof ApiDeclaredItem) { for (const excerpt of item.excerptTokens) { const stringified = excerpt.canonicalReference?.toString(); if (stringified?.startsWith("@apollo/client!entrypoint_")) { // @ts-ignore excerpt["_canonicalReference"] = DeclarationReference.parse( stringified.replace( /(@apollo\/client!entrypoint_[^.]+)[.:]/, (_, start) => { if (!mappings[start]) { throw new Error( `No mapping found for ${start} in ${JSON.stringify( mappings )}` ); } return mappings[start]; } ) ); } } } } fixup(apiPackage); return apiPackage; }; return () => { TSDocParser.prototype.parseRange = orig_parseRange; ApiModelGenerator.prototype.buildApiPackage = orig_buildApiPackage; }; } ================================================ FILE: config/inlineInheritDoc.ts ================================================ /** * This build step will inline docblocks specified with `@inheritDoc` on build. * * E.g. a in a dockblock like this: * * ```js * /** {@inheritDoc @apollo/client!QueryOptions#query:member} *\/ * ``` * * the annotation (everything from `{` to `}`) will be replaced with the docblock * of the `QueryOptions.query` member function. * * We need this here for situations where inheritance is not possible for `docModel` * generation (`interface Foo extends Omit {}` is too complicated a * type for it to parse) and we want to flatten types - or going forward, for * generally flattening types without repeating docs everywhere. * * You can get these "canonical ids" by running * * ```sh * yarn docmodel * ``` * * and looking at the generated [`client.api.json`](../docs/shared/client.api.json) file. */ /** End file docs */ // @ts-ignore import fs, { mkdirSync, symlinkSync } from "node:fs"; import path from "node:path"; import { Extractor, ExtractorConfig, ExtractorLogLevel, } from "@microsoft/api-extractor"; import { ApiDocumentedItem, ApiModel } from "@microsoft/api-extractor-model"; import type { DocComment, DocExcerpt, DocNode } from "@microsoft/tsdoc"; import type { TextRange } from "@microsoft/tsdoc"; import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.js"; import { visit } from "recast"; import type { BuildStep, BuildStepOptions } from "./build.ts"; import { buildDocEntryPoints } from "./entryPoints.ts"; import { applyRecast, frameComment, patchApiExtractorInternals, withPseudoNodeModules, } from "./helpers.ts"; export const inlineInheritDoc: BuildStep = async (options) => { console.log( "Processing {@inheritDoc } comments in .d.ts files." ); const model = await withPseudoNodeModules(() => loadApiModel(options)); await processComments(model, options); }; function getCommentFor( canonicalReference: string, variables: undefined | Record, model: ApiModel ) { const apiItem = model.resolveDeclarationReference( DeclarationReference.parse(canonicalReference), undefined ).resolvedApiItem; if (!apiItem) throw new Error( `Could not resolve canonical reference "${canonicalReference}"` ); if (apiItem instanceof ApiDocumentedItem) { if (!apiItem.tsdocComment) return ""; const unusedVariables = new Set(Object.keys(variables || {})); let string = renderDocComment(apiItem.tsdocComment); string = string.replaceAll(/\\?\{\\?\{(\w+)\\?\}\\?\}/g, (_, variable) => { unusedVariables.delete(variable); const value = variables?.[variable]; if (value === undefined) { throw new Error( `Variable "${variable}" is required but not defined for @inheritDoc "${canonicalReference}"` ); } return value; }); if (unusedVariables.size > 0) { throw new Error( `Variables ${[...unusedVariables].join( ", " )} are defined but not used in @inheritDoc "${canonicalReference}"` ); } return string; } else { throw new Error( `"${canonicalReference}" is not documented, so no documentation can be inherited.` ); } } function loadApiModel(options: BuildStepOptions) { const tempDir = fs.mkdtempSync("api-model"); try { const entryPointFile = path.join(tempDir, "entry.d.ts"); fs.writeFileSync(entryPointFile, buildDocEntryPoints(options)); mkdirSync(path.join(tempDir, "node_modules", "@apollo"), { recursive: true, }); symlinkSync( options.packageRoot, path.join(tempDir, "node_modules", "@apollo", "client") ); // Load and parse the api-extractor.json file const configObjectFullPath = path.resolve( import.meta.dirname, "../api-extractor.json" ); const packageJsonFullPath = path.resolve( import.meta.dirname, "../package.json" ); const tempModelFile = path.join(tempDir, "client.api.json"); const configObject = ExtractorConfig.loadFile(configObjectFullPath); configObject.mainEntryPointFilePath = entryPointFile; configObject.docModel = { ...configObject.docModel, enabled: true, apiJsonFilePath: tempModelFile, }; configObject.apiReport = { enabled: false, reportFileName: "disabled.md", reportFolder: tempDir, }; configObject.messages = { extractorMessageReporting: { default: { logLevel: ExtractorLogLevel.None, }, }, compilerMessageReporting: { default: { logLevel: ExtractorLogLevel.None, }, }, tsdocMessageReporting: { default: { logLevel: ExtractorLogLevel.None, }, }, }; const extractorConfig = ExtractorConfig.prepare({ configObject, packageJsonFullPath, configObjectFullPath, }); const restore = patchApiExtractorInternals(); Extractor.invoke(extractorConfig); restore(); const model = new ApiModel(); model.loadPackage(tempModelFile); return model; } finally { fs.rmSync(tempDir, { recursive: true }); } } function processComments(model: ApiModel, options: BuildStepOptions) { const inheritDocRegex = /\{\s*@inheritDoc\s+(\S+)(?:\s+(\{[^}]*\}))?\s*\}(?:\s*$)?/; return applyRecast({ glob: `**/*.{${options.jsExt},d.${options.tsExt}}`, cwd: options.targetDir, transformStep({ ast, sourceName }) { return { ast: visit(ast, { visitNode(path) { this.traverse(path); const node = path.node; if (!node.comments) { return; } for (const comment of node.comments) { if (comment.type === "CommentBlock") { let newText = comment.value; while (inheritDocRegex.test(newText)) { newText = newText.replace( inheritDocRegex, (_, canonicalReference, variables) => { try { return ( getCommentFor( canonicalReference, variables ? JSON.parse(variables) : undefined, model ) || "" ); } catch (e) { console.warn("\n\n" + e.message); process.exitCode = 1; } } ); } if (newText.includes("@inheritDoc")) { console.warn( "\n\nFound @inheritDoc after processing, something went wrong.", { sourceName, originalText: comment.value, finalReplacement: newText, } ); process.exitCode = 1; } if (comment.value !== newText) { comment.value = frameComment(newText); } } } }, }), }; }, }); } function renderDocComment(node: DocComment): string { let commentRange: TextRange | undefined = undefined; function iterate(node: undefined | DocNode | readonly DocNode[]) { if (!node) return; // no node if (commentRange) return; // we already found what we're looking for if ("forEach" in node) { node.forEach(iterate); return; } if (node.kind === "Excerpt") { const excerptNode = node as DocExcerpt; commentRange = excerptNode.content.parserContext.commentRange; } node.getChildNodes().forEach(iterate); } iterate(node); if (!commentRange) { return ""; } let text = commentRange.toString(); return text .slice(2, -2) .split("\n") .map((line) => line // remove leading ` *` or ` * ` .replace(/^\s*\* ?/, "") // remove singular trailing spaces, but preserve multiple trailing spaces as those have a meaning in markdown .replace(/(? { throw new Error( "Cannot use hydrateRoot with React 17. Ensure this uses legacy root instead" ); }, createRoot: () => { throw new Error( "Cannot use createRoot with React 17. Ensure this uses legacy root instead" ); }, }; ================================================ FILE: config/jest.config.ts ================================================ import { join } from "node:path"; import { fileURLToPath } from "node:url"; const defaults = { rootDir: "src", preset: "ts-jest", testEnvironment: fileURLToPath( import.meta.resolve("./FixJSDOMEnvironment.js") ), setupFilesAfterEnv: ["/config/jest/setup.ts"], testEnvironmentOptions: { url: "http://localhost", }, snapshotFormat: { escapeString: true, printBasicPrototype: true, }, transform: { "(dist/.+\\.js|\\.tsx?)$": [ "ts-jest", { // just transpile, no type checking. We type-check in CI by running `tsc` directly. tsconfig: join(import.meta.dirname, "..", "tsconfig.tests.json"), }, ], }, resolver: "/config/jest/resolver.ts", transformIgnorePatterns: ["/node_modules/(?!(rxjs)/)"], prettierPath: null, moduleNameMapper: { // Our internal testing utilities are not part of the final build, so we // want to always import them from the source directory. "^@apollo/client/testing/internal$": "/testing/internal/index.ts", }, }; const ignoreDTSFiles = ".d.ts$"; const ignoreTSFiles = ".ts$"; const ignoreTSXFiles = ".tsx$"; const reactSharedTestFileIgnoreList = [ ignoreDTSFiles, ignoreTSFiles, "src/react/hooks/__tests__/useBackgroundQuery/testUtils.tsx", "src/react/hooks/__tests__/useSuspenseQuery/testUtils.tsx", ]; const react17TestFileIgnoreList = [ ...reactSharedTestFileIgnoreList, // We only support Suspense with React 18, so don't test suspense hooks with // React 17 "src/testing/experimental/__tests__/createTestSchema.test.tsx", "src/react/hooks/__tests__/useSuspenseFragment.test.tsx", "src/react/hooks/__tests__/useSuspenseFragment/*", "src/react/hooks/__tests__/useSuspenseQuery.test.tsx", "src/react/hooks/__tests__/useSuspenseQuery/*", "src/react/hooks/__tests__/useBackgroundQuery.test.tsx", "src/react/hooks/__tests__/useBackgroundQuery/*", "src/react/hooks/__tests__/useLoadableQuery.test.tsx", "src/react/hooks/__tests__/useLoadableQuery/*", "src/react/hooks/__tests__/useQueryRefHandlers.test.tsx", "src/react/query-preloader/__tests__/createQueryPreloader.test.tsx", "src/react/ssr/__tests__/prerenderStatic.test.tsx", "src/react/ssr/__tests__/useQueryEndToEnd.test.tsx", ]; const tsStandardConfig = { ...defaults, displayName: "Core Tests", testPathIgnorePatterns: [ ignoreDTSFiles, ignoreTSXFiles, "src/local-state/__tests__/LocalState/testUtils.ts", "src/local-state/__tests__/LocalState/fixtures/.*.ts$", ], }; const tsRxJSMinConfig = { ...tsStandardConfig, displayName: "Core Tests - RxJS min version", moduleNameMapper: { ...tsStandardConfig.moduleNameMapper, "^rxjs$": "rxjs-min", }, }; // For both React (Jest) "projects", ignore core tests (.ts files) as they // do not import React, to avoid running them twice. const standardReact19Config = { ...defaults, displayName: "ReactDOM 19", testPathIgnorePatterns: reactSharedTestFileIgnoreList, }; const standardReact18Config = { ...defaults, displayName: "ReactDOM 18", testPathIgnorePatterns: [ ...reactSharedTestFileIgnoreList, "src/react/ssr/__tests__/prerenderStatic.test.tsx", ], moduleNameMapper: { ...defaults.moduleNameMapper, "^react$": "react-18", "^react-dom$": "react-dom-18", "^react-dom/(.*)$": "react-dom-18/$1", }, }; const standardReact17Config = { ...defaults, displayName: "ReactDOM 17", testPathIgnorePatterns: react17TestFileIgnoreList, moduleNameMapper: { ...defaults.moduleNameMapper, "^react$": "react-17", "^react-dom$": "react-dom-17", "^react-dom/client$": "/../config/jest/react-dom-17-client.js", "^react-dom/server$": "react-dom-17/server", "^react-dom/test-utils$": "react-dom-17/test-utils", }, }; export default { projects: [ tsStandardConfig, tsRxJSMinConfig, standardReact17Config, standardReact18Config, standardReact19Config, ], }; ================================================ FILE: config/listImports.ts ================================================ /** * used via e.g. * * ```sh * node --experimental-transform-types --no-warnings --conditions 'react-server' config/listImports.ts @apollo/client/react * ``` * * from `src/__tests__/exports.ts` */ // @ts-ignore import { registerHooks } from "node:module"; registerHooks({ resolve(specifier, context, nextResolve) { try { return nextResolve(specifier, context); } catch (e) { if (specifier.endsWith(".js")) { for (const ext of [".ts", ".tsx"]) { return nextResolve(specifier.slice(0, -3) + ext, context); } } throw e; } }, }); Object.keys(await import(process.argv[2])) .sort() .forEach((i) => console.log(i)); ================================================ FILE: config/madge.ts ================================================ import { join } from "node:path"; import * as madgePkg from "madge"; const madge = madgePkg.default; process.env.DEBUG = "*"; for (const customConditions of [[], ["development"], ["production"]]) { const inst = await madge(join(import.meta.dirname, "../src"), { baseDir: join(import.meta.dirname, ".."), fileExtensions: ["ts", "tsx", "js", "jsx"], tsConfig: { compilerOptions: { moduleResolution: "NodeNext", customConditions, }, }, includeNpm: true, detectiveOptions: { ts: { skipTypeImports: true, }, }, }); const circular = inst.circular(); if (circular.length) { process.exitCode = 1; console.warn( "❌ Circular dependencies found for customConditions:", customConditions ); console.log(circular); } else { console.log( "✅ No circular dependencies found for customConditions:", customConditions ); } } ================================================ FILE: config/precheck.ts ================================================ import lockfile from "../package-lock.json" with { type: "json" }; const { lockfileVersion } = lockfile; const expectedVersion = 3; if (typeof lockfileVersion !== "number" || lockfileVersion < expectedVersion) { throw new Error( `Old lockfileVersion (${lockfileVersion}) found in package-lock.json (expected ${expectedVersion} or later)` ); } console.log("ok", { lockfileVersion, expectedVersion, }); ================================================ FILE: config/prepareDist.ts ================================================ // The Apollo Client source that is published to npm is located in the // "dist" directory. This utility script is called when building Apollo Client, // to make sure the "dist" directory is prepared for publishing. // // This script will: // // - Copy the current root package.json into "dist" after adjusting it for // publishing. // - Copy the supporting files from the root into "dist" (e.g. `README.MD`, // `LICENSE`, etc.). // - Create a new `package.json` for each sub-set bundle we support, and // store it in the appropriate dist sub-directory. import { copyFile, mkdir } from "node:fs/promises"; import { join } from "node:path"; import type { BuildStep } from "./build.ts"; import { updatePackageJson } from "./helpers.ts"; export const prepareDist: BuildStep = async (options) => { if (!options.first) return; await mkdir(options.packageRoot, { recursive: true }); await copyFile( join(options.rootDir, "package.json"), join(options.packageRoot, "package.json") ); await updatePackageJson( options.packageRoot, (packageJson) => { // The root package.json is marked as private to prevent publishing // from happening in the root of the project. This sets the package back to // public so it can be published from the "dist" directory. packageJson.private = false; // Remove package.json items that we don't need to publish delete packageJson.scripts; delete packageJson.bundlesize; delete packageJson.devEngines; delete packageJson.devDependencies; delete packageJson.overrides; packageJson.exports = { "./package.json": "./package.json", "./*.js": "./legacyEntryPoints/*.js", "./*.cjs": "./legacyEntryPoints/*.cjs", "./*.d.ts": "./legacyEntryPoints/*.d.ts", "./*.d.cts": "./legacyEntryPoints/*.d.cts", }; }, (_key: any, value: any) => { // The root package.json points to the CJS/ESM source in "dist", to support // on-going package development (e.g. running tests, supporting npm link, etc.). // When publishing from "dist" however, we need to update the package.json // to point to the files within the same directory. if (typeof value === "string" && value.startsWith("./dist/")) { const parts = value.split("/"); parts.splice(1, 1); // remove dist return parts.join("/"); } return value; } ); // Copy supporting files into "dist" await copyFile( `${options.rootDir}/README.md`, `${options.packageRoot}/README.md` ); await copyFile( `${options.rootDir}/LICENSE`, `${options.packageRoot}/LICENSE` ); await copyFile( `${options.rootDir}/CHANGELOG.md`, `${options.packageRoot}/CHANGELOG.md` ); }; ================================================ FILE: config/preserveTsIgnore.ts ================================================ /** * TypeScript removes normal comments when it creates declaration files. * * That means that `// @ts-ignore` comments are removed, which can lead to * unwanted errors in the generated declaration files, if those comments * are still necessary in the generated `.d.ts` files. * * As a workaround, it's possible to use `/** @ts-ignore ...` instead, * as these are preserved in the generated declaration files. * The downside to this is that these comments then also might end up in * IDE inline documentation, which we want to avoid. * * This build step post-processes all `.d.ts` files if a block-comment * starts with `* @ts-ignore`, it removes the leading `*`, effectively * turning them into non-docBlock comments for shipping. */ import { visit } from "recast"; import type { BuildStep } from "./build.ts"; import { applyRecast, frameComment } from "./helpers.ts"; export const preserveTsIgnore: BuildStep = async (options) => applyRecast({ glob: `**/*.{${options.jsExt},d.${options.tsExt}}`, cwd: options.targetDir, transformStep({ ast }) { return { ast: visit(ast, { visitNode(path) { this.traverse(path); const node = path.node; if (!node.comments) { return; } for (const comment of node.comments) { if ( comment.type === "CommentBlock" && comment.value.match(/^\*\s*@ts-ignore/) ) { comment.value = comment.value.substring(1); } } }, }), }; }, }); ================================================ FILE: config/prettier/format-jsdoc.js ================================================ /** @import { TSESTree as AST } from '@typescript-eslint/types' */ /** @import { Plugin, Printer } from 'prettier' */ import * as prettier from "prettier"; import estree from "prettier/plugins/estree.js"; import { parsers as tsParsers } from "prettier/plugins/typescript"; /** @type {Plugin["languages"]} */ export const languages = [ { name: "TypeScript", parsers: ["typescript-with-jsdoc"], }, ]; /** @type {Plugin["parsers"]} */ export const parsers = { "typescript-with-jsdoc": { ...tsParsers.typescript, astFormat: "typescript-with-jsdoc", }, }; /** @type {Printer} */ const estreePrinter = estree.printers.estree; /** @type {Plugin["printers"]} */ export const printers = { "typescript-with-jsdoc": { ...estreePrinter, print(path, options, print, args) { return estreePrinter.print(path, options, print, args); }, embed(path, options) { if (path.node.comments) { return async (textToDocForEmbed, mainPrint, path, options) => { const newComments = await Promise.all( Object.entries(path.node.comments) .filter( (/* @type {[string, AST.Comment]} */ [, comment]) => comment.type === "Block" && comment.value[0] === "*" ) .map( async (/* @type {[string, AST.Comment]} */ [key, comment]) => { const doc = await textToDocForEmbed( comment.value .split("\n") .map((line) => line.replace(/^\s*\*/g, "")) .join("\n"), { parser: "markdown", } ); const string = prettier.doc.printer.printDocToString(doc, { ...options, proseWrap: "preserve", trailingComma: "none", }).formatted; // keep it single-line if it originally was single-line if ( comment.value.trim().indexOf("\n") === -1 && string.trim().indexOf("\n") === -1 ) { return [key, `* ${string} `]; } return [ key, "*\n" + string .split("\n") .map((line) => "* " + line) .join("\n") + "\n", ]; } ) ); for (const [i, newCommment] of newComments) { /* @type {AST.Comment} */ const nodeComent = path.node.comments[i]; nodeComent.value = newCommment; } return mainPrint(path.node); }; } return undefined; }, }, }; ================================================ FILE: config/prettier/format-mdx3.js ================================================ /** @import { Plugin } from 'prettier' */ import * as prettier from "prettier"; import markdown from "prettier/plugins/markdown.js"; /** @type {Plugin["languages"]} */ export const languages = [ { name: "MDX", parsers: ["mdx3"], extensions: [".mdx"], }, ]; /** @type {Plugin["parsers"]} */ export const parsers = { mdx3: { ...markdown.parsers.mdx, astFormat: "mdx3", }, }; // matches e.g. "[!code ++]" "[!code highlight:3]" "[!code word:Cache]" or "[!code word:Cache:123]" const codePattern = /\[!code ([a-z+-]+|word:((?:\\.|[^:\]])+))(:\d+)?\]/; // matches repetitions with surrounding and in-between spaces, so e.g. "[!code ++] [!code highlight:3]" const multiCodePattern = new RegExp(`(\\s*${codePattern.source})+\\s*`); const patterns = [ // "", "" new RegExp(``, "g"), // "{/* [!code ++] */", "/* [!code ++] [!code highlight:3] */}" new RegExp(`[{]/[*]${multiCodePattern.source}[*]/[}]`, "g"), // "/* [!code ++] */", "/* [!code ++] [!code highlight:3] */" new RegExp(`/[*]${multiCodePattern.source}[*]/`, "g"), // end-of line comments like "// [!code ++]", "# [!code highlight:3]", "-- [!code word:Cache] [!code --]"" new RegExp(`(//|["'#]|;{1,2}|%{1,2}|--)${multiCodePattern.source}$`, "gm"), ]; const specialCommentPattern = new RegExp( `(${patterns.map((p) => `(${p.source})`).join("|")})`, "gm" ); /** * Applied to code blocks to preserve special comments like `// [!code ...]` on the same line. */ function handleCodeBlockWithSpecialComments(node, path, options) { // Check if this code block has special comments const commentMatches = [...node.value.matchAll(specialCommentPattern)]; // Nothing to do. if (commentMatches.length == 0) return null; /** `true` if comment should be inline, `false` if it should be on a new line. */ const commentsInline = commentMatches.map((commentMatch) => { for ( let index = commentMatch.index - 1, char = node.value[index]; index >= 0 && char !== "\n"; char = node.value[--index] ) { const char = node.value[index]; if (char !== " " && char !== "\t") { return true; } } return false; }); // Use default formatting first const defaultEmbed = markdown.printers.mdast.embed(path, options); return async (textToDoc) => { let stringResult = prettier.doc.printer.printDocToString( await defaultEmbed(textToDoc), options ).formatted; const formattedCommentMatches = [ ...stringResult.matchAll(specialCommentPattern), ]; // Process each comment in reverse order to avoid index shifting for (let i = formattedCommentMatches.length - 1; i >= 0; i--) { const commentMatch = formattedCommentMatches[i]; const shouldBeInline = commentsInline[i]; if (!shouldBeInline) continue; // Find the preceding non-whitespace character, starting from the comment position let insertPos = commentMatch.index - 1; while (insertPos >= 0 && /\s/.test(stringResult[insertPos])) { insertPos--; } stringResult = stringResult.substring(0, insertPos + 1) + stringResult.substring(commentMatch.index); } return stringResult; }; } /** @type {Plugin["printers"]} */ export const printers = { mdx3: { ...markdown.printers.mdast, embed(path, options) { const node = path.node; if (node.type === "code" && node.lang !== null) { const result = handleCodeBlockWithSpecialComments(node, path, options); if (result) return result; } if (node.type === "jsx") { // If the node was parsed incorrectly because it followed the MDX3 format (no spacing around JSX tags), // we will not try to format it as MDX, but instead return the original value. // We detect that by looking at `value` - if it's only a starting or closing tag, it was parsed correctly. const correctlyParsedMatch = node.value.match(/^(<\/?[^>]*>)$/); if (!correctlyParsedMatch) return ( node.value .split("\n") // But we need to restore the original indentation .map((line, idx) => idx === 0 ? line : ( " ".repeat(node.position.indent[idx - 1] - 1) + line ) ) .join("\n") ); } return markdown.printers.mdast.embed(path, options); }, }, }; ================================================ FILE: config/prettier/test.ts ================================================ import * as prettier from "prettier"; const code = ` \`\`\`ts const client = new ApolloClient({ link: new HttpLink({ // [!code ++] uri: "https://example.com/graphql", }), }); \`\`\` `; const result = await prettier.format(code, { parser: "mdx3", plugins: ["./format-mdx3.js"], }); console.log(result); ================================================ FILE: config/processInvariants.ts ================================================ import * as fs from "fs"; import { join as osPathJoin, posix } from "path"; import type { ExpressionKind } from "ast-types/lib/gen/kinds"; import * as recast from "recast"; import type { BuildStepOptions } from "./build.ts"; import { applyRecast, reprint } from "./helpers.ts"; const b = recast.types.builders; const n = recast.types.namedTypes; type Node = recast.types.namedTypes.Node; type CallExpression = recast.types.namedTypes.CallExpression; type NewExpression = recast.types.namedTypes.NewExpression; export async function processInvariants(options: BuildStepOptions) { const program = b.program([]); let nextErrorCode = 1; const allExports = { errorCodes: getExportObject("errorCodes"), devDebug: getExportObject("devDebug"), devLog: getExportObject("devLog"), devWarn: getExportObject("devWarn"), devError: getExportObject("devError"), }; type ExportName = keyof typeof allExports; program.comments = [ b.commentLine( " This file is used by the error message display website and the", true ), b.commentLine(" @apollo/client/includeErrors entry point.", true), b.commentLine(" This file is not meant to be imported manually.", true), ]; if (options.type === "cjs") { program.body.unshift( b.expressionStatement( b.callExpression( b.memberExpression( b.identifier("Object"), b.identifier("defineProperty") ), [ b.identifier("exports"), b.stringLiteral("__esModule"), b.objectExpression([ b.property("init", b.identifier("value"), b.booleanLiteral(true)), ]), ] ) ), b.expressionStatement( Object.keys(allExports).reduce< | recast.types.namedTypes.UnaryExpression | recast.types.namedTypes.AssignmentExpression >( (right, name) => b.assignmentExpression( "=", b.memberExpression(b.identifier("exports"), b.identifier(name)), right ), b.unaryExpression("void", b.numericLiteral(0), true) ) ) ); } await applyRecast({ cwd: options.targetDir, glob: `**/*.${options.jsExt}`, transformStep: transform, }); fs.writeFileSync( osPathJoin(options.targetDir, `invariantErrorCodes.${options.jsExt}`), recast.print(program, { tabWidth: 2, }).code + "\n" ); function getExportObject(exportName: string) { const object = b.objectExpression([]); if (options.type === "esm") { program.body.push( b.exportNamedDeclaration( b.variableDeclaration("const", [ b.variableDeclarator(b.identifier(exportName), object), ]) ) ); } else { program.body.push( b.expressionStatement( b.assignmentExpression( "=", b.memberExpression( b.identifier("exports"), b.identifier(exportName) ), object ) ) ); } return object; } function getErrorCode( file: string, expr: CallExpression | NewExpression, type: keyof typeof allExports ): ExpressionKind { if (isIdWithName(expr.callee, "invariant")) { return extractString( file, allExports[type].properties, expr.arguments[1], expr.arguments[0] ); } else { return extractString( file, allExports[type].properties, expr.arguments[0] ); } function extractString( file: string, target: (typeof allExports)[ExportName]["properties"], message: recast.types.namedTypes.SpreadElement | ExpressionKind, condition?: recast.types.namedTypes.SpreadElement | ExpressionKind ): ExpressionKind { if (message.type === "ConditionalExpression") { return b.conditionalExpression( message.test, extractString(file, target, message.consequent, condition), extractString(file, target, message.alternate, condition) ); } else if (isStringOnly(message)) { const messageText = reprint(message); if (messageText.includes("Apollo DevTools")) { return message; } const obj = b.objectExpression([]); const numLit = b.numericLiteral(nextErrorCode++); target.push(b.property("init", numLit, obj)); obj.properties.push( b.property( "init", b.identifier("file"), b.stringLiteral( options.targetDir.replace(/^dist/, "@apollo/client") + "/" + file ) ) ); if (condition) { obj.properties.push( b.property( "init", b.identifier("condition"), b.stringLiteral(reprint(expr.arguments[0])) ) ); } obj.properties.push( b.property("init", b.identifier("message"), message) ); return numLit; } else { throw new Error(`invariant minification error: node cannot have dynamical error argument! file: ${posix.join(options.targetDir, file)}:${expr.loc?.start.line} code: ${reprint(message)} `); } } } function transform({ ast, relativeSourcePath, }: { ast: recast.types.ASTNode; relativeSourcePath: string; }) { let fileRequiresDevImport = false; if ( relativeSourcePath !== osPathJoin(`utilities`, `invariant`, `index.${options.jsExt}`) ) recast.visit(ast, { visitCallExpression(path) { this.traverse(path); const node = path.node; if (isCallWithLength(node, "invariant", 1)) { const newArgs = [...node.arguments]; newArgs.splice( 1, 1, getErrorCode(relativeSourcePath, node, "errorCodes") ); return b.callExpression.from({ ...node, arguments: newArgs, }); } if (isCallWithLength(node, "newInvariantError", 0)) { const newArgs = [...node.arguments]; newArgs.splice( 0, 1, getErrorCode(relativeSourcePath, node, "errorCodes") ); return b.callExpression.from({ ...node, arguments: newArgs, }); } if ( node.callee.type === "MemberExpression" && isIdWithName(node.callee.object, "invariant") && isIdWithName(node.callee.property, "debug", "log", "warn", "error") ) { let newNode = node; if (node.arguments[0].type !== "Identifier") { const prop = node.callee.property; if (!n.Identifier.check(prop)) throw new Error("unexpected type"); const newArgs = [...node.arguments]; newArgs.splice( 0, 1, getErrorCode( relativeSourcePath, node, ("dev" + capitalize(prop.name)) as ExportName ) ); newNode = b.callExpression.from({ ...node, arguments: newArgs, }); } if ( isDEVLogicalAnd(path.parent.node) || isIdWithName(node.callee.property, "error") ) { return newNode; } fileRequiresDevImport = true; return b.logicalExpression("&&", makeDEVExpr(), newNode); } }, }); if (fileRequiresDevImport) addDevImport(ast, options.type); return { ast }; } function _isIdWithName(node: Node | null | undefined, ...names: string[]) { return ( node && n.Identifier.check(node) && names.some((name) => name === node.name) ); } /** * wrapper around \_isIdWithName that also checks for cjs-transpiled code-patterns: * * ``` * invariant(condition) * ^^^^^^^^^ * in CJS: * (0, index_js_1.invariant)(condition) * ^^^^^^^^^ * or index_js_2.invariant.warn * ^^^^^^^^^ * ``` */ function isIdWithName(node: Node | null | undefined, ...names: string[]) { return ( _isIdWithName(node, ...names) || (n.SequenceExpression.check(node) && n.MemberExpression.check(node.expressions[1]) && _isIdWithName(node.expressions[1].property, ...names)) || (n.MemberExpression.check(node) && _isIdWithName(node.property, ...names)) ); } function isCallWithLength( node: CallExpression | NewExpression, name: string, length: number ) { return isIdWithName(node.callee, name) && node.arguments.length > length; } function isDEVLogicalAnd(node: Node) { return ( n.LogicalExpression.check(node) && node.operator === "&&" && isDEVExpr(node.left) ); } function makeDEVExpr() { return b.identifier("__DEV__"); } function isDEVExpr(node: Node) { return isIdWithName(node, "__DEV__"); } function isStringOnly( node: recast.types.namedTypes.ASTNode ): node is ExpressionKind { switch (node.type) { case "StringLiteral": case "Literal": return true; case "TemplateLiteral": return (node.expressions as recast.types.namedTypes.ASTNode[]).every( isStringOnly ); case "BinaryExpression": return ( node.operator == "+" && isStringOnly(node.left) && isStringOnly(node.right) ); } return false; } function capitalize(str: string) { return str[0].toUpperCase() + str.slice(1); } } function addDevImport(ast: recast.types.ASTNode, type: "esm" | "cjs") { let fileRequiresDevImport = true; // check if a dev import is already present recast.visit(ast, { visitImportDeclaration(path) { const node = path.node; if (node.source.value === "@apollo/client/utilities/environment") { if ( node.specifiers.some( (s) => s.type === "ImportSpecifier" && s.imported.name === "__DEV__" ) ) { fileRequiresDevImport = false; return this.abort(); } } return this.traverse(path); }, visitProgram(path) { const node = path.node; if ( node.body.some( (expr) => expr.type === "VariableDeclaration" && expr.declarations.some( (declaration) => declaration.type === "VariableDeclarator" && ((declaration.id.type === "ObjectPattern" && declaration.id.properties.some( (p) => p.type === "Property" && p.key.type === "Identifier" && p.key.name === "__DEV__" )) || (declaration.id.type === "Identifier" && declaration.id.name === "__DEV__")) ) ) ) { fileRequiresDevImport = false; return this.abort(); } return this.traverse(path); }, }); if (fileRequiresDevImport) { recast.visit(ast, { visitProgram(path) { const node = path.node; if (type === "esm") { node.body.unshift( b.importDeclaration( [b.importSpecifier(b.identifier("__DEV__"))], b.literal("@apollo/client/utilities/environment") ) ); } else { const identifier = b.identifier("__DEV__"); node.body.unshift( b.variableDeclaration("const", [ b.variableDeclarator( b.objectPattern([ b.property.from({ kind: "init", key: identifier, value: identifier, shorthand: true, }), ]), b.callExpression(b.identifier("require"), [ b.literal("@apollo/client/utilities/environment"), ]) ), ]) ); } return false; }, }); } } ================================================ FILE: config/react-compiler.ts ================================================ import { readFileSync } from "node:fs"; import { cp, mkdir } from "node:fs/promises"; import { dirname, format, join, parse, resolve } from "node:path"; import { transformFromAstAsync } from "@babel/core"; import { visit } from "recast"; import { SourceMapConsumer } from "source-map"; import type { BuildStep } from "./build.ts"; import { applyRecast, updatePackageJson } from "./helpers.ts"; export const reactCompiler: BuildStep = async (options) => { if (options.type !== "esm") { return; } const cwd = join(options.targetDir, "react", "hooks-compiled"); await cp(join(options.targetDir, "react", "hooks"), cwd, { recursive: true }); await applyRecast({ glob: `**/*.${options.jsExt}`, cwd, async transformStep({ ast, sourceName, relativeSourcePath }) { const mapPath = join(cwd, relativeSourcePath + ".map"); const rawMap = JSON.parse(readFileSync(mapPath, "utf-8")); let consumer: SourceMapConsumer | null = null; const result = await transformFromAstAsync(ast as any, undefined, { filename: sourceName, sourceFileName: sourceName, sourceMaps: true, code: false, ast: true, cloneInputAst: false, retainLines: true, plugins: [ [ "babel-plugin-react-compiler", { target: "17", // still too many errors to enable panicThreshold on any level // panicThreshold: "critical_errors", // panicThreshold: "all_errors", logger: { logEvent(_, event) { if (event.kind === "CompileError") { const loc = event.detail.primaryLocation?.() || event.detail.loc; let source = `${join(cwd, relativeSourcePath)}${ loc ? `:${loc.start.line}:${loc.start.column}` : "" }`; if (loc) { const { line, column } = loc.start; consumer ||= new SourceMapConsumer(rawMap); const original = consumer.originalPositionFor({ line, column, }); if (original.source) { source += `, original source ${resolve( dirname(join(cwd, relativeSourcePath)), original.source )}:${original.line}:${original.column}`; } } console.error(`\nCompilation failed: ${source}`); console.error(`Reason: ${event.detail.reason}`); if (event.detail.description) { console.error(`Details: ${event.detail.description}`); } if (event.detail.suggestions) { console.error("Suggestions:", event.detail.suggestions); } } }, }, }, ], { visitor: { ImportDeclaration(path) { // Rewrite imports for the React Compiler Runtime to our own copy // until the upstream package is stable if (path.node.source.value === "react-compiler-runtime") { path.node.source.value = "@apollo/client/react/internal/compiler-runtime"; } }, }, }, ], }); return { ast: result.ast!, map: result.map }; }, }); const compilerVersion = ( await import("babel-plugin-react-compiler/package.json", { with: { type: "json" }, }) ).default.version; await applyRecast({ glob: "index.{js,d.ts}", cwd: join(options.targetDir, "react"), transformStep({ ast, sourceName }) { return { targetFileName: sourceName.replace("index.", "index.compiled."), copy: true, ast: visit(ast, { visitExportNamedDeclaration(path) { if (path.node.source) { const source = path.node.source.value.toString(); if (source.startsWith("./hooks/")) { path.node.source.value = source.replace( "./hooks/", "./hooks-compiled/" ); } } this.traverse(path); }, visitVariableDeclarator(path) { if ( path.node.id.type === "Identifier" && path.node.id.name === "reactCompilerVersion" ) { path.node.init = { type: "StringLiteral", value: compilerVersion, }; } this.traverse(path); }, }), }; }, }); await updatePackageJson(options.packageRoot, (pkg) => { pkg.exports["./react/compiled"] = "./react/index.compiled.js"; }); // add `react/compiled/index.js` entry point for `node10` resolution await mkdir(join(options.targetDir, "react", "compiled")); await applyRecast({ glob: "index.{js,d.ts}", cwd: join(options.targetDir, "react"), transformStep({ ast, sourceName }) { const originalFileName = parse(sourceName); const targetFileName = format({ ...originalFileName, dir: join(originalFileName.dir, "compiled"), }); return { targetFileName, copy: true, ast: { type: "File", program: { type: "Program", sourceType: "module", body: [ { type: "ExportAllDeclaration", source: { type: "StringLiteral", value: "../index.compiled.js", }, }, ], }, }, }; }, }); }; ================================================ FILE: config/schema.package.json.ts ================================================ /** * This file was automatically generated by json-schema-to-typescript * based on https://json.schemastore.org/package.json. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export type JSONSchemaForNPMPackageJsonFiles = { [k: string]: unknown; } & { /** * The name of the package. */ name?: string; /** * Version must be parseable by node-semver, which is bundled with npm as a dependency. */ version?: string; /** * This helps people discover your package, as it's listed in 'npm search'. */ description?: string; /** * This helps people discover your package as it's listed in 'npm search'. */ keywords?: string[]; /** * The url to the project homepage. */ homepage?: string; /** * The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package. */ bugs?: | { /** * The url to your project's issue tracker. */ url?: string; /** * The email address to which issues should be reported. */ email?: string; [k: string]: unknown; } | string; /** * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. */ license?: | string | ( | "AGPL-3.0-only" | "Apache-2.0" | "BSD-2-Clause" | "BSD-3-Clause" | "BSL-1.0" | "CC0-1.0" | "CDDL-1.0" | "CDDL-1.1" | "EPL-1.0" | "EPL-2.0" | "GPL-2.0-only" | "GPL-3.0-only" | "ISC" | "LGPL-2.0-only" | "LGPL-2.1-only" | "LGPL-2.1-or-later" | "LGPL-3.0-only" | "LGPL-3.0-or-later" | "MIT" | "MPL-2.0" | "MS-PL" | "UNLICENSED" ); /** * DEPRECATED: Instead, use SPDX expressions, like this: { "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" } see: 'https://docs.npmjs.com/files/package.json#license'. */ licenses?: { type?: License; url?: string; [k: string]: unknown; }[]; author?: Person; /** * A list of people who contributed to this package. */ contributors?: Person[]; /** * A list of people who maintains this package. */ maintainers?: Person[]; /** * The 'files' field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder. */ files?: string[]; /** * The main field is a module ID that is the primary entry point to your program. */ main?: string; /** * The "exports" field is used to restrict external access to non-exported module files, also enables a module to import itself using "name". */ exports?: | (string | null) | { /** * The module path that is resolved when the module specifier matches "name", shadows the "main" field. */ "."?: PackageExportsEntry | PackageExportsFallback; /** * The module path prefix that is resolved when the module specifier starts with "name/", set to "./\*" to allow external modules to import any subpath. * * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "^\./.+". */ [k: string]: PackageExportsEntry | PackageExportsFallback; } | PackageExportsEntryObject1 | PackageExportsFallback1; /** * The "imports" field is used to create private mappings that only apply to import specifiers from within the package itself. */ imports?: { /** * The module path that is resolved when this environment matches the property name. * * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "^#.+$". */ [k: string]: PackageImportsEntry | PackageImportsFallback; }; bin?: | string | { [k: string]: string; }; /** * When set to "module", the type field allows a package to specify all .js files within are ES modules. If the "type" field is omitted or set to "commonjs", all .js files are treated as CommonJS. */ type?: "commonjs" | "module"; /** * Set the types property to point to your bundled declaration file. */ types?: string; /** * Note that the "typings" field is synonymous with "types", and could be used as well. */ typings?: string; /** * The "typesVersions" field is used since TypeScript 3.1 to support features that were only made available in newer TypeScript versions. */ typesVersions?: { /** * Contains overrides for the TypeScript version that matches the version range matching the property key. */ [k: string]: { /** * Maps all file paths to the file paths specified in the array. */ "*"?: string[]; }; }; /** * Specify either a single file or an array of filenames to put in place for the man program to find. */ man?: string[] | string; directories?: { /** * If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash. */ bin?: string; /** * Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday. */ doc?: string; /** * Put example scripts in here. Someday, it might be exposed in some clever way. */ example?: string; /** * Tell people where the bulk of your library is. Nothing special is done with the lib folder in any way, but it's useful meta info. */ lib?: string; /** * A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder. */ man?: string; test?: string; [k: string]: unknown; }; /** * Specify the place where your code lives. This is helpful for people who want to contribute. */ repository?: | { type?: string; url?: string; directory?: string; [k: string]: unknown; } | string; funding?: | FundingUrl | FundingWay | [FundingUrl | FundingWay, ...(FundingUrl | FundingWay)[]]; /** * The 'scripts' member is an object hash of script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. */ scripts?: { /** * Run code quality tools, e.g. ESLint, TSLint, etc. */ lint?: string; /** * Run BEFORE the package is published (Also run on local npm install without any arguments). */ prepublish?: string; /** * Run both BEFORE the package is packed and published, and on local npm install without any arguments. This is run AFTER prepublish, but BEFORE prepublishOnly. */ prepare?: string; /** * Run BEFORE the package is prepared and packed, ONLY on npm publish. */ prepublishOnly?: string; /** * run BEFORE a tarball is packed (on npm pack, npm publish, and when installing git dependencies). */ prepack?: string; /** * Run AFTER the tarball has been generated and moved to its final destination. */ postpack?: string; /** * Publishes a package to the registry so that it can be installed by name. See https://docs.npmjs.com/cli/v8/commands/npm-publish */ publish?: string; postpublish?: ScriptsPublishAfter; /** * Run BEFORE the package is installed. */ preinstall?: string; install?: ScriptsInstallAfter; postinstall?: ScriptsInstallAfter; preuninstall?: ScriptsUninstallBefore; uninstall?: ScriptsUninstallBefore; /** * Run AFTER the package is uninstalled. */ postuninstall?: string; preversion?: ScriptsVersionBefore; version?: ScriptsVersionBefore; /** * Run AFTER bump the package version. */ postversion?: string; pretest?: ScriptsTest; test?: ScriptsTest; posttest?: ScriptsTest; prestop?: ScriptsStop; stop?: ScriptsStop; poststop?: ScriptsStop; prestart?: ScriptsStart; start?: ScriptsStart; poststart?: ScriptsStart; prerestart?: ScriptsRestart; restart?: ScriptsRestart; postrestart?: ScriptsRestart; /** * Start dev server to serve application files */ serve?: string; [k: string]: string | undefined; }; /** * A 'config' hash can be used to set configuration parameters used in package scripts that persist across upgrades. */ config?: { [k: string]: unknown; }; dependencies?: Dependency; devDependencies?: Dependency; optionalDependencies?: Dependency; peerDependencies?: Dependency; peerDependenciesMeta?: PeerDependencyMeta; /** * Array of package names that will be bundled when publishing the package. */ bundleDependencies?: string[] | boolean; /** * DEPRECATED: This field is honored, but "bundleDependencies" is the correct field name. */ bundledDependencies?: string[] | boolean; /** * Resolutions is used to support selective version resolutions using yarn, which lets you define custom package versions or ranges inside your dependencies. For npm, use overrides instead. See: https://classic.yarnpkg.com/en/docs/selective-version-resolutions */ resolutions?: { [k: string]: unknown; }; /** * Overrides is used to support selective version overrides using npm, which lets you define custom package versions or ranges inside your dependencies. For yarn, use resolutions instead. See: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides */ overrides?: { [k: string]: unknown; }; /** * Defines which package manager is expected to be used when working on the current project. This field is currently experimental and needs to be opted-in; see https://nodejs.org/api/corepack.html */ packageManager?: string; engines?: { node?: string; [k: string]: string; }; /** * Defines which tools and versions are expected to be used when Volta is installed. */ volta?: { /** * The value of that entry should be a path to another JSON file which also has a "volta" section */ extends?: string; /** * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "(node|npm|pnpm|yarn)". */ [k: string]: string; }; engineStrict?: boolean; /** * Specify which operating systems your module will run on. */ os?: string[]; /** * Specify that your code only runs on certain cpu architectures. */ cpu?: string[]; /** * DEPRECATED: This option used to trigger an npm warning, but it will no longer warn. It is purely there for informational purposes. It is now recommended that you install any binaries as local devDependencies wherever possible. */ preferGlobal?: boolean; /** * If set to true, then npm will refuse to publish it. */ private?: boolean | ("false" | "true"); publishConfig?: { access?: "public" | "restricted"; tag?: string; registry?: string; provenance?: boolean; [k: string]: unknown; }; dist?: { shasum?: string; tarball?: string; [k: string]: unknown; }; readme?: string; /** * An ECMAScript module ID that is the primary entry point to your program. */ module?: string; /** * A module ID with untranspiled code that is the primary entry point to your program. */ esnext?: | string | { main?: string; browser?: string; [k: string]: string; }; /** * Allows packages within a directory to depend on one another using direct linking of local files. Additionally, dependencies within a workspace are hoisted to the workspace root when possible to reduce duplication. Note: It's also a good idea to set "private" to true when using this feature. */ workspaces?: | string[] | { /** * Workspace package paths. Glob patterns are supported. */ packages?: string[]; /** * Packages to block from hoisting to the workspace root. Currently only supported in Yarn only. */ nohoist?: string[]; [k: string]: unknown; }; jspm?: JSONSchemaForNPMPackageJsonFiles; eslintConfig?: JSONSchemaForESLintConfigurationFiles; prettier?: SchemaForPrettierrc; stylelint?: JSONSchemaForTheStylelintConfigurationFiles; ava?: AVAConfigSchema; release?: SemanticReleaseSchema; jscpd?: HttpsJsonSchemastoreOrgJscpdJson; /** * Defines pnpm specific configuration. */ pnpm?: { /** * Used to override any dependency in the dependency graph. */ overrides?: { [k: string]: unknown; }; /** * Used to extend the existing package definitions with additional information. */ packageExtensions?: { /** * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "^.+$". */ [k: string]: { dependencies?: Dependency; optionalDependencies?: Dependency; peerDependencies?: Dependency; peerDependenciesMeta?: PeerDependencyMeta; }; }; peerDependencyRules?: { /** * pnpm will not print warnings about missing peer dependencies from this list. */ ignoreMissing?: string[]; /** * Unmet peer dependency warnings will not be printed for peer dependencies of the specified range. */ allowedVersions?: { [k: string]: unknown; }; /** * Any peer dependency matching the pattern will be resolved from any version, regardless of the range specified in "peerDependencies". */ allowAny?: string[]; }; /** * A list of dependencies to skip the builds. */ neverBuiltDependencies?: string[]; /** * A list of dependencies to skip the builds. */ onlyBuiltDependencies?: string[]; /** * Specifies a JSON file that lists the only packages permitted to run installation scripts during the pnpm install process. */ onlyBuiltDependenciesFile?: string; /** * A list of deprecated versions that the warnings are suppressed. */ allowedDeprecatedVersions?: { [k: string]: unknown; }; /** * A list of dependencies that are patched. */ patchedDependencies?: { [k: string]: unknown; }; /** * When true, installation won't fail if some of the patches from the "patchedDependencies" field were not applied. */ allowNonAppliedPatches?: boolean; updateConfig?: { /** * A list of packages that should be ignored when running "pnpm outdated" or "pnpm update --latest". */ ignoreDependencies?: string[]; }; auditConfig?: { /** * A list of CVE IDs that will be ignored by "pnpm audit". */ ignoreCves?: string[]; /** * A list of GHSA Codes that will be ignored by "pnpm audit". */ ignoreGhsas?: string[]; }; /** * A list of scripts that must exist in each project. */ requiredScripts?: string[]; /** * Specifies architectures for which you'd like to install optional dependencies, even if they don't match the architecture of the system running the install. */ supportedArchitectures?: { os?: string[]; cpu?: string[]; libc?: string[]; }; /** * A list of optional dependencies that the install should be skipped. */ ignoredOptionalDependencies?: string[]; executionEnv?: { /** * Specifies which exact Node.js version should be used for the project's runtime. */ nodeVersion?: string; }; }; /** * Any property starting with \_ is valid. * * This interface was referenced by `undefined`'s JSON-Schema definition * via the `patternProperty` "^\_". */ [k: string]: any; }; export type License = | string | ( | "AGPL-3.0-only" | "Apache-2.0" | "BSD-2-Clause" | "BSD-3-Clause" | "BSL-1.0" | "CC0-1.0" | "CDDL-1.0" | "CDDL-1.1" | "EPL-1.0" | "EPL-2.0" | "GPL-2.0-only" | "GPL-3.0-only" | "ISC" | "LGPL-2.0-only" | "LGPL-2.1-only" | "LGPL-2.1-or-later" | "LGPL-3.0-only" | "LGPL-3.0-or-later" | "MIT" | "MPL-2.0" | "MS-PL" | "UNLICENSED" ); /** * A person who has been involved in creating or maintaining this package. */ export type Person = { name: string; url?: string; email?: string; [k: string]: unknown; } & Person1; export type Person1 = | { name: string; url?: string; email?: string; [k: string]: unknown; } | string; export type PackageExportsEntry = | PackageExportsEntryPath | PackageExportsEntryObject; /** * The module path that is resolved when this specifier is imported. Set to `null` to disallow importing this module. */ export type PackageExportsEntryPath = string | null; /** * Used to allow fallbacks in case this environment doesn't support the preceding entries. */ export type PackageExportsFallback = PackageExportsEntry[]; /** * Used to allow fallbacks in case this environment doesn't support the preceding entries. */ export type PackageExportsFallback1 = PackageExportsEntry[]; export type PackageImportsEntry = | PackageImportsEntryPath | PackageImportsEntryObject; /** * The module path that is resolved when this specifier is imported. Set to `null` to disallow importing this module. */ export type PackageImportsEntryPath = string | null; /** * Used to allow fallbacks in case this environment doesn't support the preceding entries. */ export type PackageImportsFallback = PackageImportsEntry[]; /** * URL to a website with details about how to fund the package. */ export type FundingUrl = string; /** * Run AFTER the package is published. */ export type ScriptsPublishAfter = string; /** * Run AFTER the package is installed. */ export type ScriptsInstallAfter = string; /** * Run BEFORE the package is uninstalled. */ export type ScriptsUninstallBefore = string; /** * Run BEFORE bump the package version. */ export type ScriptsVersionBefore = string; /** * Run by the 'npm test' command. */ export type ScriptsTest = string; /** * Run by the 'npm stop' command. */ export type ScriptsStop = string; /** * Run by the 'npm start' command. */ export type ScriptsStart = string; /** * Run by the 'npm restart' command. Note: 'npm restart' will run the stop and start scripts if no restart script is provided. */ export type ScriptsRestart = string; /** * ESLint supports the use of third-party plugins. Before using the plugin, you have to install it using npm. */ export type Plugins = string[]; /** * ESLint comes with a large number of rules. You can modify which rules your project uses either using configuration comments or configuration files. */ export type Rules = PossibleErrors & BestPractices & StrictMode & Variables & NodeAndCommonJs & StylisticIssues & EcmaScript6 & Legacy & HttpsJsonSchemastoreOrgPartialEslintPluginsJson; /** * Allows to override configuration for files and folders, specified by glob patterns */ export type Overrides = { /** * Glob pattern for files to apply 'overrides' configuration, relative to the directory of the config file */ files: string | [string, ...string[]]; /** * If you want to extend a specific configuration file, you can use the extends property and specify the path to the file. The path can be either relative or absolute. */ extends?: string | string[]; /** * If a file matches any of the 'excludedFiles' glob patterns, the 'overrides' configuration won't apply */ excludedFiles?: string | string[]; ecmaFeatures?: EcmaFeatures; env?: Env; globals?: Globals; parser?: string; parserOptions?: ParserOptions; plugins?: Plugins; /** * To specify a processor, specify the plugin name and processor name joined by a forward slash */ processor?: string; rules?: Rules; settings?: Settings; overrides?: Overrides; }[]; export type SchemaForPrettierrc = | (OptionsDefinition & OverridesDefinition) | string; /** * Your configuration can extend an existing configuration(s) (whether your own or a third-party config) */ export type SimpleStringOrArrayStringRule = (string | SimpleArrayStringRule) & ( | ((string | SimpleArrayStringRule) & string) | ((string | SimpleArrayStringRule) & unknown[]) ); export type SimpleArrayStringRule = string[]; /** * Plugins are rules or sets of rules built by the community that support methodologies, toolsets, non-standard CSS features, or very specific use cases */ export type SimpleArrayStringRule1 = string[]; export type AllRules = AtRule & Block & Color & Comment & CustomMedia & CustomProperty & Declaration & DeclarationBlock & Font & Function & GeneralSheet & KeyframeDeclaration & Length & Lightness & MediaFeature & MediaQuery & MediaQueryList & Number & Property & RootRule & Rule & Selector & SelectorList & ShorthandProperty & String & StylelintDisableComment & Time & Unit & Value & ValueList; /** * Specify a blacklist of disallowed at-rules */ export type ArrayStringRule = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Specify lowercase or uppercase for at-rules names */ export type LowerUpperRule = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a newline after at-rule names */ export type AlwaysMultiLineRule = ( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow vendor prefixes for at-rules */ export type BooleanRule = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a whitelist of allowed at-rules */ export type ArrayStringRule1 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the closing brace of blocks */ export type NewlineSpaceWithIgnoreRule = ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the closing brace of blocks */ export type NewlineRule = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the closing brace of blocks */ export type NewlineSpaceRule = ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the closing brace of blocks */ export type NewlineSpaceRule1 = ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Disallow empty blocks */ export type BooleanRule1 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow single-line blocks */ export type BooleanRule2 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a newline after the opening brace of blocks */ export type NewlineRule1 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the opening brace of blocks */ export type NewlineSpaceRule2 = ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the opening brace of blocks */ export type NewlineSpaceWithIgnoreRule1 = ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | [] ) | [ ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Specify lowercase or uppercase for hex colors */ export type LowerUpperRule1 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow hex colors */ export type BooleanRule3 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow invalid hex colors */ export type BooleanRule4 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow empty comments */ export type BooleanRule5 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require or disallow whitespace on the inside of comment markers */ export type AlwaysNeverRule = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a blacklist of disallowed words within comments */ export type ArrayStringRule2 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Specify a pattern for custom media query names */ export type StringRule = ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & ( | (null & ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] )) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & string) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & unknown[]) ); /** * Disallow custom properties outside of `:root` rules */ export type BooleanRule6 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a pattern for custom properties */ export type StringRule1 = ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & ( | (null & ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] )) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & string) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the bang of declarations */ export type AlwaysNeverRule1 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the bang of declarations */ export type AlwaysNeverRule2 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the colon of declarations */ export type AlwaysMultiLineRule1 = ( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | []) | [ (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ) & (("always" | "always-multi-line" | {}) | CoreRule) & ( | ((("always" | "always-multi-line" | {}) | CoreRule) & string) | (("always" | "always-multi-line" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the colon of declarations */ export type AlwaysNeverRule3 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow `!important` within declarations */ export type BooleanRule7 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); export type SimpleStringOrArrayStringRule1 = (string | SimpleArrayStringRule) & ( | ((string | SimpleArrayStringRule) & string) | ((string | SimpleArrayStringRule) & unknown[]) ); /** * Disallow property values that are ignored due to another property value in the same rule */ export type BooleanRule8 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow shorthand properties that override related longhand properties */ export type BooleanRule9 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the semicolons of declaration blocks */ export type NewlineRule2 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the semicolons of declaration blocks */ export type NewlineRule3 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the semicolons of declaration blocks */ export type SpaceRule = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the semicolons of declaration blocks */ export type SpaceRule1 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Limit the number of declaration within a single line declaration block */ export type IntegerRule = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Require or disallow a trailing semicolon within declaration blocks */ export type AlwaysNeverRule4 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a blacklist of disallowed functions */ export type ArrayStringRule3 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Disallow an unspaced operator within `calc` functions */ export type BooleanRule10 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the commas of functions */ export type NewlineRule4 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the commas of functions */ export type NewlineRule5 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the commas of functions */ export type SpaceRule2 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the commas of functions */ export type SpaceRule3 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Disallow direction values in `linear-gradient()` calls that are not valid according to the standard syntax */ export type BooleanRule11 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Limit the number of adjacent empty lines within functions */ export type IntegerRule1 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace on the inside of the parentheses of functions */ export type NewlineRule6 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace on the inside of the parentheses of functions */ export type SpaceRule4 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require or disallow data URIs for urls */ export type AlwaysNeverRule5 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow scheme-relative urls */ export type BooleanRule12 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require or disallow quotes for urls */ export type AlwaysNeverRule6 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a whitelist of allowed url schemes */ export type ArrayStringRule4 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Specify a whitelist of allowed functions */ export type ArrayStringRule5 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Require or disallow whitespace after functions */ export type AlwaysNeverRule7 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Limit the number of adjacent empty lines */ export type IntegerRule2 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Disallow selectors of lower specificity from coming after overriding selectors of higher specificity */ export type BooleanRule13 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow duplicate selectors within a stylesheet */ export type BooleanRule14 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow empty sources */ export type BooleanRule15 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow extra semicolons */ export type BooleanRule16 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow double-slash comments `(//...)` which are not supported by CSS and could lead to unexpected results */ export type BooleanRule17 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow missing end-of-source newlines */ export type BooleanRule18 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow animation names that do not correspond to a `@keyframes` declaration */ export type BooleanRule19 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require or disallow Unicode BOM */ export type AlwaysNeverRule8 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow !important within keyframe declarations */ export type BooleanRule20 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow units for zero lengths */ export type BooleanRule21 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the colon in media features */ export type AlwaysNeverRule9 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the colon in media features */ export type AlwaysNeverRule10 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify lowercase or uppercase for media feature names */ export type LowerUpperRule2 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow vendor prefixes for media feature names */ export type BooleanRule22 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow missing punctuation for non-boolean media features */ export type BooleanRule23 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace on the inside of the parentheses within media features */ export type AlwaysNeverRule11 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the range operator in media features */ export type AlwaysNeverRule12 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the range operator in media features */ export type AlwaysNeverRule13 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the commas of media query lists */ export type NewlineRule7 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the commas of media query lists */ export type NewlineRule8 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the commas of media query lists */ export type SpaceRule5 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the commas of media query lists */ export type SpaceRule6 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require or disallow a leading zero for fractional numbers less than 1 */ export type AlwaysNeverRule14 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Limit the number of decimal places allowed in numbers */ export type IntegerRule3 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Disallow trailing zeros in numbers */ export type BooleanRule24 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a blacklist of disallowed properties */ export type ArrayStringRule6 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Specify lowercase or uppercase for properties */ export type LowerUpperRule3 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow vendor prefixes for properties */ export type BooleanRule25 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a whitelist of allowed properties */ export type ArrayStringRule7 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Disallow standard properties inside `:root` rules */ export type BooleanRule26 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace on the inside of the brackets within attribute selector */ export type AlwaysNeverRule15 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a blacklist of disallowed attribute operators */ export type ArrayStringRule8 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after operators within attribute selectors */ export type AlwaysNeverRule16 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before operators within attribute selectors */ export type AlwaysNeverRule17 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a whitelist of allowed attribute operators */ export type ArrayStringRule9 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Require or disallow quotes for attribute values */ export type AlwaysNeverRule18 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the combinators of selectors */ export type AlwaysNeverRule19 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the combinators of selectors */ export type AlwaysNeverRule20 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow non-space characters for descendant combinators of selectors */ export type BooleanRule27 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a pattern for id selectors */ export type StringRule2 = ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & ( | (null & ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] )) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & string) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & unknown[]) ); /** * Limit the number of compound selectors in a selector */ export type IntegerRule4 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Limit the specificity of selectors */ export type StringRule3 = ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & ( | (null & ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] )) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & string) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & unknown[]) ); /** * Specify a pattern for the selectors of rules nested within rules */ export type StringRule4 = ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & ( | (null & ( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] )) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & string) | (( | (null | string) | [ (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)) & (string | CoreRule) & (((string | CoreRule) & string) | (string | CoreRule)), ] ) & unknown[]) ); /** * Disallow attribute selectors */ export type BooleanRule28 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow combinators in selectors */ export type BooleanRule29 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow id selectors */ export type BooleanRule30 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow the universal selector */ export type BooleanRule31 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow vendor prefixes for selectors */ export type BooleanRule32 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify lowercase or uppercase for pseudo-class selectors */ export type LowerUpperRule4 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors */ export type AlwaysNeverRule21 = ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] )) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & string) | (( | null | ("always" | "never" | []) | [ (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ) & (("always" | "never" | {}) | CoreRule) & ( | ((("always" | "never" | {}) | CoreRule) & string) | (("always" | "never" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a whitelist of allowed pseudo-class selectors */ export type ArrayStringRule10 = ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & ( | (null & ( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] )) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & string) | (( | (null | string) | [ (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ), ...((([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ) & (([] | {}) | SimpleArrayStringRule | CoreRule) & ( | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) | (([] | {}) | SimpleArrayStringRule | CoreRule) ))[], ] ) & unknown[]) ); /** * Specify lowercase or uppercase for pseudo-element selectors */ export type LowerUpperRule5 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify single or double colon notation for applicable pseudo-elements */ export type SingleDoubleRule = ( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] )) | (( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & string) | (( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow the composition of :root in selectors */ export type BooleanRule33 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify lowercase or uppercase for type selectors */ export type LowerUpperRule6 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Limit the number of adjacent empty lines within selectors */ export type IntegerRule5 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the commas of selector lists */ export type NewlineRule9 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the commas of selector lists */ export type NewlineRule10 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the commas of selector lists */ export type SpaceRule7 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the commas of selector lists */ export type SpaceRule8 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Disallow redundant values in shorthand properties */ export type BooleanRule34 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Disallow (unescaped) newlines in strings */ export type BooleanRule35 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify single or double quotes around strings */ export type SingleDoubleRule1 = ( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] )) | (( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & string) | (( | null | ("single" | "double" | []) | [ (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ) & (("single" | "double" | {}) | CoreRule) & ( | ((("single" | "double" | {}) | CoreRule) & string) | (("single" | "double" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Disallow `animation` and `transition` less than or equal to 100ms */ export type BooleanRule36 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Specify a blacklist of disallowed units */ export type UnitRule = ( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & ( | (null & ( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] )) | (( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & string) | (( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & unknown[]) ); /** * Specify lowercase or uppercase for units */ export type LowerUpperRule7 = ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & ( | (null & ( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] )) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & string) | (( | null | ("lower" | "upper" | []) | [ (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ) & (("lower" | "upper" | {}) | CoreRule) & ( | ((("lower" | "upper" | {}) | CoreRule) & string) | (("lower" | "upper" | {}) | CoreRule) ), ] ) & unknown[]) ); /** * Specify a whitelist of allowed units */ export type UnitRule1 = ( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & ( | (null & ( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] )) | (( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & string) | (( | null | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] ) | [ ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ), ...(( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ) & ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & ( | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & string) | (( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) & unknown[]) | ( | ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" | [] | {} ) | [ ( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" ), ...( | "em" | "ex" | "px" | "%" | "rem" | "vw" | "vh" | "vm" | "vmin" | "vmax" | "ch" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "deg" | "grad" | "rad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "dpi" | "dpcm" | "dppx" | "fr" )[], ] | CoreRule ) ))[], ] ) & unknown[]) ); /** * Disallow vendor prefixes for values */ export type BooleanRule37 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace after the commas of value lists */ export type NewlineRule11 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a newline or disallow whitespace before the commas of value lists */ export type NewlineRule12 = ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & ( | (null & ( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "always-multi-line" | "never-multi-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "always-multi-line" | "never-multi-line" | []) | [ ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ) & ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & ( | (( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) & string) | ( | ("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace after the commas of value lists */ export type SpaceRule9 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Require a single space or disallow whitespace before the commas of value lists */ export type SpaceRule10 = ( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ("always" | "never" | "always-single-line" | "never-single-line" | {}) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & ( | (null & ( | null | ( | "always" | "never" | "always-single-line" | "never-single-line" | [] ) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] )) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & string) | (( | null | ("always" | "never" | "always-single-line" | "never-single-line" | []) | [ ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ) & ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & ( | (( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) & string) | ( | ( | "always" | "never" | "always-single-line" | "never-single-line" | {} ) | CoreRule ) ), ] ) & unknown[]) ); /** * Limit the number of adjacent empty lines within value lists */ export type IntegerRule6 = ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & ( | (null & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (number & ( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] )) | (( | (null | number) | [ ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)) & ({} | CoreRule) & ((({} | CoreRule) & number) | ({} | CoreRule)), ] ) & unknown[]) ); /** * Provide a glob or array of globs to ignore specific files */ export type SimpleStringOrArrayStringRule2 = (string | SimpleArrayStringRule) & ( | ((string | SimpleArrayStringRule) & string) | ((string | SimpleArrayStringRule) & unknown[]) ); /** * Report stylelint-disable comments without a description. */ export type BooleanRule38 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Report stylelint-disable comments that don't match rules that are specified in the configuration object. */ export type BooleanRule39 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * Report stylelint-disable comments that don't actually match any lints that need to be disabled */ export type BooleanRule40 = ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & ( | (null & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (boolean & ( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] )) | (( | null | boolean | [ (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & (boolean | CoreRule) & (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), ] ) & unknown[]) ); /** * An array of glob patterns to select test files. Files with an underscore prefix are ignored. By default only selects files with `cjs`, `mjs` & `js` extensions, even if the pattern matches other files. Specify `extensions` to allow other file extensions */ export type ArrayOfPaths = string[]; /** * An array of glob patterns to match files that, even if changed, are ignored by the watcher */ export type ArrayOfPaths1 = string[]; /** * Not typically useful in the `package.json` configuration, but equivalent to specifying `--match` on the CLI */ export type ArrayOfPaths2 = string[]; export type ArrayOfStrings = string[]; /** * Extra modules to require before tests are run. Modules are required in the worker processes */ export type ArrayOfPaths3 = string[]; /** * Configure Node.js arguments used to launch worker processes */ export type ArrayOfStrings1 = string[]; /** * You can configure AVA to recognize additional file extensions as TypeScript (e.g., `["ts", "tsx"]` to add partial JSX support). Note that the preserve mode for JSX is not (yet) supported. See also AVA's `extensions` object */ export type ArrayOfPaths4 = string[]; /** * Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. */ export interface PackageExportsEntryObject { /** * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. */ require?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. */ import?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this environment is Node.js. */ node?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when no other export type matches. */ default?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. */ types?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this environment matches the property name. * * This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition * via the `patternProperty` "^[^.0-9]+$". * * This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition * via the `patternProperty` "^[^.0-9]+$". */ [k: string]: PackageExportsEntry | PackageExportsFallback; } /** * The module path that is resolved when the module specifier matches "name", shadows the "main" field. */ export interface PackageExportsEntryObject1 { /** * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. */ require?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. */ import?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this environment is Node.js. */ node?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when no other export type matches. */ default?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. */ types?: PackageExportsEntry | PackageExportsFallback; /** * The module path that is resolved when this environment matches the property name. * * This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition * via the `patternProperty` "^[^.0-9]+$". * * This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition * via the `patternProperty` "^[^.0-9]+$". */ [k: string]: PackageExportsEntry | PackageExportsFallback; } /** * Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. */ export interface PackageImportsEntryObject { /** * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. */ require?: PackageImportsEntry | PackageImportsFallback; /** * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. */ import?: PackageImportsEntry | PackageImportsFallback; /** * The module path that is resolved when this environment is Node.js. */ node?: PackageImportsEntry | PackageImportsFallback; /** * The module path that is resolved when no other export type matches. */ default?: PackageImportsEntry | PackageImportsFallback; /** * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. */ types?: PackageImportsEntry | PackageImportsFallback; /** * The module path that is resolved when this environment matches the property name. * * This interface was referenced by `PackageImportsEntryObject`'s JSON-Schema definition * via the `patternProperty` "^[^.0-9]+$". */ [k: string]: PackageImportsEntry | PackageImportsFallback; } /** * Used to inform about ways to help fund development of the package. */ export interface FundingWay { url: FundingUrl; /** * The type of funding or the platform through which funding can be provided, e.g. patreon, opencollective, tidelift or github. */ type?: string; } /** * Dependencies are specified with a simple hash of package name to version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL. */ export interface Dependency { [k: string]: string; } /** * When a user installs your package, warnings are emitted if packages specified in "peerDependencies" are not already installed. The "peerDependenciesMeta" field serves to provide more information on how your peer dependencies are utilized. Most commonly, it allows peer dependencies to be marked as optional. Metadata for this field is specified with a simple hash of the package name to a metadata object. */ export interface PeerDependencyMeta { [k: string]: { /** * Specifies that this peer dependency is optional and should not be installed automatically. */ optional?: boolean; [k: string]: unknown; }; } export interface JSONSchemaForESLintConfigurationFiles { ecmaFeatures?: EcmaFeatures; env?: Env; /** * If you want to extend a specific configuration file, you can use the extends property and specify the path to the file. The path can be either relative or absolute. */ extends?: string | string[]; globals?: Globals; /** * Prevent comments from changing config or rules */ noInlineConfig?: boolean; /** * Report unused eslint-disable comments */ reportUnusedDisableDirectives?: boolean; parser?: string; parserOptions?: ParserOptions; plugins?: Plugins; /** * By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, set this to `true` in a configuration in the root of your project. */ root?: boolean; /** * Tell ESLint to ignore specific files and directories. Each value uses the same pattern as the `.eslintignore` file. */ ignorePatterns?: string | string[]; rules?: Rules; settings?: Settings; overrides?: Overrides; [k: string]: unknown; } /** * By default, ESLint supports only ECMAScript 5 syntax. You can override that setting to enable support for ECMAScript 6 as well as JSX by using configuration settings. */ export interface EcmaFeatures { arrowFunctions?: boolean; binaryLiterals?: boolean; blockBindings?: boolean; classes?: boolean; defaultParams?: boolean; destructuring?: boolean; /** * Enables support for the experimental object rest/spread properties (IMPORTANT: This is an experimental feature that may change significantly in the future. It's recommended that you do not write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.) */ experimentalObjectRestSpread?: boolean; forOf?: boolean; generators?: boolean; /** * allow return statements in the global scope */ globalReturn?: boolean; /** * enable global strict mode (if ecmaVersion is 5 or greater) */ impliedStrict?: boolean; /** * enable JSX */ jsx?: boolean; modules?: boolean; objectLiteralComputedProperties?: boolean; objectLiteralDuplicateProperties?: boolean; objectLiteralShorthandMethods?: boolean; objectLiteralShorthandProperties?: boolean; octalLiterals?: boolean; regexUFlag?: boolean; regexYFlag?: boolean; restParams?: boolean; spread?: boolean; superInFunctions?: boolean; templateStrings?: boolean; unicodeCodePointEscapes?: boolean; [k: string]: unknown; } /** * An environment defines global variables that are predefined. */ export interface Env { /** * defines require() and define() as global variables as per the amd spec */ amd?: boolean; /** * AppleScript global variables */ applescript?: boolean; /** * Atom test helper globals */ atomtest?: boolean; /** * browser global variables */ browser?: boolean; /** * CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack) */ commonjs?: boolean; /** * Globals common to both Node and Browser */ "shared-node-browser"?: boolean; /** * Ember test helper globals */ embertest?: boolean; /** * enable all ECMAScript 6 features except for modules */ es6?: boolean; /** * GreaseMonkey globals */ greasemonkey?: boolean; /** * adds all of the Jasmine testing global variables for version 1.3 and 2.0 */ jasmine?: boolean; /** * Jest global variables */ jest?: boolean; /** * jQuery global variables */ jquery?: boolean; /** * Meteor global variables */ meteor?: boolean; /** * adds all of the Mocha test global variables */ mocha?: boolean; /** * MongoDB global variables */ mongo?: boolean; /** * Java 8 Nashorn global variables */ nashorn?: boolean; /** * Node.js global variables and Node.js scoping */ node?: boolean; /** * PhantomJS global variables */ phantomjs?: boolean; /** * Prototype.js global variables */ prototypejs?: boolean; /** * Protractor global variables */ protractor?: boolean; /** * QUnit global variables */ qunit?: boolean; /** * Service Worker global variables */ serviceworker?: boolean; /** * ShellJS global variables */ shelljs?: boolean; /** * WebExtensions globals */ webextensions?: boolean; /** * web workers global variables */ worker?: boolean; [k: string]: unknown; } /** * Set each global variable name equal to true to allow the variable to be overwritten or false to disallow overwriting. */ export interface Globals { [k: string]: ("readonly" | "writable" | "off") | boolean; } /** * The JavaScript language options to be supported */ export interface ParserOptions { ecmaFeatures?: EcmaFeatures; /** * Set to 3, 5 (default), 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15 to specify the version of ECMAScript syntax you want to use. You can also set it to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14), or 2024 (same as 15) to use the year-based naming. You can also set "latest" to use the most recently supported version. */ ecmaVersion?: | 3 | 5 | 6 | 2015 | 7 | 2016 | 8 | 2017 | 9 | 2018 | 10 | 2019 | 11 | 2020 | 12 | 2021 | 13 | 2022 | 14 | 2023 | 15 | 2024 | "latest"; /** * set to "script" (default), "commonjs", or "module" if your code is in ECMAScript modules */ sourceType?: "script" | "module" | "commonjs"; [k: string]: unknown; } export interface PossibleErrors { /** * Require or disallow trailing commas */ "comma-dangle"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce "for" loop update clause moving the counter in the right direction */ "for-direction"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce return statements in getters */ "getter-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow await inside of loops */ "no-await-in-loop"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow comparing against -0 */ "no-compare-neg-zero"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow assignment operators in conditional expressions */ "no-cond-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of console */ "no-console"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow constant expressions in conditions */ "no-constant-condition"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow control characters in regular expressions */ "no-control-regex"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of debugger */ "no-debugger"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow duplicate arguments in function definitions */ "no-dupe-args"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow duplicate keys in object literals */ "no-dupe-keys"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow duplicate case labels */ "no-duplicate-case"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow empty block statements */ "no-empty"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow empty character classes in regular expressions */ "no-empty-character-class"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow reassigning exceptions in catch clauses */ "no-ex-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary boolean casts */ "no-extra-boolean-cast"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary parentheses */ "no-extra-parens"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary semicolons */ "no-extra-semi"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow reassigning function declarations */ "no-func-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow function or var declarations in nested blocks */ "no-inner-declarations"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow invalid regular expression strings in RegExp constructors */ "no-invalid-regexp"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow irregular whitespace outside of strings and comments */ "no-irregular-whitespace"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow negating the left operand in in expressions (deprecated) */ "no-negated-in-lhs"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow calling global object properties as functions */ "no-obj-calls"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow calling some Object.prototype methods directly on objects */ "no-prototype-builtins"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow multiple spaces in regular expressions */ "no-regex-spaces"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow sparse arrays */ "no-sparse-arrays"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow template literal placeholder syntax in regular strings */ "no-template-curly-in-string"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Disallow confusing multiline expressions */ "no-unexpected-multiline"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unreachable code after return, throw, continue, and break statements */ "no-unreachable"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow control flow statements in finally blocks */ "no-unsafe-finally"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow negating the left operand of relational operators */ "no-unsafe-negation"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require calls to isNaN() when checking for NaN */ "use-isnan"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce valid JSDoc comments */ "valid-jsdoc"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce comparing typeof expressions against valid strings */ "valid-typeof"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface BestPractices { /** * Enforce getter and setter pairs in objects */ "accessor-pairs"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce return statements in callbacks of array methods */ "array-callback-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the use of variables within the scope they are defined */ "block-scoped-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce that class methods utilize this */ "class-methods-use-this"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum cyclomatic complexity allowed in a program */ complexity?: number | ("off" | "warn" | "error") | unknown[]; /** * Require return statements to either always or never specify values */ "consistent-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent brace style for all control statements */ curly?: number | ("off" | "warn" | "error") | unknown[]; /** * Require default cases in switch statements */ "default-case"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent newlines before and after dots */ "dot-location"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce dot notation whenever possible */ "dot-notation"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require the use of === and !== */ eqeqeq?: number | ("off" | "warn" | "error") | unknown[]; /** * Require for-in loops to include an if statement */ "guard-for-in"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of alert, confirm, and prompt */ "no-alert"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of arguments.caller or arguments.callee */ "no-caller"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow lexical declarations in case clauses */ "no-case-declarations"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow division operators explicitly at the beginning of regular expressions */ "no-div-regex"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow else blocks after return statements in if statements */ "no-else-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow empty functions */ "no-empty-function"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow empty destructuring patterns */ "no-empty-pattern"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow null comparisons without type-checking operators */ "no-eq-null"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of eval() */ "no-eval"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow extending native types */ "no-extend-native"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary calls to .bind() */ "no-extra-bind"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary labels */ "no-extra-label"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow fallthrough of case statements */ "no-fallthrough"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow leading or trailing decimal points in numeric literals */ "no-floating-decimal"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow assignments to native objects or read-only global variables */ "no-global-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow shorthand type conversions */ "no-implicit-coercion"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow var and named function declarations in the global scope */ "no-implicit-globals"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of eval()-like methods */ "no-implied-eval"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow this keywords outside of classes or class-like objects */ "no-invalid-this"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of the **iterator** property */ "no-iterator"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow labeled statements */ "no-labels"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary nested blocks */ "no-lone-blocks"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow function declarations and expressions inside loop statements */ "no-loop-func"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow magic numbers */ "no-magic-numbers"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow multiple spaces */ "no-multi-spaces"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow multiline strings */ "no-multi-str"?: number | ("off" | "warn" | "error") | unknown[]; "no-native-reassign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow new operators outside of assignments or comparisons */ "no-new"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow new operators with the Function object */ "no-new-func"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow new operators with the String, Number, and Boolean objects */ "no-new-wrappers"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow octal literals */ "no-octal"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow octal escape sequences in string literals */ "no-octal-escape"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow reassigning function parameters */ "no-param-reassign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of the **proto** property */ "no-proto"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow var redeclaration */ "no-redeclare"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow certain properties on certain objects */ "no-restricted-properties"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow assignment operators in return statements */ "no-return-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary return await */ "no-return-await"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow javascript: urls */ "no-script-url"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow assignments where both sides are exactly the same */ "no-self-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow comparisons where both sides are exactly the same */ "no-self-compare"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow comma operators */ "no-sequences"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow throwing literals as exceptions */ "no-throw-literal"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unmodified loop conditions */ "no-unmodified-loop-condition"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unused expressions */ "no-unused-expressions"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unused labels */ "no-unused-labels"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary calls to .call() and .apply() */ "no-useless-call"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary concatenation of literals or template literals */ "no-useless-concat"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary escape characters */ "no-useless-escape"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow redundant return statements */ "no-useless-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow void operators */ "no-void"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified warning terms in comments */ "no-warning-comments"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow with statements */ "no-with"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require using Error objects as Promise rejection reasons */ "prefer-promise-reject-errors"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the consistent use of the radix argument when using parseInt() */ radix?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow async functions which have no await expression */ "require-await"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require var declarations be placed at the top of their containing scope */ "vars-on-top"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require parentheses around immediate function invocations */ "wrap-iife"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or Disallow "Yoda" conditions */ yoda?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface StrictMode { /** * require or disallow strict mode directives */ strict?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface Variables { /** * Require or disallow initialization in var declarations */ "init-declarations"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow catch clause parameters from shadowing variables in the outer scope */ "no-catch-shadow"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow deleting variables */ "no-delete-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow labels that share a name with a variable */ "no-label-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified global variables */ "no-restricted-globals"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow var declarations from shadowing variables in the outer scope */ "no-shadow"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow identifiers from shadowing restricted names */ "no-shadow-restricted-names"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of undeclared variables unless mentioned in /_global _ / comments */ "no-undef"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of undefined as an identifier */ "no-undefined"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow initializing variables to undefined */ "no-undef-init"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unused variables */ "no-unused-vars"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of variables before they are defined */ "no-use-before-define"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface NodeAndCommonJs { /** * Require return statements after callbacks */ "callback-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require require() calls to be placed at top-level module scope */ "global-require"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require error handling in callbacks */ "handle-callback-err"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow use of the Buffer() constructor */ "no-buffer-constructor"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow require calls to be mixed with regular var declarations */ "no-mixed-requires"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow new operators with calls to require */ "no-new-require"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow string concatenation with **dirname and **filename */ "no-path-concat"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of process.env */ "no-process-env"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the use of process.exit() */ "no-process-exit"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified modules when loaded by require */ "no-restricted-modules"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow synchronous methods */ "no-sync"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface StylisticIssues { /** * Enforce line breaks after opening and before closing array brackets */ "array-bracket-newline"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing inside array brackets */ "array-bracket-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce line breaks after each array element */ "array-element-newline"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing inside single-line blocks */ "block-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent brace style for blocks */ "brace-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce camelcase naming convention */ camelcase?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce or disallow capitalization of the first letter of a comment */ "capitalized-comments"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow trailing commas */ "comma-dangle"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before and after commas */ "comma-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent comma style */ "comma-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing inside computed property brackets */ "computed-property-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent naming when capturing the current execution context */ "consistent-this"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce at least one newline at the end of files */ "eol-last"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow spacing between function identifiers and their invocations */ "func-call-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require function names to match the name of the variable or property to which they are assigned */ "func-name-matching"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow named function expressions */ "func-names"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the consistent use of either function declarations or expressions */ "func-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce line breaks between arguments of a function call */ "function-call-argument-newline"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent line breaks inside function parentheses */ "function-paren-newline"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified identifiers */ "id-blacklist"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce minimum and maximum identifier lengths */ "id-length"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require identifiers to match a specified regular expression */ "id-match"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the location of arrow function bodies */ "implicit-arrow-linebreak"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent indentation */ indent?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent indentation (legacy, deprecated) */ "indent-legacy"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the consistent use of either double or single quotes in JSX attributes */ "jsx-quotes"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing between keys and values in object literal properties */ "key-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before and after keywords */ "keyword-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce position of line comments */ "line-comment-position"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow an empty line between class members */ "lines-between-class-members"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent linebreak style */ "linebreak-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require empty lines around comments */ "lines-around-comment"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow newlines around directives */ "lines-around-directive"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum depth that blocks can be nested */ "max-depth"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum line length */ "max-len"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum number of lines per file */ "max-lines"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum depth that callbacks can be nested */ "max-nested-callbacks"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum number of parameters in function definitions */ "max-params"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum number of statements allowed in function blocks */ "max-statements"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a maximum number of statements allowed per line */ "max-statements-per-line"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce a particular style for multiline comments */ "multiline-comment-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce newlines between operands of ternary expressions */ "multiline-ternary"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require constructor function names to begin with a capital letter */ "new-cap"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow an empty line after var declarations */ "newline-after-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require an empty line before return statements */ "newline-before-return"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require a newline after each call in a method chain */ "newline-per-chained-call"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require parentheses when invoking a constructor with no arguments */ "new-parens"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow Array constructors */ "no-array-constructor"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow bitwise operators */ "no-bitwise"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow continue statements */ "no-continue"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow inline comments after code */ "no-inline-comments"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow if statements as the only statement in else blocks */ "no-lonely-if"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow mixed binary operators */ "no-mixed-operators"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow mixed spaces and tabs for indentation */ "no-mixed-spaces-and-tabs"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow use of chained assignment expressions */ "no-multi-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow multiple empty lines */ "no-multiple-empty-lines"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow negated conditions */ "no-negated-condition"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow nested ternary expressions */ "no-nested-ternary"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow Object constructors */ "no-new-object"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow the unary operators ++ and -- */ "no-plusplus"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified syntax */ "no-restricted-syntax"?: number | ("off" | "warn" | "error") | unknown[]; "no-spaced-func"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow tabs in file */ "no-tabs"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow ternary operators */ "no-ternary"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow trailing whitespace at the end of lines */ "no-trailing-spaces"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow dangling underscores in identifiers */ "no-underscore-dangle"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow ternary operators when simpler alternatives exist */ "no-unneeded-ternary"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow whitespace before properties */ "no-whitespace-before-property"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the location of single-line statements */ "nonblock-statement-body-position"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent line breaks inside braces */ "object-curly-newline"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing inside braces */ "object-curly-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce placing object properties on separate lines */ "object-property-newline"?: number | ("off" | "warn" | "error") | unknown[]; "object-shorthand"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce variables to be declared either together or separately in functions */ "one-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow newlines around var declarations */ "one-var-declaration-per-line"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow assignment operator shorthand where possible */ "operator-assignment"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent linebreak style for operators */ "operator-linebreak"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow padding within blocks */ "padded-blocks"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow padding lines between statements */ "padding-line-between-statements"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Require quotes around object literal property names */ "quote-props"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce the consistent use of either backticks, double, or single quotes */ quotes?: number | ("off" | "warn" | "error") | unknown[]; /** * Require JSDoc comments */ "require-jsdoc"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow semicolons instead of ASI */ semi?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before and after semicolons */ "semi-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce location of semicolons */ "semi-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Requires object keys to be sorted */ "sort-keys"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require variables within the same declaration block to be sorted */ "sort-vars"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before blocks */ "space-before-blocks"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before function definition opening parenthesis */ "space-before-function-paren"?: | number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing after the // or /\* in a comment */ "spaced-comment"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require spacing around operators */ "space-infix-ops"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing inside parentheses */ "space-in-parens"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before or after unary operators */ "space-unary-ops"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce spacing around colons of switch statements */ "switch-colon-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow spacing between template tags and their literals */ "template-tag-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow Unicode byte order mark (BOM) */ "unicode-bom"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require parenthesis around regex literals */ "wrap-regex"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface EcmaScript6 { /** * Require braces around arrow function bodies */ "arrow-body-style"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require parentheses around arrow function arguments */ "arrow-parens"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing before and after the arrow in arrow functions */ "arrow-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require super() calls in constructors */ "constructor-super"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce consistent spacing around \* operators in generator functions */ "generator-star-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow reassigning class members */ "no-class-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow arrow functions where they could be confused with comparisons */ "no-confusing-arrow"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow reassigning const variables */ "no-const-assign"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow duplicate class members */ "no-dupe-class-members"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow duplicate module imports */ "no-duplicate-imports"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow new operators with the Symbol object */ "no-new-symbol"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow specified modules when loaded by import */ "no-restricted-imports"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow this/super before calling super() in constructors */ "no-this-before-super"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary computed property keys in object literals */ "no-useless-computed-key"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow unnecessary constructors */ "no-useless-constructor"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow renaming import, export, and destructured assignments to the same name */ "no-useless-rename"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require let or const instead of var */ "no-var"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow method and property shorthand syntax for object literals */ "object-shorthand"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require arrow functions as callbacks */ "prefer-arrow-callback"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require const declarations for variables that are never reassigned after declared */ "prefer-const"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require destructuring from arrays and/or objects */ "prefer-destructuring"?: number | ("off" | "warn" | "error") | unknown[]; /** * Disallow parseInt() in favor of binary, octal, and hexadecimal literals */ "prefer-numeric-literals"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require Reflect methods where applicable */ "prefer-reflect"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require rest parameters instead of arguments */ "prefer-rest-params"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require spread operators instead of .apply() */ "prefer-spread"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require template literals instead of string concatenation */ "prefer-template"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require generator functions to contain yield */ "require-yield"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce spacing between rest and spread operators and their expressions */ "rest-spread-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Enforce sorted import declarations within modules */ "sort-imports"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require symbol descriptions */ "symbol-description"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow spacing around embedded expressions of template strings */ "template-curly-spacing"?: number | ("off" | "warn" | "error") | unknown[]; /** * Require or disallow spacing around the _ in yield_ expressions */ "yield-star-spacing"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface Legacy { "max-depth"?: number | ("off" | "warn" | "error") | unknown[]; "max-len"?: number | ("off" | "warn" | "error") | unknown[]; "max-params"?: number | ("off" | "warn" | "error") | unknown[]; "max-statements"?: number | ("off" | "warn" | "error") | unknown[]; "no-bitwise"?: number | ("off" | "warn" | "error") | unknown[]; "no-plusplus"?: number | ("off" | "warn" | "error") | unknown[]; [k: string]: unknown; } export interface HttpsJsonSchemastoreOrgPartialEslintPluginsJson { /** * Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md */ "@angular-eslint/component-class-suffix"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { suffixes?: string[]; [k: string]: unknown; }, ]; /** * Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.dev/style-guide#style-05-04 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md */ "@angular-eslint/component-max-inline-declarations"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { template?: number; styles?: number; animations?: number; [k: string]: unknown; }, ]; /** * Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-07, https://angular.dev/style-guide#style-05-02 * and https://angular.dev/style-guide#style-05-03. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md */ "@angular-eslint/component-selector"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { type?: string | ("element" | "attribute")[]; prefix?: string | unknown[]; style?: "camelCase" | "kebab-case"; [k: string]: unknown; }, ]; /** * Ensures consistent usage of `styles`/`styleUrls`/`styleUrl` within Component metadata * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md */ "@angular-eslint/consistent-component-styles"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Ensures that classes use contextual decorators in its body * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md */ "@angular-eslint/contextual-decorator"?: { [k: string]: unknown; }; /** * Ensures that lifecycle methods are used in a correct context * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md */ "@angular-eslint/contextual-lifecycle"?: { [k: string]: unknown; }; /** * Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md */ "@angular-eslint/directive-class-suffix"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { suffixes?: string[]; [k: string]: unknown; }, ]; /** * Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md */ "@angular-eslint/directive-selector"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { type?: string | ("element" | "attribute")[]; prefix?: string | unknown[]; style?: "camelCase" | "kebab-case"; [k: string]: unknown; }, ]; /** * Angular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md */ "@angular-eslint/no-async-lifecycle-method"?: { [k: string]: unknown; }; /** * The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use-case than getting a stream of values (using @Input), so often the @Attribute decorator is mistakenly used when @Input was what was intended. This rule disallows usage of @Attribute decorator altogether in order to prevent these mistakes. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md */ "@angular-eslint/no-attribute-decorator"?: { [k: string]: unknown; }; /** * Ensures that directives not implement conflicting lifecycle interfaces. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md */ "@angular-eslint/no-conflicting-lifecycle"?: { [k: string]: unknown; }; /** * Ensures that metadata arrays do not contain duplicate entries. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicates-in-metadata-arrays.md */ "@angular-eslint/no-duplicates-in-metadata-arrays"?: { [k: string]: unknown; }; /** * Disallows declaring empty lifecycle methods * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md */ "@angular-eslint/no-empty-lifecycle-method"?: { [k: string]: unknown; }; /** * Disallows usage of `forwardRef` references for DI * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-forward-ref.md */ "@angular-eslint/no-forward-ref"?: { [k: string]: unknown; }; /** * Disallows usage of the `host` metadata property. NOTE: This used to be recommended by the Angular Team, but now they recommend the exact opposite: https://github.com/angular/angular/issues/54284 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-host-metadata-property.md */ "@angular-eslint/no-host-metadata-property"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { allowStatic?: boolean; [k: string]: unknown; }, ]; /** * Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-prefix.md */ "@angular-eslint/no-input-prefix"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { prefixes?: string[]; [k: string]: unknown; }, ]; /** * Ensures that input bindings are not aliased * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md */ "@angular-eslint/no-input-rename"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * A list with allowed input names */ allowedNames?: string[]; [k: string]: unknown; }, ]; /** * Disallows usage of the `inputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md */ "@angular-eslint/no-inputs-metadata-property"?: { [k: string]: unknown; }; /** * Disallows explicit calls to lifecycle methods * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md */ "@angular-eslint/no-lifecycle-call"?: { [k: string]: unknown; }; /** * Ensures that output bindings, including aliases, are not named as standard DOM events * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md */ "@angular-eslint/no-output-native"?: { [k: string]: unknown; }; /** * Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/style-guide#style-05-16 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md */ "@angular-eslint/no-output-on-prefix"?: { [k: string]: unknown; }; /** * Ensures that output bindings are not aliased * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md */ "@angular-eslint/no-output-rename"?: { [k: string]: unknown; }; /** * Disallows usage of the `outputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md */ "@angular-eslint/no-outputs-metadata-property"?: { [k: string]: unknown; }; /** * Disallows the declaration of impure pipes * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md */ "@angular-eslint/no-pipe-impure"?: { [k: string]: unknown; }; /** * Disallows usage of the `queries` metadata property. See more at https://angular.dev/style-guide#style-05-12. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md */ "@angular-eslint/no-queries-metadata-property"?: { [k: string]: unknown; }; /** * Enforce consistent prefix for pipes. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md */ "@angular-eslint/pipe-prefix"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { prefixes?: string[]; [k: string]: unknown; }, ]; /** * Ensures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush` * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md */ "@angular-eslint/prefer-on-push-component-change-detection"?: { [k: string]: unknown; }; /** * Ensures component, directive and pipe `standalone` property is set to `true` in the component decorator * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md */ "@angular-eslint/prefer-standalone"?: { [k: string]: unknown; }; /** * Ensures component `standalone` property is set to `true` in the component decorator * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md */ "@angular-eslint/prefer-standalone-component"?: { [k: string]: unknown; }; /** * Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md */ "@angular-eslint/prefer-output-readonly"?: { [k: string]: unknown; }; /** * The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.dev/style-guide#style-05-04 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md */ "@angular-eslint/relative-url-prefix"?: { [k: string]: unknown; }; /** * Ensures that $localize tagged messages contain helpful metadata to aid with translations. * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-localize-metadata.md */ "@angular-eslint/require-localize-metadata"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { requireDescription?: boolean; requireMeaning?: boolean; [k: string]: unknown; }, ]; /** * Ensures that lifecycle methods are declared in order of execution * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-lifecycle-methods.md */ "@angular-eslint/sort-lifecycle-methods"?: { [k: string]: unknown; }; /** * Ensures ASC alphabetical order for `NgModule` metadata arrays for easy visual scanning * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-ngmodule-metadata-arrays.md */ "@angular-eslint/sort-ngmodule-metadata-arrays"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * A string with a BCP 47 language tag. */ locale?: string; [k: string]: unknown; }, ]; /** * Component selector must be declared * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-selector.md */ "@angular-eslint/use-component-selector"?: { [k: string]: unknown; }; /** * Disallows using `ViewEncapsulation.None` * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md */ "@angular-eslint/use-component-view-encapsulation"?: { [k: string]: unknown; }; /** * Using the `providedIn` property makes `Injectables` tree-shakable * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-injectable-provided-in.md */ "@angular-eslint/use-injectable-provided-in"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { ignoreClassNamePattern?: string; [k: string]: unknown; }, ]; /** * Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#style-09-01 * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md */ "@angular-eslint/use-lifecycle-interface"?: { [k: string]: unknown; }; /** * Ensures that `Pipes` implement `PipeTransform` interface * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md */ "@angular-eslint/use-pipe-transform-interface"?: { [k: string]: unknown; }; /** * Ensure imports point to a file/module that can be resolved. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unresolved.md */ "eslint-plugin-import/no-unresolved"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; amd?: boolean; esmodule?: boolean; /** * @minItems 1 */ ignore?: [string, ...string[]]; caseSensitive?: boolean; caseSensitiveStrict?: boolean; [k: string]: unknown; }, ]; /** * Ensure named imports correspond to a named export in the remote file. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/named.md */ "eslint-plugin-import/named"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; [k: string]: unknown; }, ]; /** * Ensure a default export is present, given a default import. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/default.md */ "eslint-plugin-import/default"?: { [k: string]: unknown; }; /** * Ensure imported namespaces contain dereferenced properties as they are dereferenced. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/namespace.md */ "eslint-plugin-import/namespace"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * If `false`, will report computed (and thus, un-lintable) references to namespace members. */ allowComputed?: boolean; [k: string]: unknown; }, ]; /** * Forbid namespace (a.k.a. "wildcard" `*`) imports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-namespace.md */ "eslint-plugin-import/no-namespace"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { ignore?: string[]; [k: string]: unknown; }, ]; /** * Forbid any invalid exports, i.e. re-export of the same name. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/export.md */ "eslint-plugin-import/export"?: { [k: string]: unknown; }; /** * Forbid the use of mutable exports with `var` or `let`. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-mutable-exports.md */ "eslint-plugin-import/no-mutable-exports"?: { [k: string]: unknown; }; /** * Ensure consistent use of file extension within the import path. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/extensions.md */ "eslint-plugin-import/extensions"?: { [k: string]: unknown; }; /** * Enforce which files can be imported in a given folder. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-restricted-paths.md */ "eslint-plugin-import/no-restricted-paths"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * @minItems 1 */ zones?: [ { target?: string | [string, ...string[]]; from?: string | [string, ...string[]]; except?: string[]; message?: string; }, ...{ target?: string | [string, ...string[]]; from?: string | [string, ...string[]]; except?: string[]; message?: string; }[], ]; basePath?: string; [k: string]: unknown; }, ]; /** * Forbid importing the submodules of other modules. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-internal-modules.md */ "eslint-plugin-import/no-internal-modules"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Prefer named exports to be grouped together in a single export declaration * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/group-exports.md */ "eslint-plugin-import/group-exports"?: { [k: string]: unknown; }; /** * Forbid importing packages through relative paths. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-packages.md */ "eslint-plugin-import/no-relative-packages"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; amd?: boolean; esmodule?: boolean; /** * @minItems 1 */ ignore?: [string, ...string[]]; [k: string]: unknown; }, ]; /** * Forbid importing modules from parent directories. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-parent-imports.md */ "eslint-plugin-import/no-relative-parent-imports"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; amd?: boolean; esmodule?: boolean; /** * @minItems 1 */ ignore?: [string, ...string[]]; [k: string]: unknown; }, ]; /** * Enforce or ban the use of inline type-only markers for named imports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/consistent-type-specifier-style.md */ "eslint-plugin-import/consistent-type-specifier-style"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Forbid a module from importing itself. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-self-import.md */ "eslint-plugin-import/no-self-import"?: { [k: string]: unknown; }; /** * Forbid a module from importing a module with a dependency path back to itself. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-cycle.md */ "eslint-plugin-import/no-cycle"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; amd?: boolean; esmodule?: boolean; /** * @minItems 1 */ ignore?: [string, ...string[]]; maxDepth?: number | "∞"; /** * ignore external modules */ ignoreExternal?: boolean; /** * Allow cyclic dependency if there is at least one dynamic import in the chain */ allowUnsafeDynamicCyclicDependency?: boolean; [k: string]: unknown; }, ]; /** * Forbid named default exports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-default.md */ "eslint-plugin-import/no-named-default"?: { [k: string]: unknown; }; /** * Forbid use of exported name as identifier of default export. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default.md */ "eslint-plugin-import/no-named-as-default"?: { [k: string]: unknown; }; /** * Forbid use of exported name as property of default export. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default-member.md */ "eslint-plugin-import/no-named-as-default-member"?: { [k: string]: unknown; }; /** * Forbid anonymous values as default exports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-anonymous-default-export.md */ "eslint-plugin-import/no-anonymous-default-export"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * If `false`, will report default export of an array */ allowArray?: boolean; /** * If `false`, will report default export of an arrow function */ allowArrowFunction?: boolean; /** * If `false`, will report default export of a function call */ allowCallExpression?: boolean; /** * If `false`, will report default export of an anonymous class */ allowAnonymousClass?: boolean; /** * If `false`, will report default export of an anonymous function */ allowAnonymousFunction?: boolean; /** * If `false`, will report default export of a literal */ allowLiteral?: boolean; /** * If `false`, will report default export of an object expression */ allowObject?: boolean; /** * If `false`, will report default export of a class instantiation */ allowNew?: boolean; [k: string]: unknown; }, ]; /** * Forbid modules without exports, or exports without matching import in another module. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unused-modules.md */ "eslint-plugin-import/no-unused-modules"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * files/paths to be analyzed (only for unused exports) */ src?: string[]; /** * files/paths for which unused exports will not be reported (e.g module entry points) */ ignoreExports?: string[]; /** * report modules without any exports */ missingExports?: boolean; /** * report exports without any usage */ unusedExports?: boolean; [k: string]: unknown; }, ]; /** * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-commonjs.md */ "eslint-plugin-import/no-commonjs"?: { [k: string]: unknown; }; /** * Forbid AMD `require` and `define` calls. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-amd.md */ "eslint-plugin-import/no-amd"?: { [k: string]: unknown; }; /** * Forbid repeated import of the same module in multiple places. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-duplicates.md */ "eslint-plugin-import/no-duplicates"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { considerQueryString?: boolean; "prefer-inline"?: boolean; [k: string]: unknown; }, ]; /** * Ensure all imports appear before other statements. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/first.md */ "eslint-plugin-import/first"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Enforce the maximum number of dependencies a module can have. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/max-dependencies.md */ "eslint-plugin-import/max-dependencies"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { max?: number; ignoreTypeImports?: boolean; [k: string]: unknown; }, ]; /** * Forbid the use of extraneous packages. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-extraneous-dependencies.md */ "eslint-plugin-import/no-extraneous-dependencies"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { devDependencies?: boolean | unknown[]; optionalDependencies?: boolean | unknown[]; peerDependencies?: boolean | unknown[]; bundledDependencies?: boolean | unknown[]; packageDir?: string | unknown[]; includeInternal?: boolean; includeTypes?: boolean; [k: string]: unknown; }, ]; /** * Forbid import of modules using absolute paths. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-absolute-path.md */ "eslint-plugin-import/no-absolute-path"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; amd?: boolean; esmodule?: boolean; /** * @minItems 1 */ ignore?: [string, ...string[]]; [k: string]: unknown; }, ]; /** * Forbid Node.js builtin modules. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-nodejs-modules.md */ "eslint-plugin-import/no-nodejs-modules"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { allow?: string[]; [k: string]: unknown; }, ]; /** * Forbid webpack loader syntax in imports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-webpack-loader-syntax.md */ "eslint-plugin-import/no-webpack-loader-syntax"?: { [k: string]: unknown; }; /** * Enforce a convention in module import order. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/order.md */ "eslint-plugin-import/order"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { groups?: unknown[]; pathGroupsExcludedImportTypes?: unknown[]; distinctGroup?: boolean; pathGroups?: { pattern: string; patternOptions?: { [k: string]: unknown; }; group: | "builtin" | "external" | "internal" | "unknown" | "parent" | "sibling" | "index" | "object" | "type"; position?: "after" | "before"; }[]; "newlines-between"?: | "ignore" | "always" | "always-and-inside-groups" | "never"; alphabetize?: { caseInsensitive?: boolean; order?: "ignore" | "asc" | "desc"; orderImportKind?: "ignore" | "asc" | "desc"; }; warnOnUnassignedImports?: boolean; [k: string]: unknown; }, ]; /** * Enforce a newline after import statements. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/newline-after-import.md */ "eslint-plugin-import/newline-after-import"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { count?: number; exactCount?: boolean; considerComments?: boolean; [k: string]: unknown; }, ]; /** * Prefer a default export if module exports a single name or multiple names. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/prefer-default-export.md */ "eslint-plugin-import/prefer-default-export"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { target?: "single" | "any"; [k: string]: unknown; }, ]; /** * Forbid default exports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-default-export.md */ "eslint-plugin-import/no-default-export"?: { [k: string]: unknown; }; /** * Forbid named exports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-export.md */ "eslint-plugin-import/no-named-export"?: { [k: string]: unknown; }; /** * Forbid `require()` calls with expressions. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-dynamic-require.md */ "eslint-plugin-import/no-dynamic-require"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { esmodule?: boolean; [k: string]: unknown; }, ]; /** * Forbid potentially ambiguous parse goal (`script` vs. `module`). * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/unambiguous.md */ "eslint-plugin-import/unambiguous"?: { [k: string]: unknown; }; /** * Forbid unassigned imports * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unassigned-import.md */ "eslint-plugin-import/no-unassigned-import"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { devDependencies?: boolean | unknown[]; optionalDependencies?: boolean | unknown[]; peerDependencies?: boolean | unknown[]; allow?: string[]; [k: string]: unknown; }, ]; /** * Forbid unnecessary path segments in import and require statements. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-useless-path-segments.md */ "eslint-plugin-import/no-useless-path-segments"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { commonjs?: boolean; noUselessIndex?: boolean; [k: string]: unknown; }, ]; /** * Enforce a leading comment with the webpackChunkName for dynamic imports. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/dynamic-import-chunkname.md */ "eslint-plugin-import/dynamic-import-chunkname"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { importFunctions?: string[]; webpackChunknameFormat?: string; [k: string]: unknown; }, ]; /** * Forbid import statements with CommonJS module.exports. */ "eslint-plugin-import/no-import-module-exports"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { exceptions?: unknown[]; [k: string]: unknown; }, ]; /** * Forbid empty named import blocks. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-empty-named-blocks.md */ "eslint-plugin-import/no-empty-named-blocks"?: { [k: string]: unknown; }; /** * Ensure all exports appear after other statements. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/exports-last.md */ "eslint-plugin-import/exports-last"?: { [k: string]: unknown; }; /** * Forbid imported names marked with `@deprecated` documentation tag. * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-deprecated.md */ "eslint-plugin-import/no-deprecated"?: { [k: string]: unknown; }; /** * Replaced by `import/first`. * https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md */ "eslint-plugin-import/imports-first"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Improve regexes by making them shorter, consistent, and safer. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md */ "eslint-plugin-unicorn/better-regex"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { sortCharacterClasses?: boolean; [k: string]: unknown; }, ]; /** * Enforce a specific parameter name in catch clauses. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md */ "eslint-plugin-unicorn/catch-error-name"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { name?: string; ignore?: unknown[]; [k: string]: unknown; }, ]; /** * Use destructured variables over properties. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md */ "eslint-plugin-unicorn/consistent-destructuring"?: { [k: string]: unknown; }; /** * Prefer consistent types when spreading a ternary in an array literal. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md */ "eslint-plugin-unicorn/consistent-empty-array-spread"?: { [k: string]: unknown; }; /** * Move function definitions to the highest possible scope. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md */ "eslint-plugin-unicorn/consistent-function-scoping"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkArrowFunctions?: boolean; [k: string]: unknown; }, ]; /** * Enforce correct `Error` subclassing. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md */ "eslint-plugin-unicorn/custom-error-definition"?: { [k: string]: unknown; }; /** * Enforce no spaces between braces. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md */ "eslint-plugin-unicorn/empty-brace-spaces"?: { [k: string]: unknown; }; /** * Enforce passing a `message` value when creating a built-in error. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md */ "eslint-plugin-unicorn/error-message"?: { [k: string]: unknown; }; /** * Require escape sequences to use uppercase values. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md */ "eslint-plugin-unicorn/escape-case"?: { [k: string]: unknown; }; /** * Add expiration conditions to TODO comments. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md */ "eslint-plugin-unicorn/expiring-todo-comments"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { terms?: string[]; ignore?: unknown[]; ignoreDatesOnPullRequests?: boolean; allowWarningComments?: boolean; date?: string; [k: string]: unknown; }, ]; /** * Enforce explicitly comparing the `length` or `size` property of a value. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md */ "eslint-plugin-unicorn/explicit-length-check"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { "non-zero"?: "greater-than" | "not-equal"; [k: string]: unknown; }, ]; /** * Enforce a case style for filenames. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md */ "eslint-plugin-unicorn/filename-case"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Enforce specific import styles per module. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md */ "eslint-plugin-unicorn/import-style"?: { [k: string]: unknown; }; /** * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md */ "eslint-plugin-unicorn/new-for-builtins"?: { [k: string]: unknown; }; /** * Enforce specifying rules to disable in `eslint-disable` comments. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md */ "eslint-plugin-unicorn/no-abusive-eslint-disable"?: { [k: string]: unknown; }; /** * Disallow anonymous functions and classes as the default export. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md */ "eslint-plugin-unicorn/no-anonymous-default-export"?: { [k: string]: unknown; }; /** * Prevent passing a function reference directly to iterator methods. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md */ "eslint-plugin-unicorn/no-array-callback-reference"?: { [k: string]: unknown; }; /** * Prefer `for…of` over the `forEach` method. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md */ "eslint-plugin-unicorn/no-array-for-each"?: { [k: string]: unknown; }; /** * Disallow using the `this` argument in array methods. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md */ "eslint-plugin-unicorn/no-array-method-this-argument"?: { [k: string]: unknown; }; /** * Enforce combining multiple `Array#push()` into one call. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md */ "eslint-plugin-unicorn/no-array-push-push"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { ignore?: unknown[]; [k: string]: unknown; }, ]; /** * Disallow `Array#reduce()` and `Array#reduceRight()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md */ "eslint-plugin-unicorn/no-array-reduce"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { allowSimpleOperations?: boolean; [k: string]: unknown; }, ]; /** * Disallow member access from await expression. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md */ "eslint-plugin-unicorn/no-await-expression-member"?: { [k: string]: unknown; }; /** * Disallow using `await` in `Promise` method parameters. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md */ "eslint-plugin-unicorn/no-await-in-promise-methods"?: { [k: string]: unknown; }; /** * Do not use leading/trailing space between `console.log` parameters. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md */ "eslint-plugin-unicorn/no-console-spaces"?: { [k: string]: unknown; }; /** * Do not use `document.cookie` directly. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md */ "eslint-plugin-unicorn/no-document-cookie"?: { [k: string]: unknown; }; /** * Disallow empty files. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md */ "eslint-plugin-unicorn/no-empty-file"?: { [k: string]: unknown; }; /** * Do not use a `for` loop that can be replaced with a `for-of` loop. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md */ "eslint-plugin-unicorn/no-for-loop"?: { [k: string]: unknown; }; /** * Enforce the use of Unicode escapes instead of hexadecimal escapes. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md */ "eslint-plugin-unicorn/no-hex-escape"?: { [k: string]: unknown; }; /** * Require `Array.isArray()` instead of `instanceof Array`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md */ "eslint-plugin-unicorn/no-instanceof-array"?: { [k: string]: unknown; }; /** * Disallow invalid options in `fetch()` and `new Request()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md */ "eslint-plugin-unicorn/no-invalid-fetch-options"?: { [k: string]: unknown; }; /** * Prevent calling `EventTarget#removeEventListener()` with the result of an expression. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md */ "eslint-plugin-unicorn/no-invalid-remove-event-listener"?: { [k: string]: unknown; }; /** * Disallow identifiers starting with `new` or `class`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md */ "eslint-plugin-unicorn/no-keyword-prefix"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { /** * @minItems 1 * @maxItems 1 */ disallowedPrefixes?: [string]; checkProperties?: boolean; onlyCamelCase?: boolean; [k: string]: unknown; }, ]; /** * Disallow `if` statements as the only statement in `if` blocks without `else`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md */ "eslint-plugin-unicorn/no-lonely-if"?: { [k: string]: unknown; }; /** * Disallow a magic number as the `depth` argument in `Array#flat(…).` * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md */ "eslint-plugin-unicorn/no-magic-array-flat-depth"?: { [k: string]: unknown; }; /** * Disallow negated conditions. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md */ "eslint-plugin-unicorn/no-negated-condition"?: { [k: string]: unknown; }; /** * Disallow negated expression in equality check. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md */ "eslint-plugin-unicorn/no-negation-in-equality-check"?: { [k: string]: unknown; }; /** * Disallow nested ternary expressions. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md */ "eslint-plugin-unicorn/no-nested-ternary"?: { [k: string]: unknown; }; /** * Disallow `new Array()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md */ "eslint-plugin-unicorn/no-new-array"?: { [k: string]: unknown; }; /** * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md */ "eslint-plugin-unicorn/no-new-buffer"?: { [k: string]: unknown; }; /** * Disallow the use of the `null` literal. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md */ "eslint-plugin-unicorn/no-null"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkStrictEquality?: boolean; [k: string]: unknown; }, ]; /** * Disallow the use of objects as default parameters. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md */ "eslint-plugin-unicorn/no-object-as-default-parameter"?: { [k: string]: unknown; }; /** * Disallow `process.exit()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md */ "eslint-plugin-unicorn/no-process-exit"?: { [k: string]: unknown; }; /** * Disallow passing single-element arrays to `Promise` methods. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md */ "eslint-plugin-unicorn/no-single-promise-in-promise-methods"?: { [k: string]: unknown; }; /** * Disallow classes that only have static members. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md */ "eslint-plugin-unicorn/no-static-only-class"?: { [k: string]: unknown; }; /** * Disallow `then` property. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md */ "eslint-plugin-unicorn/no-thenable"?: { [k: string]: unknown; }; /** * Disallow assigning `this` to a variable. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md */ "eslint-plugin-unicorn/no-this-assignment"?: { [k: string]: unknown; }; /** * Disallow comparing `undefined` using `typeof`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md */ "eslint-plugin-unicorn/no-typeof-undefined"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkGlobalVariables?: boolean; [k: string]: unknown; }, ]; /** * Disallow awaiting non-promise values. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md */ "eslint-plugin-unicorn/no-unnecessary-await"?: { [k: string]: unknown; }; /** * Enforce the use of built-in methods instead of unnecessary polyfills. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md */ "eslint-plugin-unicorn/no-unnecessary-polyfills"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { targets?: | string | unknown[] | { [k: string]: unknown; }; [k: string]: unknown; }, ]; /** * Disallow unreadable array destructuring. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md */ "eslint-plugin-unicorn/no-unreadable-array-destructuring"?: { [k: string]: unknown; }; /** * Disallow unreadable IIFEs. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md */ "eslint-plugin-unicorn/no-unreadable-iife"?: { [k: string]: unknown; }; /** * Disallow unused object properties. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md */ "eslint-plugin-unicorn/no-unused-properties"?: { [k: string]: unknown; }; /** * Disallow useless fallback when spreading in object literals. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md */ "eslint-plugin-unicorn/no-useless-fallback-in-spread"?: { [k: string]: unknown; }; /** * Disallow useless array length check. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md */ "eslint-plugin-unicorn/no-useless-length-check"?: { [k: string]: unknown; }; /** * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md */ "eslint-plugin-unicorn/no-useless-promise-resolve-reject"?: { [k: string]: unknown; }; /** * Disallow unnecessary spread. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md */ "eslint-plugin-unicorn/no-useless-spread"?: { [k: string]: unknown; }; /** * Disallow useless case in switch statements. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md */ "eslint-plugin-unicorn/no-useless-switch-case"?: { [k: string]: unknown; }; /** * Disallow useless `undefined`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md */ "eslint-plugin-unicorn/no-useless-undefined"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkArguments?: boolean; checkArrowFunctionBody?: boolean; [k: string]: unknown; }, ]; /** * Disallow number literals with zero fractions or dangling dots. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md */ "eslint-plugin-unicorn/no-zero-fractions"?: { [k: string]: unknown; }; /** * Enforce proper case for numeric literals. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md */ "eslint-plugin-unicorn/number-literal-case"?: { [k: string]: unknown; }; /** * Enforce the style of numeric separators by correctly grouping digits. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md */ "eslint-plugin-unicorn/numeric-separators-style"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { binary?: { onlyIfContainsSeparator?: boolean; minimumDigits?: number; groupLength?: number; }; octal?: { onlyIfContainsSeparator?: boolean; minimumDigits?: number; groupLength?: number; }; hexadecimal?: { onlyIfContainsSeparator?: boolean; minimumDigits?: number; groupLength?: number; }; number?: { onlyIfContainsSeparator?: boolean; minimumDigits?: number; groupLength?: number; }; onlyIfContainsSeparator?: boolean; [k: string]: unknown; }, ]; /** * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md */ "eslint-plugin-unicorn/prefer-add-event-listener"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { excludedPackages?: string[]; [k: string]: unknown; }, ]; /** * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md */ "eslint-plugin-unicorn/prefer-array-find"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkFromLast?: boolean; [k: string]: unknown; }, ]; /** * Prefer `.flatMap(…)` over `.map(…).flat()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md */ "eslint-plugin-unicorn/prefer-array-flat-map"?: { [k: string]: unknown; }; /** * Prefer `Array#flat()` over legacy techniques to flatten arrays. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md */ "eslint-plugin-unicorn/prefer-array-flat"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { functions?: unknown[]; [k: string]: unknown; }, ]; /** * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md */ "eslint-plugin-unicorn/prefer-array-index-of"?: { [k: string]: unknown; }; /** * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md */ "eslint-plugin-unicorn/prefer-array-some"?: { [k: string]: unknown; }; /** * Prefer `.at()` method for index access and `String#charAt()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md */ "eslint-plugin-unicorn/prefer-at"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { getLastElementFunctions?: unknown[]; checkAllIndexAccess?: boolean; [k: string]: unknown; }, ]; /** * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md */ "eslint-plugin-unicorn/prefer-blob-reading-methods"?: { [k: string]: unknown; }; /** * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md */ "eslint-plugin-unicorn/prefer-code-point"?: { [k: string]: unknown; }; /** * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md */ "eslint-plugin-unicorn/prefer-date-now"?: { [k: string]: unknown; }; /** * Prefer default parameters over reassignment. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md */ "eslint-plugin-unicorn/prefer-default-parameters"?: { [k: string]: unknown; }; /** * Prefer `Node#append()` over `Node#appendChild()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md */ "eslint-plugin-unicorn/prefer-dom-node-append"?: { [k: string]: unknown; }; /** * Prefer using `.dataset` on DOM elements over calling attribute methods. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md */ "eslint-plugin-unicorn/prefer-dom-node-dataset"?: { [k: string]: unknown; }; /** * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md */ "eslint-plugin-unicorn/prefer-dom-node-remove"?: { [k: string]: unknown; }; /** * Prefer `.textContent` over `.innerText`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md */ "eslint-plugin-unicorn/prefer-dom-node-text-content"?: { [k: string]: unknown; }; /** * Prefer `EventTarget` over `EventEmitter`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md */ "eslint-plugin-unicorn/prefer-event-target"?: { [k: string]: unknown; }; /** * Prefer `export…from` when re-exporting. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md */ "eslint-plugin-unicorn/prefer-export-from"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { ignoreUsedVariables?: boolean; [k: string]: unknown; }, ]; /** * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md */ "eslint-plugin-unicorn/prefer-includes"?: { [k: string]: unknown; }; /** * Prefer reading a JSON file as a buffer. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md */ "eslint-plugin-unicorn/prefer-json-parse-buffer"?: { [k: string]: unknown; }; /** * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md */ "eslint-plugin-unicorn/prefer-keyboard-event-key"?: { [k: string]: unknown; }; /** * Prefer using a logical operator over a ternary. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md */ "eslint-plugin-unicorn/prefer-logical-operator-over-ternary"?: { [k: string]: unknown; }; /** * Enforce the use of `Math.trunc` instead of bitwise operators. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md */ "eslint-plugin-unicorn/prefer-math-trunc"?: { [k: string]: unknown; }; /** * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md */ "eslint-plugin-unicorn/prefer-modern-dom-apis"?: { [k: string]: unknown; }; /** * Prefer modern `Math` APIs over legacy patterns. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md */ "eslint-plugin-unicorn/prefer-modern-math-apis"?: { [k: string]: unknown; }; /** * Prefer JavaScript modules (ESM) over CommonJS. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md */ "eslint-plugin-unicorn/prefer-module"?: { [k: string]: unknown; }; /** * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md */ "eslint-plugin-unicorn/prefer-native-coercion-functions"?: { [k: string]: unknown; }; /** * Prefer negative index over `.length - index` when possible. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md */ "eslint-plugin-unicorn/prefer-negative-index"?: { [k: string]: unknown; }; /** * Prefer using the `node:` protocol when importing Node.js builtin modules. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md */ "eslint-plugin-unicorn/prefer-node-protocol"?: { [k: string]: unknown; }; /** * Prefer `Number` static properties over global ones. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md */ "eslint-plugin-unicorn/prefer-number-properties"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { checkInfinity?: boolean; checkNaN?: boolean; [k: string]: unknown; }, ]; /** * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md */ "eslint-plugin-unicorn/prefer-object-from-entries"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { functions?: unknown[]; [k: string]: unknown; }, ]; /** * Prefer omitting the `catch` binding parameter. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md */ "eslint-plugin-unicorn/prefer-optional-catch-binding"?: { [k: string]: unknown; }; /** * Prefer borrowing methods from the prototype instead of the instance. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md */ "eslint-plugin-unicorn/prefer-prototype-methods"?: { [k: string]: unknown; }; /** * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md */ "eslint-plugin-unicorn/prefer-query-selector"?: { [k: string]: unknown; }; /** * Prefer `Reflect.apply()` over `Function#apply()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md */ "eslint-plugin-unicorn/prefer-reflect-apply"?: { [k: string]: unknown; }; /** * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md */ "eslint-plugin-unicorn/prefer-regexp-test"?: { [k: string]: unknown; }; /** * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md */ "eslint-plugin-unicorn/prefer-set-has"?: { [k: string]: unknown; }; /** * Prefer using `Set#size` instead of `Array#length`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md */ "eslint-plugin-unicorn/prefer-set-size"?: { [k: string]: unknown; }; /** * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md */ "eslint-plugin-unicorn/prefer-spread"?: { [k: string]: unknown; }; /** * Prefer using the `String.raw` tag to avoid escaping `\`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md */ "eslint-plugin-unicorn/prefer-string-raw"?: { [k: string]: unknown; }; /** * Prefer `String#replaceAll()` over regex searches with the global flag. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md */ "eslint-plugin-unicorn/prefer-string-replace-all"?: { [k: string]: unknown; }; /** * Prefer `String#slice()` over `String#substr()` and `String#substring()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md */ "eslint-plugin-unicorn/prefer-string-slice"?: { [k: string]: unknown; }; /** * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md */ "eslint-plugin-unicorn/prefer-string-starts-ends-with"?: { [k: string]: unknown; }; /** * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md */ "eslint-plugin-unicorn/prefer-string-trim-start-end"?: { [k: string]: unknown; }; /** * Prefer using `structuredClone` to create a deep clone. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md */ "eslint-plugin-unicorn/prefer-structured-clone"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { functions?: unknown[]; [k: string]: unknown; }, ]; /** * Prefer `switch` over multiple `else-if`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md */ "eslint-plugin-unicorn/prefer-switch"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { minimumCases?: number; emptyDefaultCase?: | "no-default-comment" | "do-nothing-comment" | "no-default-case"; [k: string]: unknown; }, ]; /** * Prefer ternary expressions over simple `if-else` statements. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md */ "eslint-plugin-unicorn/prefer-ternary"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Prefer top-level await over top-level promises and async function calls. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md */ "eslint-plugin-unicorn/prefer-top-level-await"?: { [k: string]: unknown; }; /** * Enforce throwing `TypeError` in type checking conditions. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md */ "eslint-plugin-unicorn/prefer-type-error"?: { [k: string]: unknown; }; /** * Prevent abbreviations. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md */ "eslint-plugin-unicorn/prevent-abbreviations"?: { [k: string]: unknown; }; /** * Enforce consistent relative URL style. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md */ "eslint-plugin-unicorn/relative-url-style"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Enforce using the separator argument with `Array#join()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md */ "eslint-plugin-unicorn/require-array-join-separator"?: { [k: string]: unknown; }; /** * Enforce using the digits argument with `Number#toFixed()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md */ "eslint-plugin-unicorn/require-number-to-fixed-digits-argument"?: { [k: string]: unknown; }; /** * Enforce using the `targetOrigin` argument with `window.postMessage()`. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md */ "eslint-plugin-unicorn/require-post-message-target-origin"?: { [k: string]: unknown; }; /** * Enforce better string content. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md */ "eslint-plugin-unicorn/string-content"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { patterns?: { [k: string]: | string | { suggest: string; fix?: boolean; message?: string; }; }; [k: string]: unknown; }, ]; /** * Enforce consistent brace style for `case` clauses. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md */ "eslint-plugin-unicorn/switch-case-braces"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { [k: string]: unknown; }, ]; /** * Fix whitespace-insensitive template indentation. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md */ "eslint-plugin-unicorn/template-indent"?: | number | ("off" | "warn" | "error") | [ number | ("off" | "warn" | "error"), { indent?: string | number; tags?: string[]; functions?: string[]; selectors?: string[]; comments?: string[]; [k: string]: unknown; }, ]; /** * Enforce consistent case for text encoding identifiers. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md */ "eslint-plugin-unicorn/text-encoding-identifier-case"?: { [k: string]: unknown; }; /** * Require `new` when creating an error. * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md */ "eslint-plugin-unicorn/throw-new-error"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index */ "eslint-plugin-unicorn/import-index"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof */ "eslint-plugin-unicorn/no-array-instanceof"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator */ "eslint-plugin-unicorn/no-fn-reference-in-iterator"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce */ "eslint-plugin-unicorn/no-reduce"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex */ "eslint-plugin-unicorn/no-unsafe-regex"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset */ "eslint-plugin-unicorn/prefer-dataset"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key */ "eslint-plugin-unicorn/prefer-event-key"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator */ "eslint-plugin-unicorn/prefer-exponentiation-operator"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map */ "eslint-plugin-unicorn/prefer-flat-map"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append */ "eslint-plugin-unicorn/prefer-node-append"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove */ "eslint-plugin-unicorn/prefer-node-remove"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own */ "eslint-plugin-unicorn/prefer-object-has-own"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all */ "eslint-plugin-unicorn/prefer-replace-all"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with */ "eslint-plugin-unicorn/prefer-starts-ends-with"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content */ "eslint-plugin-unicorn/prefer-text-content"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end */ "eslint-plugin-unicorn/prefer-trim-start-end"?: { [k: string]: unknown; }; /** * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand */ "eslint-plugin-unicorn/regex-shorthand"?: { [k: string]: unknown; }; /** * Enforce linebreaks after opening and before closing array brackets in `