gitlab-org--gitlab-foss/app/assets/javascripts/repository/mixins/get_ref.js

22 lines
386 B
JavaScript

import refQuery from '../queries/ref.query.graphql';
export default {
apollo: {
ref: {
query: refQuery,
manual: true,
result({ data, loading }) {
if (data && !loading) {
this.ref = data.ref;
this.escapedRef = data.escapedRef;
}
},
},
},
data() {
return {
ref: '',
escapedRef: '',
};
},
};