@graphql-tools/schema 9.0.0-alpha-9ec77577.0 → 9.0.0-alpha-7052f15d.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 +6 -6
- package/index.mjs +6 -6
- package/makeExecutableSchema.d.ts +1 -1
- package/package.json +4 -4
- package/types.d.ts +1 -6
package/index.js
CHANGED
|
@@ -462,7 +462,7 @@ function setFieldProperties(field, propertiesObj) {
|
|
|
462
462
|
* })
|
|
463
463
|
* ```
|
|
464
464
|
*/
|
|
465
|
-
function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOptions = {},
|
|
465
|
+
function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOptions = {}, inheritResolversFromInterfaces = false, pruningOptions, updateResolversInPlace = false, schemaExtensions, ...otherOptions }) {
|
|
466
466
|
// Validate and clean up arguments
|
|
467
467
|
if (typeof resolverValidationOptions !== 'object') {
|
|
468
468
|
throw new Error('Expected `resolverValidationOptions` to be an object');
|
|
@@ -474,16 +474,16 @@ function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOpti
|
|
|
474
474
|
if (graphql.isSchema(typeDefs)) {
|
|
475
475
|
schema = typeDefs;
|
|
476
476
|
}
|
|
477
|
-
else if (
|
|
477
|
+
else if (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.commentDescriptions) {
|
|
478
478
|
const mergedTypeDefs = merge.mergeTypeDefs(typeDefs, {
|
|
479
|
-
...
|
|
479
|
+
...otherOptions,
|
|
480
480
|
commentDescriptions: true,
|
|
481
481
|
});
|
|
482
|
-
schema = graphql.buildSchema(mergedTypeDefs,
|
|
482
|
+
schema = graphql.buildSchema(mergedTypeDefs, otherOptions);
|
|
483
483
|
}
|
|
484
484
|
else {
|
|
485
|
-
const mergedTypeDefs = merge.mergeTypeDefs(typeDefs,
|
|
486
|
-
schema = graphql.buildASTSchema(mergedTypeDefs,
|
|
485
|
+
const mergedTypeDefs = merge.mergeTypeDefs(typeDefs, otherOptions);
|
|
486
|
+
schema = graphql.buildASTSchema(mergedTypeDefs, otherOptions);
|
|
487
487
|
}
|
|
488
488
|
if (pruningOptions) {
|
|
489
489
|
schema = utils.pruneSchema(schema);
|
package/index.mjs
CHANGED
|
@@ -458,7 +458,7 @@ function setFieldProperties(field, propertiesObj) {
|
|
|
458
458
|
* })
|
|
459
459
|
* ```
|
|
460
460
|
*/
|
|
461
|
-
function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOptions = {},
|
|
461
|
+
function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOptions = {}, inheritResolversFromInterfaces = false, pruningOptions, updateResolversInPlace = false, schemaExtensions, ...otherOptions }) {
|
|
462
462
|
// Validate and clean up arguments
|
|
463
463
|
if (typeof resolverValidationOptions !== 'object') {
|
|
464
464
|
throw new Error('Expected `resolverValidationOptions` to be an object');
|
|
@@ -470,16 +470,16 @@ function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOpti
|
|
|
470
470
|
if (isSchema(typeDefs)) {
|
|
471
471
|
schema = typeDefs;
|
|
472
472
|
}
|
|
473
|
-
else if (
|
|
473
|
+
else if (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.commentDescriptions) {
|
|
474
474
|
const mergedTypeDefs = mergeTypeDefs(typeDefs, {
|
|
475
|
-
...
|
|
475
|
+
...otherOptions,
|
|
476
476
|
commentDescriptions: true,
|
|
477
477
|
});
|
|
478
|
-
schema = buildSchema(mergedTypeDefs,
|
|
478
|
+
schema = buildSchema(mergedTypeDefs, otherOptions);
|
|
479
479
|
}
|
|
480
480
|
else {
|
|
481
|
-
const mergedTypeDefs = mergeTypeDefs(typeDefs,
|
|
482
|
-
schema = buildASTSchema(mergedTypeDefs,
|
|
481
|
+
const mergedTypeDefs = mergeTypeDefs(typeDefs, otherOptions);
|
|
482
|
+
schema = buildASTSchema(mergedTypeDefs, otherOptions);
|
|
483
483
|
}
|
|
484
484
|
if (pruningOptions) {
|
|
485
485
|
schema = pruneSchema(schema);
|
|
@@ -43,4 +43,4 @@ import { IExecutableSchemaDefinition } from './types';
|
|
|
43
43
|
* })
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
export declare function makeExecutableSchema<TContext = any>({ typeDefs, resolvers, resolverValidationOptions,
|
|
46
|
+
export declare function makeExecutableSchema<TContext = any>({ typeDefs, resolvers, resolverValidationOptions, inheritResolversFromInterfaces, pruningOptions, updateResolversInPlace, schemaExtensions, ...otherOptions }: IExecutableSchemaDefinition<TContext>): GraphQLSchema;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/schema",
|
|
3
|
-
"version": "9.0.0-alpha-
|
|
3
|
+
"version": "9.0.0-alpha-7052f15d.0",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
7
|
+
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/merge": "8.2.
|
|
11
|
-
"@graphql-tools/utils": "8.6.
|
|
10
|
+
"@graphql-tools/merge": "8.2.13",
|
|
11
|
+
"@graphql-tools/utils": "8.6.12",
|
|
12
12
|
"tslib": "~2.4.0",
|
|
13
13
|
"value-or-promise": "1.0.11"
|
|
14
14
|
},
|
package/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BuildSchemaOptions } from 'graphql';
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration object for creating an executable schema
|
|
6
6
|
*/
|
|
7
|
-
export interface IExecutableSchemaDefinition<TContext = any> {
|
|
7
|
+
export interface IExecutableSchemaDefinition<TContext = any> extends BuildSchemaOptions, GraphQLParseOptions {
|
|
8
8
|
/**
|
|
9
9
|
* The type definitions used to create the schema
|
|
10
10
|
*/
|
|
@@ -17,11 +17,6 @@ export interface IExecutableSchemaDefinition<TContext = any> {
|
|
|
17
17
|
* Additional options for validating the provided resolvers
|
|
18
18
|
*/
|
|
19
19
|
resolverValidationOptions?: IResolverValidationOptions;
|
|
20
|
-
/**
|
|
21
|
-
* Additional options for parsing the type definitions if they are provided
|
|
22
|
-
* as a string
|
|
23
|
-
*/
|
|
24
|
-
parseOptions?: BuildSchemaOptions & GraphQLParseOptions;
|
|
25
20
|
/**
|
|
26
21
|
* GraphQL object types that implement interfaces will inherit any missing
|
|
27
22
|
* resolvers from their interface types defined in the `resolvers` object
|