Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds interface to allow for specification of IDs on Apollo Client #2274

Merged
merged 5 commits into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change log

### vNEXT
- Fix the ability to specify IDs in Apollo configuration to tell queries about updates when new information becomes available [PR #2274](https://github.com/apollographql/apollo-client/pull/2274)
- Fix response not being included with errors that have response body [PR #2239](https://github.com/apollographql/apollo-client/pull/2239)

- Allow conditional refetchQueries [PR #2234](https://github.com/apollographql/apollo-client/pull/2234)
Expand Down
8 changes: 7 additions & 1 deletion src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ export enum FetchType {
poll = 3,
}

export type IdGetter = (value: Object) => string | null | undefined;
export interface IdGetterObj extends Object {
__typename?: string;
id?: string;
}
export declare type IdGetter = (
value: IdGetterObj,
) => string | null | undefined;