Skip to content

Update typed apollo provider #273

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

Merged
merged 4 commits into from
May 21, 2018

Conversation

joe-re
Copy link
Contributor

@joe-re joe-re commented May 7, 2018

Update type definition according to the below commit.
6650430

changes

  • remove apolloProvider propery from ComponentOptions extended.
  • add prefetch props to apollo query option.
  • add below APIs to ApolloProvider(VueApollo default exported).
    • provide: (key?: string) => this
    • prefetchAll: (context: any, components: VueApolloComponent[], options?: { includeGlobal?: boolean }) => Promise<ApolloQueryResult[]>
    • getStates(options?: { exportNamespace?: string }): { [key: string]: any }
    • exportStates(oprions?: { globalName?: string, attachTo?: string, exportNamespace?: string}): string

skip?: (this: ApolloVueThisType<V>) => boolean | boolean;
manual?: boolean;
subscribeToMore?: ApolloVueSubscribeToMoreOptions<V> | ApolloVueSubscribeToMoreOptions<V>[];
prefetch?: (context: any) => boolean | boolean;
Copy link
Contributor Author

@joe-re joe-re May 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file changes are just moved from vue-apollo.d.ts to be easy to read, but only add prefetch props.

@0xthc 0xthc mentioned this pull request May 15, 2018
@Akryum Akryum merged commit 2cbf10d into vuejs:master May 21, 2018
@Akryum
Copy link
Member

Akryum commented May 21, 2018

Awesome! 👍

@joe-re joe-re deleted the update-typed-apollo-provider branch November 18, 2018 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants