Commit 6e59f81b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '214583-update-graphql-for-project-manipulation' into 'master'

Update graphql queries/config for instance dashboard

See merge request gitlab-org/gitlab!32363
parents 50e6ea89 9f246cbf
#import "ee/security_dashboard/graphql/project.fragment.graphql"
mutation addProjectToSecurityDashboard($id: ID!) { mutation addProjectToSecurityDashboard($id: ID!) {
addProjectToSecurityDashboard(input: {id: $id}) { addProjectToSecurityDashboard(input: { id: $id }) {
errors errors
project {
...Project
avatarUrl
nameWithNamespace
path
}
} }
} }
{"__schema":{"types":[{"kind":"UNION","name":"VulnerabilityLocation","possibleTypes":[{"name":"VulnerabilityLocationContainerScanning"},{"name":"VulnerabilityLocationDast"},{"name":"VulnerabilityLocationDependencyScanning"},{"name":"VulnerabilityLocationSast"}]}]}} {"__schema":{"types":[{"kind":"UNION","name":"VulnerabilityLocation","possibleTypes":[{"name":"VulnerabilityLocationContainerScanning"},{"name":"VulnerabilityLocationDast"},{"name":"VulnerabilityLocationDependencyScanning"},{"name":"VulnerabilityLocationSast"}]}]}}
\ No newline at end of file
#import "ee/security_dashboard/graphql/project.fragment.graphql"
query getInstanceSecurityDashboardProjects { query getInstanceSecurityDashboardProjects {
instanceSecurityDashboard { instanceSecurityDashboard {
projects { projects {
nodes { nodes {
id ...Project
name avatarUrl
nameWithNamespace
path
} }
} }
} }
......
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "ee/security_dashboard/graphql/project.fragment.graphql"
query getProjects($search: String!) { query getProjects($search: String!) {
projects(search: $search, membership: true) { projects(search: $search, membership: true) {
nodes { nodes {
id ...Project
name avatarUrl
nameWithNamespace
path
}
pageInfo {
...PageInfo
} }
} }
} }
import Vue from 'vue'; import Vue from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory'; import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import createDefaultClient from '~/lib/graphql'; import createDefaultClient, { fetchPolicies } from '~/lib/graphql';
import introspectionQueryResultData from './fragmentTypes.json'; import introspectionQueryResultData from './fragmentTypes.json';
Vue.use(VueApollo); Vue.use(VueApollo);
...@@ -21,6 +21,13 @@ const defaultClient = createDefaultClient( ...@@ -21,6 +21,13 @@ const defaultClient = createDefaultClient(
}, },
); );
export const vuexApolloClient = createDefaultClient(
{},
{
fetchPolicy: fetchPolicies.NO_CACHE,
},
);
export default new VueApollo({ export default new VueApollo({
defaultClient, defaultClient,
}); });
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