Skip to content

Commit

Permalink
Merge pull request #5 from nrccua/E4E-30
Browse files Browse the repository at this point in the history
[E4E-30]: 1.0.11
  • Loading branch information
TheCleric authored Nov 21, 2021
2 parents 7a655df + d6c1039 commit 3ebd56f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.0.11](https://github.com/nrccua/apollo-rest-utils/compare/1.0.10...1.0.11) (2021-11-21)


### Changes

* [E4E-30]:ApolloClient<object> ([ae6db2a](https://github.com/nrccua/apollo-rest-utils/commit/ae6db2a5c13366b7df670b501b1d4f14460f8308))
* [E4E-30]: 1.0.10 ([6bce871](https://github.com/nrccua/apollo-rest-utils/commit/6bce871f8c23f80affc1493a5f75463995e09203))

### [1.0.10](https://github.com/nrccua/apollo-rest-utils/compare/1.0.9...1.0.10) (2021-11-21)


Expand Down
7 changes: 3 additions & 4 deletions lib/useRestQuery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ export function wrapRestQuery<TName extends string>() {

export function useRestClientQuery<TName extends string, TData, TVariables>(
options: IEndpointOptions<NamedGQLResult<TName, TData>, TVariables | Input<TVariables>> &
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryOptions<TVariables, NamedGQLResult<TName, TData>> & { client: ApolloClient<any> },
QueryOptions<TVariables, NamedGQLResult<TName, TData>> & { client: ApolloClient<object> },
): Promise<ApolloQueryResult<NamedGQLResult<TName, TData>>> {
validateQueryAgainstEndpoint(options.query, options.endpoint);
const directives = (options.query.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[];
Expand Down Expand Up @@ -222,11 +221,11 @@ export function useRestClientQuery<TName extends string, TData, TVariables>(
export function wrapRestClientQuery<TName extends string>() {
return <TData, TVariables>(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
options: IEndpointOptions<TData, TVariables> & QueryOptions<TVariables, TData> & { client: ApolloClient<any> },
options: IEndpointOptions<TData, TVariables> & QueryOptions<TVariables, TData> & { client: ApolloClient<object> },
): Promise<ApolloQueryResult<NamedGQLResult<TName, TData>>> =>
useRestClientQuery(
options as unknown as IEndpointOptions<NamedGQLResult<TName, TData>, TVariables | Input<TVariables>> &
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryOptions<TVariables, NamedGQLResult<TName, TData>> & { client: ApolloClient<any> },
QueryOptions<TVariables, NamedGQLResult<TName, TData>> & { client: ApolloClient<object> },
);
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
"test:unit": "NODE_ENV=test jest --silent --coverage",
"update:version": "standard-version"
},
"version": "1.0.10"
"version": "1.0.11"
}

0 comments on commit 3ebd56f

Please sign in to comment.