Skip to content
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

Fix apollo-link-accounts types #382

Merged
merged 1 commit into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/apollo-link-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"license": "MIT",
"devDependencies": {
"@accounts/client": "^0.3.0-beta.21",
"apollo-link": "^1.2.2",
"rimraf": "2.6.2"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/apollo-link-accounts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { setContext } from 'apollo-link-context';
import { ApolloLink } from 'apollo-link';
import { AccountsClient } from '@accounts/client';

export const accountsLink = (accountsClient: AccountsClient) => {
export const accountsLink = (accountsClient: AccountsClient): ApolloLink => {
return setContext(async (_, { headers }) => {
const tokens = await accountsClient.refreshSession();
return {
Expand Down
6 changes: 5 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,14 @@
"@types/events" "*"
"@types/node" "*"

"@types/node@*", "@types/[email protected]", "@types/node@9.6.7", "@types/node@^9.4.6":
"@types/node@*", "@types/[email protected]", "@types/node@^9.4.6":
version "9.6.15"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.15.tgz#8a5a313ea0a43a95277235841be5d3f5fb3dfeda"

"@types/[email protected]":
version "9.6.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.7.tgz#5f3816d1db2155edcde1b2e3aa5d0e5c520cb564"

"@types/[email protected]":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@types/oauth/-/oauth-0.9.0.tgz#d6af31f8aa92a964ba061f189880197b456c6667"
Expand Down