@graphql-codegen/typescript-apollo-angular 3.4.2-alpha-4a7e799f2.0 → 3.4.3-alpha-cb3f44ae4.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/index.js +2 -3
- package/index.mjs +3 -4
- package/package.json +4 -5
package/index.js
CHANGED
|
@@ -10,7 +10,6 @@ const visitorPluginCommon = require('@graphql-codegen/visitor-plugin-common');
|
|
|
10
10
|
const autoBind = _interopDefault(require('auto-bind'));
|
|
11
11
|
const changeCaseAll = require('change-case-all');
|
|
12
12
|
const path = require('path');
|
|
13
|
-
const gql = _interopDefault(require('graphql-tag'));
|
|
14
13
|
|
|
15
14
|
const R_MOD = /module:\s*"([^"]+)"/; // matches: module: "..."
|
|
16
15
|
const R_NAME = /name:\s*"([^"]+)"/; // matches: name: "..."
|
|
@@ -317,10 +316,10 @@ const plugin = (schema, documents, config) => {
|
|
|
317
316
|
.join('\n'),
|
|
318
317
|
};
|
|
319
318
|
};
|
|
320
|
-
const addToSchema =
|
|
319
|
+
const addToSchema = graphql.parse(`
|
|
321
320
|
directive @NgModule(module: String!) on OBJECT | FIELD
|
|
322
321
|
directive @namedClient(name: String!) on OBJECT | FIELD
|
|
323
|
-
|
|
322
|
+
`);
|
|
324
323
|
const validate = async (schema, documents, config, outputFile) => {
|
|
325
324
|
if (path.extname(outputFile) !== '.ts') {
|
|
326
325
|
throw new Error(`Plugin "apollo-angular" requires extension to be ".ts"!`);
|
package/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { oldVisit } from '@graphql-codegen/plugin-helpers';
|
|
2
|
-
import { print, visit, Kind, concatAST } from 'graphql';
|
|
2
|
+
import { print, visit, Kind, concatAST, parse } from 'graphql';
|
|
3
3
|
import { ClientSideBaseVisitor, getConfigValue, DocumentMode, indentMultiline } from '@graphql-codegen/visitor-plugin-common';
|
|
4
4
|
import autoBind from 'auto-bind';
|
|
5
5
|
import { camelCase } from 'change-case-all';
|
|
6
6
|
import { extname } from 'path';
|
|
7
|
-
import gql from 'graphql-tag';
|
|
8
7
|
|
|
9
8
|
const R_MOD = /module:\s*"([^"]+)"/; // matches: module: "..."
|
|
10
9
|
const R_NAME = /name:\s*"([^"]+)"/; // matches: name: "..."
|
|
@@ -311,10 +310,10 @@ const plugin = (schema, documents, config) => {
|
|
|
311
310
|
.join('\n'),
|
|
312
311
|
};
|
|
313
312
|
};
|
|
314
|
-
const addToSchema =
|
|
313
|
+
const addToSchema = parse(`
|
|
315
314
|
directive @NgModule(module: String!) on OBJECT | FIELD
|
|
316
315
|
directive @namedClient(name: String!) on OBJECT | FIELD
|
|
317
|
-
|
|
316
|
+
`);
|
|
318
317
|
const validate = async (schema, documents, config, outputFile) => {
|
|
319
318
|
if (extname(outputFile) !== '.ts') {
|
|
320
319
|
throw new Error(`Plugin "apollo-angular" requires extension to be ".ts"!`);
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-apollo-angular",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3-alpha-cb3f44ae4.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating ready-to-use Angular Components based on GraphQL operations",
|
|
5
5
|
"peerDependencies": {
|
|
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"
|
|
7
|
-
"graphql-tag": "^2.0.0"
|
|
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"
|
|
8
7
|
},
|
|
9
8
|
"dependencies": {
|
|
10
|
-
"@graphql-codegen/plugin-helpers": "2.4.
|
|
11
|
-
"@graphql-codegen/visitor-plugin-common": "2.7.2-alpha-
|
|
9
|
+
"@graphql-codegen/plugin-helpers": "^2.4.0",
|
|
10
|
+
"@graphql-codegen/visitor-plugin-common": "2.7.2-alpha-cb3f44ae4.0",
|
|
12
11
|
"auto-bind": "~4.0.0",
|
|
13
12
|
"change-case-all": "1.0.14",
|
|
14
13
|
"tslib": "~2.3.0"
|