Commit 9f246cbf authored by Alexander Turinske's avatar Alexander Turinske

Update graphql queries/config for instance dashb

- abstract out project configuration to be used in all the
  queries as they all require the same project data
- add a new client the turns off caching because Vuex is handling
  it
parent c507de52
#import "ee/security_dashboard/graphql/project.fragment.graphql"
mutation addProjectToSecurityDashboard($id: ID!) {
addProjectToSecurityDashboard(input: {id: $id}) {
addProjectToSecurityDashboard(input: { id: $id }) {
errors
project {
...Project
avatarUrl
nameWithNamespace
path
}
}
}
{"__schema":{"types":[{"kind":"UNION","name":"VulnerabilityLocation","possibleTypes":[{"name":"VulnerabilityLocationContainerScanning"},{"name":"VulnerabilityLocationDast"},{"name":"VulnerabilityLocationDependencyScanning"},{"name":"VulnerabilityLocationSast"}]}]}}
\ No newline at end of file
{"__schema":{"types":[{"kind":"UNION","name":"VulnerabilityLocation","possibleTypes":[{"name":"VulnerabilityLocationContainerScanning"},{"name":"VulnerabilityLocationDast"},{"name":"VulnerabilityLocationDependencyScanning"},{"name":"VulnerabilityLocationSast"}]}]}}
#import "ee/security_dashboard/graphql/project.fragment.graphql"
query getInstanceSecurityDashboardProjects {
instanceSecurityDashboard {
projects {
nodes {
id
name
...Project
avatarUrl
nameWithNamespace
path
}
}
}
......
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "ee/security_dashboard/graphql/project.fragment.graphql"
query getProjects($search: String!) {
projects(search: $search, membership: true) {
nodes {
id
name
...Project
avatarUrl
nameWithNamespace
path
}
pageInfo {
...PageInfo
}
}
}
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import createDefaultClient from '~/lib/graphql';
import createDefaultClient, { fetchPolicies } from '~/lib/graphql';
import introspectionQueryResultData from './fragmentTypes.json';
Vue.use(VueApollo);
......@@ -21,6 +21,13 @@ const defaultClient = createDefaultClient(
},
);
export const vuexApolloClient = createDefaultClient(
{},
{
fetchPolicy: fetchPolicies.NO_CACHE,
},
);
export default new VueApollo({
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