fix slop code, by slop066543614 hours ago107 lines · 3.4 KB | 1 | import { Args, Context, Mutation, Resolver } from '@nestjs/graphql'; |
| 2 | import { AllowAnonymous } |
| 3 | |
| 4 | import type { GraphqlContext |
| 5 | import type { GithubViewer |
| 6 | import { Viewer } |
| 7 | import * as M |
| 8 | import { IssueMutationsService } |
| 9 | |
| 10 | @Resolver() |
| 11 | @AllowAnonymous() |
| 12 | export class IssueMutationsResolver |
| 13 | constructor(private readonly |
| 14 | |
| 15 | @Mutation(() => |
| 16 | createIssue( |
| 17 | @Args('input' |
| 18 | @Viewer() viewer |
| 19 | @Context() context |
| 20 | ) { |
| 21 | return this.mutations |
| 22 | } |
| 23 | |
| 24 | @Mutation(() => |
| 25 | updateIssue( |
| 26 | @Args('input' |
| 27 | @Viewer() viewer |
| 28 | @Context() context |
| 29 | ) { |
| 30 | return this.mutations |
| 31 | } |
| 32 | |
| 33 | @Mutation(() => |
| 34 | closeIssue( |
| 35 | @Args('input' |
| 36 | @Viewer() viewer |
| 37 | @Context() context |
| 38 | ) { |
| 39 | return this.mutations |
| 40 | } |
| 41 | |
| 42 | @Mutation(() => |
| 43 | reopenIssue( |
| 44 | @Args('input' |
| 45 | @Viewer() viewer |
| 46 | @Context() context |
| 47 | ) { |
| 48 | return this.mutations |
| 49 | } |
| 50 | |
| 51 | @Mutation(() => |
| 52 | addComment( |
| 53 | @Args('input' |
| 54 | @Viewer() viewer |
| 55 | @Context() context |
| 56 | ) { |
| 57 | return this.mutations |
| 58 | } |
| 59 | |
| 60 | @Mutation(() => |
| 61 | addLabelsToLabelable( |
| 62 | @Args('input' |
| 63 | @Viewer() viewer |
| 64 | @Context() context |
| 65 | ) { |
| 66 | return this.mutations |
| 67 | } |
| 68 | |
| 69 | @Mutation(() => |
| 70 | removeLabelsFromLabelable( |
| 71 | @Args('input' |
| 72 | @Viewer() viewer |
| 73 | @Context() context |
| 74 | ) { |
| 75 | return this.mutations |
| 76 | input, |
| 77 | viewer, |
| 78 | context.loaders, |
| 79 | ); |
| 80 | } |
| 81 | |
| 82 | @Mutation(() => |
| 83 | addAssigneesToAssignable( |
| 84 | @Args('input' |
| 85 | @Viewer() viewer |
| 86 | @Context() context |
| 87 | ) { |
| 88 | return this.mutations |
| 89 | input, |
| 90 | viewer, |
| 91 | context.loaders, |
| 92 | ); |
| 93 | } |
| 94 | |
| 95 | @Mutation(() => |
| 96 | removeAssigneesFromAssignable( |
| 97 | @Args('input' |
| 98 | @Viewer() viewer |
| 99 | @Context() context |
| 100 | ) { |
| 101 | return this.mutations |
| 102 | input, |
| 103 | viewer, |
| 104 | context.loaders, |
| 105 | ); |
| 106 | } |
| 107 | } |
from
'
@thallesp/nestjs-better-auth
'
;
}
from
'
../../../../lib/github/loaders.js
'
;
}
from
'
../../../auth/github-request.js
'
;
from
'
../../../auth/viewer.decorator.js
'
;
from
'
../../types/mutations.type.js
'
;
from
'
./issue-mutations.service.js
'
;
{
mutations
:
IssueMutationsService
)
{}
M
.
CreateIssuePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
CreateIssueInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
createIssue
(
input
,
viewer
,
context
.
loaders
)
;
M
.
UpdateIssuePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
UpdateIssueInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
updateIssue
(
input
,
viewer
,
context
.
loaders
)
;
M
.
CloseIssuePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
CloseIssueInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
closeIssue
(
input
,
viewer
,
context
.
loaders
)
;
M
.
ReopenIssuePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
ReopenIssueInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
reopenIssue
(
input
,
viewer
,
context
.
loaders
)
;
M
.
AddCommentPayload
,
{
nullable
:
true
}
)
)
input
:
M
.
AddCommentInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
addComment
(
input
,
viewer
,
context
.
loaders
)
;
M
.
AddLabelsToLabelablePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
AddLabelsToLabelableInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
addLabelsToLabelable
(
input
,
viewer
,
context
.
loaders
)
;
M
.
RemoveLabelsFromLabelablePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
RemoveLabelsFromLabelableInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
removeLabelsFromLabelable
(
M
.
AddAssigneesToAssignablePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
AddAssigneesToAssignableInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
addAssigneesToAssignable
(
M
.
RemoveAssigneesFromAssignablePayload
,
{
nullable
:
true
}
)
)
input
:
M
.
RemoveAssigneesFromAssignableInput
,
:
GithubViewer
|
null
,
:
GraphqlContext
,
.
removeAssigneesFromAssignable
(