@urql/exchange-auth
Advanced tools
Comparing version 0.1.3 to 0.1.4
# Changelog | ||
## 0.1.4 | ||
### Patch Changes | ||
- Allow `mutate` to infer the result's type when a `TypedDocumentNode` is passed via the usual generics, like `client.mutation` for instance, by [@younesmln](https://github.com/younesmln) (See [#1796](https://github.com/FormidableLabs/urql/pull/1796)) | ||
## 0.1.3 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Operation, OperationContext, OperationResult, CombinedError, Exchange } from '@urql/core'; | ||
import { Operation, OperationContext, OperationResult, CombinedError, Exchange, TypedDocumentNode } from '@urql/core'; | ||
import { DocumentNode } from 'graphql'; | ||
@@ -23,5 +23,5 @@ export interface AuthConfig<T> { | ||
/** The mutate() method may be used to send one-off mutations to the GraphQL API for the purpose of authentication. */ | ||
mutate<Data = any, Variables extends object = {}>(query: DocumentNode | string, variables?: Variables, context?: Partial<OperationContext>): Promise<OperationResult<Data>>; | ||
mutate<Data = any, Variables extends object = {}>(query: DocumentNode | TypedDocumentNode<Data, Variables> | string, variables?: Variables, context?: Partial<OperationContext>): Promise<OperationResult<Data>>; | ||
}): Promise<T | null>; | ||
} | ||
export declare function authExchange<T>({ addAuthToOperation, getAuth, didAuthError, willAuthError, }: AuthConfig<T>): Exchange; |
{ | ||
"name": "@urql/exchange-auth", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "An exchange for managing authentication and token refresh in urql", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49929
1