Commit 59d02126 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Fix Countries GQL resolver

parent d8e59d76
......@@ -15,7 +15,7 @@ export const resolvers = {
.then(({ data }) =>
data.map(([name, alpha2]) =>
// eslint-disable-next-line @gitlab/require-i18n-strings
({ name, alpha2, __typename: 'Country' }),
({ name, id: alpha2, __typename: 'Country' }),
),
)
.catch(() => createFlash({ message: ERROR_FETCHING_COUNTRIES }));
......
......@@ -62,8 +62,8 @@ describe('~/subscriptions/buy_minutes/graphql/resolvers', () => {
expect(createFlash).not.toHaveBeenCalled();
expect(result).toStrictEqual([
{ name: 'United States of America', alpha2: 'US', __typename: 'Country' },
{ name: 'Uruguay', alpha2: 'UY', __typename: 'Country' },
{ name: 'United States of America', id: 'US', __typename: 'Country' },
{ name: 'Uruguay', id: 'UY', __typename: 'Country' },
]);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment