debian-mirror-gitlab/app/assets/javascripts/repository/mixins/get_ref.js

23 lines
378 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import refQuery from '../queries/ref.query.graphql';
2019-09-04 21:01:54 +05:30
export default {
apollo: {
ref: {
2020-10-24 23:57:45 +05:30
query: refQuery,
2020-05-05 14:28:15 +05:30
manual: true,
result({ data, loading }) {
if (!loading) {
this.ref = data.ref;
this.escapedRef = data.escapedRef;
}
},
2019-09-04 21:01:54 +05:30
},
},
data() {
return {
ref: '',
2020-05-05 14:28:15 +05:30
escapedRef: '',
2019-09-04 21:01:54 +05:30
};
},
};