@smartive/graphql-magic 19.6.1 → 19.6.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/CHANGELOG.md +2 -2
- package/dist/cjs/index.cjs +2 -1
- package/dist/esm/api/execute.js +4 -2
- package/dist/esm/api/execute.js.map +1 -1
- package/package.json +1 -1
- package/src/api/execute.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [19.6.
|
|
1
|
+
## [19.6.2](https://github.com/smartive/graphql-magic/compare/v19.6.1...v19.6.2) (2025-08-19)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Temporarily remove newly introduced validation rules ([41022e2](https://github.com/smartive/graphql-magic/commit/41022e2aaa281555bb5b2ac53f464a7d1571c45e))
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -255,7 +255,8 @@ var execute = async ({
|
|
|
255
255
|
const validationErrors = (0, import_graphql2.validate)(
|
|
256
256
|
schema,
|
|
257
257
|
parsedDocument,
|
|
258
|
-
introspection ?
|
|
258
|
+
// TODO: reintroduce. introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
259
|
+
introspection ? [] : [noIntrospection]
|
|
259
260
|
);
|
|
260
261
|
if (validationErrors.length > 0) {
|
|
261
262
|
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,
|
|
2
|
+
import { Source, execute as graphqlExecute, parse, 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,7 +11,9 @@ 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,
|
|
14
|
+
const validationErrors = validate(schema, parsedDocument,
|
|
15
|
+
// TODO: reintroduce. introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
16
|
+
introspection ? [] : [noIntrospection]);
|
|
15
17
|
if (validationErrors.length > 0) {
|
|
16
18
|
return { errors: validationErrors };
|
|
17
19
|
}
|
|
@@ -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,
|
|
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;AACjG,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,MAAM,kBAAkB,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEpD,MAAM,M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chema } from '@graphql-tools/schema';
|
|
2
2
|
import { IResolvers } from '@graphql-tools/utils';
|
|
3
|
-
import { GraphQLResolveInfo, Source, execute as graphqlExecute, parse,
|
|
3
|
+
import { GraphQLResolveInfo, Source, execute as graphqlExecute, parse, 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,7 +29,8 @@ export const execute = async ({
|
|
|
29
29
|
const validationErrors = validate(
|
|
30
30
|
schema,
|
|
31
31
|
parsedDocument,
|
|
32
|
-
introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
32
|
+
// TODO: reintroduce. introspection ? specifiedRules : [...specifiedRules, noIntrospection],
|
|
33
|
+
introspection ? [] : [noIntrospection],
|
|
33
34
|
);
|
|
34
35
|
|
|
35
36
|
if (validationErrors.length > 0) {
|