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
23cdfdc1
Commit
23cdfdc1
authored
Jun 07, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add typeDefs and resolvers to GQL clients
parent
eb0990a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
ee/app/assets/javascripts/subscriptions/buy_minutes/constants.js
...assets/javascripts/subscriptions/buy_minutes/constants.js
+1
-0
ee/app/assets/javascripts/subscriptions/buy_minutes/graphql.js
...p/assets/javascripts/subscriptions/buy_minutes/graphql.js
+15
-4
No files found.
ee/app/assets/javascripts/subscriptions/buy_minutes/constants.js
View file @
23cdfdc1
...
...
@@ -4,3 +4,4 @@ export const planTags = {
};
/* eslint-enable @gitlab/require-i18n-strings */
export
const
CUSTOMER_CLIENT
=
'
customerClient
'
;
export
const
GITLAB_CLIENT
=
'
gitlabClient
'
;
ee/app/assets/javascripts/subscriptions/buy_minutes/graphql.js
View file @
23cdfdc1
import
{
merge
}
from
'
lodash
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
purchaseFlowResolvers
from
'
ee/vue_shared/purchase_flow/graphql/resolvers
'
;
import
typeDefs
from
'
ee/vue_shared/purchase_flow/graphql/typedefs.graphql
'
;
import
createClient
from
'
~/lib/graphql
'
;
import
{
CUSTOMER_CLIENT
}
from
'
./constants
'
;
import
{
GITLAB_CLIENT
,
CUSTOMER_CLIENT
}
from
'
./constants
'
;
import
{
resolvers
}
from
'
./graphql/resolvers
'
;
Vue
.
use
(
VueApollo
);
const
defaultClient
=
createClient
(
resolvers
,
{
assumeImmutableResults
:
true
});
const
gitlabClient
=
createClient
(
merge
({},
resolvers
,
purchaseFlowResolvers
),
{
typeDefs
,
assumeImmutableResults
:
true
,
});
const
customerClient
=
createClient
(
{},
{
path
:
'
/-/customers_dot/proxy/graphql
'
,
useGet
:
true
,
assumeImmutableResults
:
true
},
{
path
:
'
/-/customers_dot/proxy/graphql
'
,
useGet
:
true
,
assumeImmutableResults
:
true
,
},
);
export
default
new
VueApollo
({
defaultClient
,
defaultClient
:
gitlabClient
,
clients
:
{
[
GITLAB_CLIENT
]:
gitlabClient
,
[
CUSTOMER_CLIENT
]:
customerClient
,
},
});
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