Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 47670de

Browse files
committed
prettier
1 parent 4af2360 commit 47670de

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/pages/docs/transport/graphql.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ app.use(
117117
);
118118
```
119119

120-
121120
## Authenticating Resolvers
122121

123122
You can authenticate your own resolvers with `JSAccounts` authentication flow, by using `authenticated` method from this package.
@@ -132,10 +131,13 @@ import { authenticated } from '@accounts/graphql-api';
132131

133132
export const resolver = {
134133
Mutation: {
135-
updateUserProfile: authenticated(AccountsServer, (rootValue, args, context) => {
136-
// Write your resolver here
137-
// context.user - the current authenticated user!
138-
}),
134+
updateUserProfile: authenticated(
135+
AccountsServer,
136+
(rootValue, args, context) => {
137+
// Write your resolver here
138+
// context.user - the current authenticated user!
139+
}
140+
),
139141
},
140142
};
141143
```
@@ -234,7 +236,7 @@ const accountsGraphQL = new GraphQLClient({
234236
});
235237
```
236238

237-
## Using with Apollo Link
239+
## Using with Apollo Link
238240

239241
In order to send the accounts token on every request sent to your GraphQL server, apollo requires you to implment an apollo-link. This link is usually quite generic when using accounts-js so we've implmeneted the apollo-link you need and offer it as a utility package.
240242

@@ -256,4 +258,4 @@ export const apolloClient = new ApolloClient({
256258
link: ApolloLink.from([authLink, httpLink]),
257259
cache,
258260
});
259-
```
261+
```

0 commit comments

Comments
 (0)