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
3a6b33c7
Commit
3a6b33c7
authored
Oct 11, 2021
by
Natalia Tepluhina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable `assumeImmutableResults` in requirements Vue app
parent
0e0f4d3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ee/app/assets/javascripts/requirements/queries/fragmentTypes.json
...ssets/javascripts/requirements/queries/fragmentTypes.json
+1
-0
ee/app/assets/javascripts/requirements/requirements_bundle.js
...pp/assets/javascripts/requirements/requirements_bundle.js
+8
-1
No files found.
ee/app/assets/javascripts/requirements/queries/fragmentTypes.json
0 → 100644
View file @
3a6b33c7
{
"__schema"
:{
"types"
:[{
"kind"
:
"INTERFACE"
,
"name"
:
"User"
,
"possibleTypes"
:[{
"name"
:
"UserCore"
}]}]}}
ee/app/assets/javascripts/requirements/requirements_bundle.js
View file @
3a6b33c7
import
{
GlToast
}
from
'
@gitlab/ui
'
;
import
{
defaultDataIdFromObject
}
from
'
apollo-cache-inmemory
'
;
import
{
defaultDataIdFromObject
,
IntrospectionFragmentMatcher
}
from
'
apollo-cache-inmemory
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
introspectionQueryResultData
from
'
./queries/fragmentTypes.json
'
;
import
RequirementsRoot
from
'
./components/requirements_root.vue
'
;
...
...
@@ -12,6 +13,10 @@ import { FilterState } from './constants';
Vue
.
use
(
VueApollo
);
Vue
.
use
(
GlToast
);
const
fragmentMatcher
=
new
IntrospectionFragmentMatcher
({
introspectionQueryResultData
,
});
export
default
()
=>
{
const
el
=
document
.
getElementById
(
'
js-requirements-app
'
);
...
...
@@ -27,7 +32,9 @@ export default () => {
dataIdFromObject
:
(
object
)
=>
// eslint-disable-next-line no-underscore-dangle, @gitlab/require-i18n-strings
object
.
__typename
===
'
Requirement
'
?
object
.
iid
:
defaultDataIdFromObject
(
object
),
fragmentMatcher
,
},
assumeImmutableResults
:
true
,
},
),
});
...
...
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