@ctil/gql 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1850,9 +1850,6 @@ var CCRequest = class {
1850
1850
  // ===== 请求逻辑 =====
1851
1851
  async request(query2, variables) {
1852
1852
  let queryStr = typeof query2 === "string" ? query2 : print(query2);
1853
- if (!/refreshToken/i.test(queryStr)) {
1854
- await this.ensureTokenValid();
1855
- }
1856
1853
  const { deviceId, deviceName } = await this.deviceInfoPromise;
1857
1854
  let headersWithDevice = Object.fromEntries(
1858
1855
  Object.entries({
@@ -1876,6 +1873,9 @@ var CCRequest = class {
1876
1873
  }
1877
1874
  }
1878
1875
  try {
1876
+ if (!/refreshToken/i.test(queryStr)) {
1877
+ await this.ensureTokenValid();
1878
+ }
1879
1879
  const res = await this.client.rawRequest(
1880
1880
  queryStr,
1881
1881
  variables,