diff options
Diffstat (limited to 'app/assets/javascripts/pages/projects/blob/show/index.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/blob/show/index.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/projects/blob/show/index.js b/app/assets/javascripts/pages/projects/blob/show/index.js index fc2702b8c37..8a8ce70e998 100644 --- a/app/assets/javascripts/pages/projects/blob/show/index.js +++ b/app/assets/javascripts/pages/projects/blob/show/index.js @@ -1,25 +1,35 @@ import Vue from 'vue'; +import VueApollo from 'vue-apollo'; import PipelineTourSuccessModal from '~/blob/pipeline_tour_success_modal.vue'; import BlobViewer from '~/blob/viewer/index'; import GpgBadges from '~/gpg_badges'; +import createDefaultClient from '~/lib/graphql'; import initBlob from '~/pages/projects/init_blob'; import initWebIdeLink from '~/pages/projects/shared/web_ide_link'; import commitPipelineStatus from '~/projects/tree/components/commit_pipeline_status_component.vue'; import BlobContentViewer from '~/repository/components/blob_content_viewer.vue'; import '~/sourcegraph/load'; +Vue.use(VueApollo); + +const apolloProvider = new VueApollo({ + defaultClient: createDefaultClient(), +}); + const viewBlobEl = document.querySelector('#js-view-blob-app'); if (viewBlobEl) { - const { blobPath } = viewBlobEl.dataset; + const { blobPath, projectPath } = viewBlobEl.dataset; // eslint-disable-next-line no-new new Vue({ el: viewBlobEl, + apolloProvider, render(createElement) { return createElement(BlobContentViewer, { props: { path: blobPath, + projectPath, }, }); }, |