@graphql-codegen/gql-tag-operations 1.3.0 → 1.3.2-alpha-8565e86c3.0

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/cjs/index.js CHANGED
@@ -15,7 +15,7 @@ const plugin = (_, __, { sourcesWithOperations, useTypeImports, augmentedModuleN
15
15
  }
16
16
  if (augmentedModuleName == null) {
17
17
  return [
18
- `import * as graphql from './graphql.js';\n`,
18
+ `import * as graphql from './graphql';\n`,
19
19
  `${useTypeImports ? 'import type' : 'import'} { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`,
20
20
  `\n`,
21
21
  ...getDocumentRegistryChunk(sourcesWithOperations),
@@ -65,7 +65,7 @@ function getGqlOverloadChunk(sourcesWithOperations, mode) {
65
65
  const originalString = rest.source.rawSDL;
66
66
  const returnType = mode === 'lookup'
67
67
  ? `(typeof documents)[${JSON.stringify(originalString)}]`
68
- : `typeof import('./graphql.js').${operations[0].initialName}`;
68
+ : `typeof import('./graphql').${operations[0].initialName}`;
69
69
  lines.add(`export function gql(source: ${JSON.stringify(originalString)}): ${returnType};\n`);
70
70
  }
71
71
  return lines;
package/esm/index.js CHANGED
@@ -12,7 +12,7 @@ export const plugin = (_, __, { sourcesWithOperations, useTypeImports, augmented
12
12
  }
13
13
  if (augmentedModuleName == null) {
14
14
  return [
15
- `import * as graphql from './graphql.js';\n`,
15
+ `import * as graphql from './graphql';\n`,
16
16
  `${useTypeImports ? 'import type' : 'import'} { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`,
17
17
  `\n`,
18
18
  ...getDocumentRegistryChunk(sourcesWithOperations),
@@ -61,7 +61,7 @@ function getGqlOverloadChunk(sourcesWithOperations, mode) {
61
61
  const originalString = rest.source.rawSDL;
62
62
  const returnType = mode === 'lookup'
63
63
  ? `(typeof documents)[${JSON.stringify(originalString)}]`
64
- : `typeof import('./graphql.js').${operations[0].initialName}`;
64
+ : `typeof import('./graphql').${operations[0].initialName}`;
65
65
  lines.add(`export function gql(source: ${JSON.stringify(originalString)}): ${returnType};\n`);
66
66
  }
67
67
  return lines;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/gql-tag-operations",
3
- "version": "1.3.0",
3
+ "version": "1.3.2-alpha-8565e86c3.0",
4
4
  "description": "GraphQL Code Generator plugin for generating a typed gql tag function",
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@graphql-tools/utils": "^8.8.0",
11
11
  "@graphql-codegen/plugin-helpers": "^2.5.0",
12
- "@graphql-codegen/visitor-plugin-common": "2.11.0",
12
+ "@graphql-codegen/visitor-plugin-common": "2.11.1",
13
13
  "auto-bind": "~4.0.0",
14
14
  "tslib": "~2.4.0"
15
15
  },