apollo

🚀 Apollo/GraphQL integration for VueJS

MIT License

Stars
6K
Committers
139

Bot releases are hidden (Show)

apollo -

Published by Akryum almost 3 years ago

Fixed

  • Fixed subscription error handling to work around some Apollo Client inconsistencies, errors should now be correctly handled by vue-apollo
  • Subscriptions now automatically restart on error just like queries, closes #877
  • $skipAllQueries and $skipAllSubscriptions now work on initial component mount
apollo -

Published by Akryum about 3 years ago

Fixed

  • fix(smart apollo): ensure SmartQuery variables still function when watched expression evaluated (#1161)
  • fix(types): add throttle and debounce options #1257
apollo -

Published by Akryum over 3 years ago

Fixed

  • fix(smart query): initial data not retrieved from cache if query was fetched already once (only on Apollo Client 3)
apollo -

Published by Akryum over 3 years ago

Fixed

  • ApolloQuery: null error in isDataFilled, closes #933
  • removed unnecessary loading check (#1111)

New

  • types: allow pass generic type to ObservableQuery (#1103)
apollo -

Published by Akryum about 4 years ago

Fixed

  • smartquery: pass through error to rejection (#874)
  • ApolloMutation: missing context prop
  • ApolloMutation: return promise from mutate
  • typings improvements
apollo - v3.0.4

Published by Akryum about 4 years ago

Fixed

  • Security: Upgrade serialize-javascript to 4.0.0 to resolve https://nvd.nist.gov/vuln/detail/CVE-2020-7660 Fixes #993 (#1008)
  • Apollo Client 3 support: use getCurrentResult (#981)
  • Cannot Re-assign $apollo, closes #924 (#930)
  • check errors.length on array (#984)
  • SSR: ignore pollInterval on server (#908)
  • SSR: reject serverPrefetch with error (#901)
  • Remove .gql/.graphql types (#881)

For Typescript users, if you get errors with your .gql files, you can add a gql.d.ts file in your sources folder with the following content:

declare module '*.gql' {
  import { DocumentNode } from 'graphql'

  const content: DocumentNode
  export default content

}

declare module '*.graphql' {
  import { DocumentNode } from 'graphql'

  const content: DocumentNode
  export default content
}
apollo -

Published by Akryum over 4 years ago

Fixed

  • ssr: components with inline templates crashing, closes #879
apollo - v4.0.0-alpha.5

Published by Akryum almost 5 years ago

Fixed

  • useSbuscription: currentOptions undefined error, closes #903
  • useMutation: useMutation not taking a Ref (#892)
  • useMutation: "mutate" optional arguments (#893)
  • ts: Add full test coverage for TypeScript hook types & fix missing overloads (#895)
apollo -

Published by Akryum almost 5 years ago

Fixed

  • useResult type inferring 'any' (#872)
  • useMutation cleanup on unmount
  • loading tracking not cleanup correctly on component unmount
apollo -

Published by Akryum almost 5 years ago

Fixed

@vue/apollo-composable

  • useQuery: Fixed throttle and debounce not being initially applied
  • useQuery & useSubscription: enabled not working in some cases
apollo -

Published by Akryum almost 5 years ago

New

@vue/apollo-composable

  • New overrideOptions parameter on mutate returned by useMutation

Fixed

@vue/apollo-composable

  • Fixed useXXXLoading functions not working correctly
apollo -

Published by Akryum almost 5 years ago

V4 Alpha is now live! It is full packed with changes, most notably an entirely new API based on the new Vue Composition API. This releases prepares the future full v4 release which will be streamlined and lighter.

Although the alpha is already quite extensively tested, it is not recommended to use it in production just yet. We will do our best to have the least number of breaking changes during the development cycle, but it can still happen until the beta when the API will be stable.

Documentation preview lives here: https://v4.apollo.vuejs.org/

BREAKING CHANGES

  • Packages are now split:
    • @vue/apollo-option: Classic Option API
    • @vue/apollo-components: Apollo Components such as <ApolloQuery>
    • @vue/apollo-composable (NEW): Composition API
    • @vue/apollo-ssr: SSR utils
    • @vue/apollo-util (NEW): Apollo-related utils (such as error formatter)
  • This also means setup have changed, you need to update your imports
  • If you want to register the Apollo Components globally, you can enable the components plugin alongside the Classic one:
import VueApolloOption from '@vue/apollo-option'
import VueApolloComponents from '@vue/apollo-components'

Vue.use(VueApolloOption)
Vue.use(VueApolloComponents)
  • The SSR utility functions now accept an object of ApolloClient instead of an ApolloProvider (which is deprecated).

Before:

ApolloSSR.getStates(apolloProvider)

After:

ApolloSSR.getStates({
  defaultClient: apolloClient
})

Or:

ApolloSSR.getStates(apolloProvider.clients)

New

  • New API based on Vue Composition API (docs).
apollo -

Published by Akryum almost 5 years ago

Fixed

  • fix(ts): types file name gql.ts to gql.d.ts (#864)
  • wrong license in package.json
apollo -

Published by Akryum almost 5 years ago

Fixed

  • destroy apollo after render, closes #852
  • check errors.length is not 0 before throwing error
apollo -

Published by Akryum almost 5 years ago

New

  • Send the query key as argument to the skip fn (#810)
  • error handlers: added vm, key, type, options arguments

Fixed

  • compile for...of to plain for loops (#813)
  • ts: import gql files, closes Akryum/vue-cli-plugin-apollo#180
  • ts: DataDef not defined error
  • smart query: now supports errorPolicy, closes #526
  • SSR: memory leak, closes nuxt-community/apollo-module#231
apollo -

Published by Akryum about 5 years ago

Fixed

  • SSR: don't apply debounce/throttle on server, closes #599
  • $query wasn't merged, closes #638
  • simple queries should inherit global options, closes #637
  • don't add default client if not defined, closes #548
  • should properly stop and restart subcribe to more subs after query is restarted, closes #677
apollo -

Published by Akryum about 5 years ago

Fixed

  • types: allow typing this in the apollo option in decorator, closes #780
  • types: allow typing the variables for VueApolloQueryDefinition, closes #787

Known issues

  • types: Using the array notation for subscribeToMore may not infer this correctly because of an issue in TypeScript. Workaround: use a function to return the whole query definition and use arrow functions (example).
apollo -

Published by Akryum about 5 years ago

Fixed

  • types: apollo methods generics, fixes #773
apollo -

Published by Akryum about 5 years ago

Fixed

  • Types: missing client option on $subscribe
apollo -

Published by Akryum about 5 years ago

Potential breaking changes

  • TypeScript users please read : Types have been almost entirely rewritten, which fixes a lot of issues with typing. But it may also throw errors that weren't catched before, especially if you don't annotate return types in reactive functions, see example. I'm very sorry for the potential breaking changes in a Release Candidate, but it's a necessary evil for the upcoming stable release.

New

  • Reactive pollInterval (#613) closes #453
  • Add global prefetch ApolloProvider option (#710)

Fixed

  • Externalize apollo and graphql libraries (#722)
Package Rankings
Top 3.79% on Proxy.golang.org
Badges
Extracted from project README
Related Projects