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
c3352754
Commit
c3352754
authored
Mar 23, 2021
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a working, current example
parent
ad9f95d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
doc/development/fe_guide/graphql.md
doc/development/fe_guide/graphql.md
+4
-11
No files found.
doc/development/fe_guide/graphql.md
View file @
c3352754
...
...
@@ -1448,23 +1448,16 @@ const defaultCacheOptions = {
```
```
javascript
function
createMockApolloProvider
()
{
function
createMockApolloProvider
(
{
props
=
{},
requestHandlers
}
=
{}
)
{
Vue
.
use
(
VueApollo
);
const
requestHandlers
=
[
projectIssueQuery
,
jest
.
fn
().
mockResolvedValue
(
projectIssueQueryResponse
),
];
const
mockApollo
=
createMockApollo
(
requestHandlers
,
{},
{
typePolicies
:
{
Issue
:
{
keyFields
:
[
'
title
'
,
'
fullPath
'
],
},
},
dataIdFromObject
:
(
object
)
=>
// eslint-disable-next-line no-underscore-dangle
object
.
__typename
===
'
Requirement
'
?
object
.
iid
:
defaultDataIdFromObject
(
object
),
},
);
...
...
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