summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/mixins/get_ref.js
blob: 99d19b77c359586118ab62c71817c571de79ed34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import getRef from '../queries/getRef.query.graphql';

export default {
  apollo: {
    ref: {
      query: getRef,
      manual: true,
      result({ data, loading }) {
        if (!loading) {
          this.ref = data.ref;
          this.escapedRef = data.escapedRef;
        }
      },
    },
  },
  data() {
    return {
      ref: '',
      escapedRef: '',
    };
  },
};