Skip to content

Commit 90ce2a4

Browse files
committed
Correct some typos in lib
1 parent be81c75 commit 90ce2a4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/lib/graphql/AbstractGraphQLHooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { UserError } from './graphql-error-handling';
33
export abstract class AbstractGraphQLHooks<TContext, TResult, TArgs> {
44

55
/**
6-
* This is our before hook. Here you are able
6+
* This is our before hook. Here we are able
77
* to alter the args object before the actual resolver(execute)
88
* will be called.
99
*/
@@ -12,15 +12,15 @@ export abstract class AbstractGraphQLHooks<TContext, TResult, TArgs> {
1212
}
1313

1414
/**
15-
* This our after hook. It will be called ater the actual resolver(execute).
15+
* This is our after hook. It will be called ater the actual resolver(execute).
1616
* There you are able to alter the result before it is send to the client.
1717
*/
1818
public after<S>(result: TResult, context: TContext, args?: TArgs, source?: S): Promise<TResult> | TResult {
1919
return result;
2020
}
2121

2222
/**
23-
* This our resolver, which should gather the needed data;
23+
* This is our resolver, which should gather the needed data;
2424
*/
2525
public run<S>(rootOrSource: S, args: TArgs, context: TContext): Promise<TResult> | TResult {
2626
throw new UserError('Query not implemented!');

src/lib/graphql/AbstractGraphQLQuery.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import { AbstractGraphQLHooks } from './AbstractGraphQLHooks';
44
export abstract class AbstractGraphQLQuery<TContext, TResult, TArgs> extends AbstractGraphQLHooks<TContext, TResult, TArgs> {
55

66
/**
7-
* This will be called by graphQL and they need to have it not as a
8-
* member function of this class. We use this hook to add some more logic
9-
* to it, like permission checking and before and after hooks to alter some data.
7+
* This will be called by graphQL and they need it as a property function.
8+
* We use this hook to add some more logic to it,
9+
* like permission checking, before- and after hooks to alter some data.
1010
*/
1111
public resolve = async <S>(root: S, args: TArgs, context: TContext): Promise<TResult> => {
1212
// We need to store the query arguments in the context so they can be accessed by subsequent resolvers
1313
(context as any).resolveArgs = args;
1414
args = await this.before(context, args);
1515
let result = await this.run<S>(root, args, context);
1616
result = await this.after(result, context, args);
17-
return (result as TResult);
17+
return result as TResult;
1818
}
1919

2020
}

src/lib/graphql/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export * from './graphql-error-handling';
2828
// -------------------------------------------------------------------------
2929

3030
/**
31-
* Creates a new dataloader wiht the typorm repository
31+
* Creates a new dataloader with the typorm repository
3232
*/
3333
export function createDataLoader<T>(obj: ObjectType<T>, method?: string, key?: string): DataLoader<any, any> {
3434
let repository;

0 commit comments

Comments
 (0)