Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
45c907e1
Commit
45c907e1
authored
Nov 10, 2021
by
Fernando Arias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working corpus commit
* Add constant and ID utility function
parent
d35eea3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
app/assets/javascripts/graphql_shared/constants.js
app/assets/javascripts/graphql_shared/constants.js
+1
-0
ee/app/assets/javascripts/security_configuration/corpus_management/graphql/resolvers/resolvers.js
...guration/corpus_management/graphql/resolvers/resolvers.js
+3
-1
No files found.
app/assets/javascripts/graphql_shared/constants.js
View file @
45c907e1
...
...
@@ -15,3 +15,4 @@ export const TYPE_USER = 'User';
export
const
TYPE_VULNERABILITY
=
'
Vulnerability
'
;
export
const
TYPE_NOTE
=
'
Note
'
;
export
const
TYPE_DISCUSSION
=
'
Discussion
'
;
export
const
TYPE_PACKAGES_PACKAGE
=
'
Packages::Package
'
;
ee/app/assets/javascripts/security_configuration/corpus_management/graphql/resolvers/resolvers.js
View file @
45c907e1
...
...
@@ -6,6 +6,8 @@ import getCorpusesQuery from '../queries/get_corpuses.query.graphql';
import
updateProgress
from
'
../mutations/update_progress.mutation.graphql
'
;
import
uploadComplete
from
'
../mutations/upload_complete.mutation.graphql
'
;
import
corpusCreate
from
'
../mutations/corpus_create.mutation.graphql
'
;
import
{
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
TYPE_PACKAGES_PACKAGE
}
from
'
~/graphql_shared/constants
'
;
export
default
{
Query
:
{
...
...
@@ -60,7 +62,7 @@ export default {
client
.
mutate
({
mutation
:
corpusCreate
,
variables
:
{
fullPath
:
projectPath
,
packageId
},
variables
:
{
input
:{
fullPath
:
projectPath
,
packageId
:
convertToGraphQLId
(
TYPE_PACKAGES_PACKAGE
,
packageId
)
}
},
});
},
deleteCorpus
:
(
_
,
{
name
,
projectPath
},
{
cache
})
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment