Skip to content

Commit 183dc08

Browse files
committed
fix(token-distribution): replace @graphql-mesh/utils with local gql implementation
- Replace missing @graphql-mesh/utils dependency with simple local gql function - Update extraction script to generate self-contained artifacts - Fixes Hardhat initialization error: 'Cannot find module @graphql-mesh/utils' - Maintains functionality while avoiding unnecessary dependency
1 parent a485a59 commit 183dc08

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

packages/token-distribution/.graphclient-extracted/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
Object.defineProperty(exports, "__esModule", { value: true });
33

44
// Minimal GraphClient for offline builds - contains only what ops/info.ts uses
5-
const { gql } = require('@graphql-mesh/utils');
5+
// Simple gql template literal function (replacement for @graphql-mesh/utils)
6+
const gql = (strings, ...values) => {
7+
let result = strings[0];
8+
for (let i = 0; i < values.length; i++) {
9+
result += values[i] + strings[i + 1];
10+
}
11+
return result;
12+
};
613

714
// Mock execute function
815
const execute = () => {

packages/token-distribution/scripts/extract-graphclient.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ function createMinimalJs(content, neededQueries) {
135135
Object.defineProperty(exports, "__esModule", { value: true });
136136
137137
// Minimal GraphClient for offline builds - contains only what ops/info.ts uses
138-
const { gql } = require('@graphql-mesh/utils');
138+
// Simple gql template literal function (replacement for @graphql-mesh/utils)
139+
const gql = (strings, ...values) => {
140+
let result = strings[0];
141+
for (let i = 0; i < values.length; i++) {
142+
result += values[i] + strings[i + 1];
143+
}
144+
return result;
145+
};
139146
140147
// Mock execute function
141148
const execute = () => {

0 commit comments

Comments
 (0)