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
59d02126
Commit
59d02126
authored
Jun 07, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Countries GQL resolver
parent
d8e59d76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
ee/app/assets/javascripts/subscriptions/buy_minutes/graphql/resolvers.js
...avascripts/subscriptions/buy_minutes/graphql/resolvers.js
+1
-1
ee/app/assets/javascripts/subscriptions/graphql/queries/countries.query.graphql
...pts/subscriptions/graphql/queries/countries.query.graphql
+6
-0
ee/spec/frontend/subscriptions/buy_minutes/graphql/resolvers_spec.js
...ntend/subscriptions/buy_minutes/graphql/resolvers_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/subscriptions/buy_minutes/graphql/resolvers.js
View file @
59d02126
...
@@ -15,7 +15,7 @@ export const resolvers = {
...
@@ -15,7 +15,7 @@ export const resolvers = {
.
then
(({
data
})
=>
.
then
(({
data
})
=>
data
.
map
(([
name
,
alpha2
])
=>
data
.
map
(([
name
,
alpha2
])
=>
// eslint-disable-next-line @gitlab/require-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
({
name
,
alpha2
,
__typename
:
'
Country
'
}),
({
name
,
id
:
alpha2
,
__typename
:
'
Country
'
}),
),
),
)
)
.
catch
(()
=>
createFlash
({
message
:
ERROR_FETCHING_COUNTRIES
}));
.
catch
(()
=>
createFlash
({
message
:
ERROR_FETCHING_COUNTRIES
}));
...
...
ee/app/assets/javascripts/subscriptions/graphql/queries/countries.query.graphql
0 → 100644
View file @
59d02126
query
Countries
{
countries
@client
{
id
name
}
}
ee/spec/frontend/subscriptions/buy_minutes/graphql/resolvers_spec.js
View file @
59d02126
...
@@ -62,8 +62,8 @@ describe('~/subscriptions/buy_minutes/graphql/resolvers', () => {
...
@@ -62,8 +62,8 @@ describe('~/subscriptions/buy_minutes/graphql/resolvers', () => {
expect
(
createFlash
).
not
.
toHaveBeenCalled
();
expect
(
createFlash
).
not
.
toHaveBeenCalled
();
expect
(
result
).
toStrictEqual
([
expect
(
result
).
toStrictEqual
([
{
name
:
'
United States of America
'
,
alpha2
:
'
US
'
,
__typename
:
'
Country
'
},
{
name
:
'
United States of America
'
,
id
:
'
US
'
,
__typename
:
'
Country
'
},
{
name
:
'
Uruguay
'
,
alpha2
:
'
UY
'
,
__typename
:
'
Country
'
},
{
name
:
'
Uruguay
'
,
id
:
'
UY
'
,
__typename
:
'
Country
'
},
]);
]);
});
});
});
});
...
...
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