Skip to content

fetchPolicy and nextFetchPolicy have fixed values for PreloadQuery #429

Open
@addemod

Description

@addemod

When using the PreloadQuery, you will get a TypeScript error if you're trying to set the value of fetchPolicy to something other than cache-first.
nextFetchPolicy is typed to always be undefined.

type RestrictedPreloadOptions = {
    fetchPolicy?: "cache-first";
    returnPartialData?: false;
    nextFetchPolicy?: undefined;
    pollInterval?: undefined;
};
type PreloadQueryOptions<TVariables, TData> = QueryOptions<TVariables, TData> & RestrictedPreloadOptions;

Is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions