Merged
Conversation
felipesabino
approved these changes
Nov 23, 2017
| * ``` | ||
| * @param option Options for an Schema | ||
| */ | ||
| export function After(option: AfterOption | AfterMiddleware) { |
There was a problem hiding this comment.
I noticed that this is similar to the @Before decorator implementation and I used the BeforeOption | BeforeMiddleware there just to keep it compatible with previous implementation but I wouldn't mind changing/breaking it to always be just BeforeOption.
Anyway, I guess we can have just AfterOption here to make it similar to other decorator and plan to change the @Before to have just BeforeOption as argument. What do you think?
| describe('Pagination', function () { | ||
|
|
||
| it('returns a GraphQL Pagination object with custom @OrberBy fields', async function () { | ||
| it('returns a GraphQL Pagination object with custom @OrderBy fields', async function () { |
| * | ||
| * Usage example: | ||
| * ``` | ||
| * let middleware: AfterMiddleware = (context: any, args: { [key: string]: any }, next: (error?: Error, value?: any) => any): any => { |
There was a problem hiding this comment.
I guess it is missing result for the middleware arguments here, isn't it?
| @@ -1 +1,8 @@ | |||
| export type Middleware = (context: any, args: { [key: string]: any }, next: (error?: Error, value?: any) => any) => Promise<any> | any; | |||
There was a problem hiding this comment.
Could you please also rename Middleware to BeforeMiddleware?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Afterdecorator - Create After Decorator #53@Afterto Improve documentation #23 issue description for future improvement