UNPKG

graphql-request

Version:

Minimal GraphQL client supporting Node and browsers for scripts or simple apps.

8 lines 549 B
import { createCodeGenerator } from '../createCodeGenerator.js'; import { moduleNameSchemaRuntime } from './SchemaRuntime.js'; export const { generate: generateClient, moduleName: moduleNameClient } = createCodeGenerator(`Client`, (config) => { const code = []; code.push(`import { createPrefilled } from '${config.libraryPaths.client}'`, `import { $Index } from './${moduleNameSchemaRuntime}.js'`, ``, `export const create = createPrefilled(\`${config.name}\`, $Index)`); return code.join(`\n\n`); }); //# sourceMappingURL=Client.js.map