Apollo-client: FetchPolicy is not documented

Created on 26 Apr 2017  路  11Comments  路  Source: apollographql/apollo-client

Intended outcome:

I viewed the API reference for apollo-client, and discovered the new fetchPolicy option for queries. The option attempts to link to documentation for FetchPolicy, and I would expect that link to work and describe the feature in more detail (including the ramifications of each possible setting).

Actual outcome:

The documentation for FetchPolicy does not actually exist. I guess it should be here, but it's not: http://dev.apollodata.com/core/apollo-client-api.html#FetchPolicy

How to reproduce the issue:

View the apollo-client API docs (such as for watchQuery) and click FetchPolicy. Note that the page doesn't update because the section doesn't exist in the docs.

Most helpful comment

All 11 comments

I've had similar issues finding this documentation. It does exist, but it's tough to get to:
http://dev.apollodata.com/react/api-queries.html#graphql-config-options-fetchPolicy

Ah, it's only documented in the React section :) thanks for sharing that link.

In either case it needs to be explained in the main API docs and the link in the docs should work too.

yeah, this is very unfortunate. Nevertheless, there's already an open issue in apollographql/core-docs#273 so I'm closing this in favor of it 馃檪

Should this be re-opened since core-docs is deprecated? I still can't find any docs for it.

edit: found this in source but can't find it in the docs website anywhere: https://github.com/apollographql/apollo-client/blob/776dd34c2232dfdb7ba04166900bf851f26c5072/packages/apollo-client/src/core/watchQueryOptions.ts#L10

It actually is documented, but finding it wasn鈥檛 easy. https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-config-options-fetchPolicy

I think that we need to add the link to reference API from the main query page:
https://www.apollographql.com/docs/react/api/react-apollo#query-props

This page list options but on a very limited basis.

I don't think this should be documented in react-apollo at all, unless it's react-only?

As far I see there is no documentation for plain js client and Apollo documents top level frameworks like React, Angular etc. Any documentation for common parameters will be duplicated across these platforms.

@Sunhat Bozos ??

All links posted here seem to be broken, and I still can't find what each fetchPolicy does :(

Was this page helpful?
0 / 5 - 0 ratings