@smartive/graphql-magic 20.1.0 → 21.0.0-next.2
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/.releaserc +54 -1
- package/CHANGELOG.md +3 -3
- package/dist/cjs/index.cjs +1 -2
- package/dist/esm/api/execute.js +2 -4
- package/dist/esm/api/execute.js.map +1 -1
- package/package.json +1 -1
- package/src/api/execute.ts +2 -3
package/.releaserc
CHANGED
|
@@ -19,7 +19,60 @@
|
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
|
-
|
|
22
|
+
[
|
|
23
|
+
"@semantic-release/release-notes-generator",
|
|
24
|
+
{
|
|
25
|
+
"preset": "angular",
|
|
26
|
+
"presetConfig": {
|
|
27
|
+
"types": [
|
|
28
|
+
{
|
|
29
|
+
"type": "feat",
|
|
30
|
+
"section": "Features"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "fix",
|
|
34
|
+
"section": "Bug Fixes"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "break",
|
|
38
|
+
"section": "BREAKING CHANGES"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "docs",
|
|
42
|
+
"hidden": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "style",
|
|
46
|
+
"hidden": true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "refactor",
|
|
50
|
+
"hidden": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "perf",
|
|
54
|
+
"section": "Performance Improvements"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "test",
|
|
58
|
+
"hidden": true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "build",
|
|
62
|
+
"hidden": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "ci",
|
|
66
|
+
"hidden": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "chore",
|
|
70
|
+
"hidden": true
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
23
76
|
"@semantic-release/changelog",
|
|
24
77
|
"@semantic-release/npm",
|
|
25
78
|
"@semantic-release/github"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# [
|
|
1
|
+
# [21.0.0-next.2](https://github.com/smartive/graphql-magic/compare/v21.0.0-next.1...v21.0.0-next.2) (2025-09-18)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* .releasrc to detect break: pattern ([1e9c54c](https://github.com/smartive/graphql-magic/commit/1e9c54cb9dad4c0683f79754dd45d292cb7f91bc))
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -254,8 +254,7 @@ var execute = async ({
|
|
|
254
254
|
const validationErrors = (0, import_graphql2.validate)(
|
|
255
255
|
schema,
|
|
256
256
|
parsedDocument,
|
|
257
|
-
|
|
258
|
-
introspection ? [] : [noIntrospection]
|
|
257
|
+
introspection ? import_graphql2.specifiedRules : [...import_graphql2.specifiedRules, noIntrospection]
|
|
259
258
|
);
|
|
260
259
|
if (validationErrors.length > 0) {
|
|
261
260
|
return { errors: validationErrors };
|
package/dist/esm/api/execute.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeExecutableSchema } from '@graphql-tools/schema';
|
|
2
|
-
import { Source, execute as graphqlExecute, parse, validate } from 'graphql';
|
|
2
|
+
import { Source, execute as graphqlExecute, parse, specifiedRules, validate } from 'graphql';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
4
|
import { generate, get, getResolvers } from '..';
|
|
5
5
|
import { noIntrospection } from '../utils/rules';
|
|
@@ -11,9 +11,7 @@ export const execute = async ({ additionalResolvers, body, introspection = false
|
|
|
11
11
|
resolvers: merge(generatedResolvers, additionalResolvers),
|
|
12
12
|
});
|
|
13
13
|
const parsedDocument = parse(new Source(body.query, 'GraphQL request'));
|
|
14
|
-
const validationErrors = validate(schema, parsedDocument,
|
|
15
|
-
// TODO: reintroduce. introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
16
|
-
introspection ? [] : [noIntrospection]);
|
|
14
|
+
const validationErrors = validate(schema, parsedDocument, introspection ? specifiedRules : [...specifiedRules, noIntrospection]);
|
|
17
15
|
if (validationErrors.length > 0) {
|
|
18
16
|
return { errors: validationErrors };
|
|
19
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/api/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAsB,MAAM,EAAE,OAAO,IAAI,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/api/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAsB,MAAM,EAAE,OAAO,IAAI,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjH,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EAAW,QAAQ,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,EAC5B,mBAAmB,EACnB,IAAI,EACJ,aAAa,GAAG,KAAK,EACrB,GAAG,GAAG,EAKqB,EAAE,EAAE;IAC/B,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEtC,MA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
CHANGED
package/src/api/execute.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeExecutableSchema } from '@graphql-tools/schema';
|
|
2
2
|
import { IResolvers } from '@graphql-tools/utils';
|
|
3
|
-
import { GraphQLResolveInfo, Source, execute as graphqlExecute, parse, validate } from 'graphql';
|
|
3
|
+
import { GraphQLResolveInfo, Source, execute as graphqlExecute, parse, specifiedRules, validate } from 'graphql';
|
|
4
4
|
import merge from 'lodash/merge';
|
|
5
5
|
import { Context, generate, get, getResolvers } from '..';
|
|
6
6
|
import { noIntrospection } from '../utils/rules';
|
|
@@ -29,8 +29,7 @@ export const execute = async ({
|
|
|
29
29
|
const validationErrors = validate(
|
|
30
30
|
schema,
|
|
31
31
|
parsedDocument,
|
|
32
|
-
|
|
33
|
-
introspection ? [] : [noIntrospection],
|
|
32
|
+
introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
34
33
|
);
|
|
35
34
|
|
|
36
35
|
if (validationErrors.length > 0) {
|