(config)
| 38 | */ |
| 39 | class GraphQL extends Helper { |
| 40 | constructor(config) { |
| 41 | super(config) |
| 42 | this.axios = axios.create() |
| 43 | this.headers = {} |
| 44 | this.options = { |
| 45 | timeout: 10000, |
| 46 | defaultHeaders: {}, |
| 47 | endpoint: '', |
| 48 | onRequest: null, |
| 49 | onResponse: null, |
| 50 | } |
| 51 | this.options = Object.assign(this.options, config) |
| 52 | this.headers = { ...this.options.defaultHeaders } |
| 53 | this.axios.defaults.headers = this.options.defaultHeaders |
| 54 | } |
| 55 | |
| 56 | static _checkRequirements() { |
| 57 | try { |