包详细信息

@urql/vue

urql-graphql64.1kMIT2.0.0

A highly customizable and versatile GraphQL client for vue

graphql client, state management, cache, graphql

自述文件

Installation

yarn add @urql/vue graphql
# or
npm install --save @urql/vue graphql

Note: @urql/vue has a peer dependency on vue@^3.0.0 (Not v2) and doesn't currently plan to be backwards compatible to Vue 2.

更新日志

@urql/vue

2.0.0

Major Changes

  • Bump Vue to 3.2+ and replace getCurrentInstance with getCurrentScope Submitted by @arkandias (See #3806)

Minor Changes

  • Fix regression breaking variables typing Submitted by @arkandias (See #3734)

Patch Changes

  • Updated dependencies (See #3789 and #3807)
    • @urql/core@6.0.0

1.4.3

Patch Changes

  • Omit minified files and sourcemaps' sourcesContent in published packages Submitted by @kitten (See #3755)
  • Updated dependencies (See #3755)
    • @urql/core@5.1.1

1.4.2

Patch Changes

  • Add type for hasNext to the query and mutation results Submitted by @JoviDeCroock (See #3703)

1.4.1

Patch Changes

  • Use shallowRef for data variable to avoid extra overhead for heavy objects Submitted by @yurks (See #3641)

1.4.0

Minor Changes

  • Refactor composable functions with a focus on avoiding memory leaks and Vue best practices Submitted by @yurks (See #3619)

1.3.2

Patch Changes

  • ⚠️ Fix deep options reactivity for subscriptions Submitted by @JoviDeCroock (See #3616)

1.3.1

Patch Changes

1.3.0

Minor Changes

  • Use shallowRef to avoid creating deeply reactive objects for heavy objects Submitted by @negezor (See #3611)
  • Remove wrapping request args in reactive to fix memory leak Submitted by @negezor (See #3612)

1.2.2

Patch Changes

1.2.1

Patch Changes

  • ⚠️ Fix regression causing pause argument on useQuery and useSubscription to not be reactive Submitted by @arkandias (See #3595)

1.2.0

Minor Changes

  • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)

Patch Changes

  • ⚠️ Fix subscription handlers to not receive null values Submitted by @kitten (See #3581)
  • Add missing support for getter functions as input arguments values to useQuery, useSubscription, and useMutation Submitted by @kitten (See #3582)

1.1.3

Patch Changes

1.1.2

Patch Changes

  • Update build process to generate correct source maps Submitted by @kitten (See #3201)
  • Prevent multiple operations being executed in a row when multiple inputs change simultaneously (e.g. isPaused and query inputs) Submitted by @kitten (See #3231)

1.1.1

Patch Changes

  • Publish with npm provenance Submitted by @kitten (See #3180)

1.1.0

Minor Changes

  • Allow mutations to update their results in bindings when hasNext: true is set, which indicates deferred or streamed results Submitted by @kitten (See #3103)

Patch Changes

1.0.5

Patch Changes

  • Allow a Client provided using provideClient to be used in the same component it's been provided in Submitted by @kitten (See #3018)
  • ⚠️ Fix type utilities turning the variables properties optional when a type from TypedDocumentNode has no Variables or all optional Variables. Previously this would break for wrappers, e.g. in code generators, or when the type didn't quite match what we'd expect Submitted by @kitten (See #3022)
  • Updated dependencies (See #3007, #2962, #3007, #3015, and #3022)
    • @urql/core@3.2.0

1.0.4

Patch Changes

  • ⚠️ Fix type-generation, with a change in TS/Rollup the type generation took the paths as src and resolved them into the types dir, by @JoviDeCroock (See #2870)
  • Updated dependencies (See #2872, #2870, and #2871)
    • @urql/core@3.1.1

1.0.3

Patch Changes

  • Move remaining Variables generics over from object default to Variables extends AnyVariables = AnyVariables. This has been introduced previously in #2607 but some missing ports have been missed due to TypeScript not catching them previously. Depending on your TypeScript version the object default is incompatible with AnyVariables, by @kitten (See #2843)
  • Updated dependencies (See #2843, #2847, #2850, and #2846)
    • @urql/core@3.1.0

1.0.2

Patch Changes

  • ⚠️ Fix an issue that caused useQuery to fail for promise-based access, if a result is delivered by the Client immediately, by @kitten (See #2629)

1.0.1

Patch Changes

  • Tweak the variables type for when generics only contain nullable keys, by @JoviDeCroock (See #2623)

1.0.0

Major Changes

  • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
  • Implement stricter variables types, which require variables to always be passed and match TypeScript types when the generic is set or inferred. This is a breaking change for TypeScript users potentially, unless all types are adhered to, by @kitten (See #2607)
  • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

Patch Changes

0.6.4

Patch Changes

  • Allow Vue 2.7 as peer dependency to prevent peer dependency errors e.g. with pnpm, by @dargmuesli (See #2561)

0.6.3

Patch Changes

  • ⚠️ Fix Node.js ESM re-export detection for @urql/core in urql package and CommonJS output for all other CommonJS-first packages. This ensures that Node.js' cjs-module-lexer can correctly identify re-exports and report them properly. Otherwise, this will lead to a runtime error, by @kitten (See #2485)

0.6.2

Patch Changes

  • ⚠️ Fix wait for the first non-stale result when using await executeQuery, by @JoviDeCroock (See #2410)

0.6.1

Patch Changes

  • Extend peer dependency range of graphql to include ^16.0.0. As always when upgrading across many packages of urql, especially including @urql/core we recommend you to deduplicate dependencies after upgrading, using npm dedupe or npx yarn-deduplicate, by @kitten (See #2133)
  • Updated dependencies (See #2133)
    • @urql/core@2.3.6

0.6.0

Minor Changes

  • Provide the client as a ref so it can observe changes. This change is potentially breaking for anyone using the useClient import as it will now return a Ref<Client> rather than a Client, by @JoviDeCroock (See #2047)

Patch Changes

  • Updated dependencies (See #2027 and #1998)
    • @urql/core@2.3.4

0.5.0

Minor Changes

  • Allow passing in a Ref of client to provideClient and install, by @JoviDeCroock (See #1962)

Patch Changes

  • Updated dependencies (See #1944)
    • @urql/core@2.3.2

0.4.3

Patch Changes

  • Unwrap the variables proxy before we send it into the client, by @JoviDeCroock (See #1810)

0.4.2

Patch Changes

  • Refactor useQuery implementation to utilise the single-source implementation of @urql/core@2.1.0. This should improve the stability of promisified useQuery() calls and prevent operations from not being issued in some edge cases, by @kitten (See #1758)
  • Updated dependencies (See #1776 and #1755)
    • @urql/core@2.1.5

0.4.1

Patch Changes

  • Use client.executeMutation rather than client.mutation in useMutation, by @JoviDeCroock (See #1680)
  • Updated dependencies (See #1709)
    • @urql/core@2.1.4

0.4.0

Minor Changes

  • A useClientHandle() function has been added. This creates a handle on which all use* hooks can be called, like await handle.useQuery(...) or await handle.useSubscription(...) which is useful for sequentially chaining hook calls in an async setup() function or preserve the right instance of a Client across lifecycle hooks, by @kitten (See #1599)

Patch Changes

  • Remove closure-compiler from the build step (See #1570)
  • The useClient() function will now throw a more helpful error when it's called outside of any lifecycle hooks, by @kitten (See #1599)
  • Updated dependencies (See #1570, #1509, #1600, and #1515)
    • @urql/core@2.1.0

0.3.0

Minor Changes

  • Breaking: Remove pollInterval option from useQuery. Please consider adding an interval manually calling executeQuery(), by @kitten (See #1374)
  • Remove deprecated operationName property from Operations. The new Operation.kind property is now preferred. If you're creating new operations you may also use the makeOperation utility instead. When upgrading @urql/core please ensure that your package manager didn't install any duplicates of it. You may deduplicate it manually using npx yarn-deduplicate (for Yarn) or npm dedupe (for npm), by @kitten (See #1357)

Patch Changes

0.2.1

Patch Changes

  • Add a built-in gql tag function helper to @urql/core. This behaves similarly to graphql-tag but only warns about locally duplicated fragment names rather than globally. It also primes @urql/core's key cache with the parsed DocumentNode, by @kitten (See #1187)
  • Updated dependencies (See #1187, #1186, and #1186)
    • @urql/core@1.16.0

0.2.0

Minor Changes

  • Export a Vue plugin function as the default export, by @LinusBorg (See #1152)
  • Refactor useQuery to resolve the lazy promise for Vue Suspense to the latest result that has been requested as per the input to useQuery, by @kitten (See #1162)

Patch Changes

  • ⚠️ Fix pausing feature of useQuery by turning isPaused into a ref again, by @LinusBorg (See #1155)
  • ⚠️ Fix implementation of Vue's Suspense feature by making the lazy PromiseLike on the returned state passive, by @kitten (See #1159)

0.1.0

Initial release