@graphitation/supermassive
Advanced tools
Comparing version 3.1.0 to 3.2.0
# Change Log - @graphitation/supermassive | ||
This log was last generated on Wed, 27 Sep 2023 08:50:15 GMT and should not be manually modified. | ||
This log was last generated on Thu, 28 Sep 2023 12:04:02 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 3.2.0 | ||
Thu, 28 Sep 2023 12:04:02 GMT | ||
### Minor changes | ||
- Add more utility functtions, fix decode locations (mnovikov@microsoft.com) | ||
## 3.1.0 | ||
Wed, 27 Sep 2023 08:50:15 GMT | ||
Wed, 27 Sep 2023 08:50:33 GMT | ||
@@ -11,0 +19,0 @@ ### Minor changes |
@@ -14,7 +14,8 @@ export { executeWithSchema } from "./executeWithSchema"; | ||
export { mergeResolvers } from "./utilities/mergeResolvers"; | ||
export { mergeSchemaDefinitions } from "./utilities/mergeSchemaDefinitions"; | ||
export { createSchemaDefinitions, mergeSchemaDefinitions, } from "./utilities/mergeSchemaDefinitions"; | ||
export { schemaFragmentFromMinimalViableSchemaDocument } from "./utilities/schemaFragmentFromMinimalViableSchemaDocument"; | ||
export type { CompositeTypeTuple, DirectiveDefinitionTuple, DirectiveName, DirectiveTuple, EnumTypeDefinitionTuple, FieldDefinition, FieldDefinitionRecord, FieldDefinitionTuple, InputObjectTypeDefinitionTuple, InputValueDefinition, InputValueDefinitionRecord, InputValueDefinitionTuple, InterfaceImplementationsRecord, InterfaceTypeDefinitionTuple, ObjectTypeDefinitionTuple, OperationTypes, ScalarTypeDefinitionTuple, SchemaDefinitions, TypeDefinitionTuple, TypeDefinitionsRecord, UnionTypeDefinitionTuple, } from "./schema/definition"; | ||
export type { AddMinimalViableSchemaToRequestDocumentOptions, ExecutableDefinitionNodeWithInlinedSchema, } from "./utilities/addMinimalViableSchemaToRequestDocument"; | ||
export type { ExtractMinimalViableSchemaResult } from "./utilities/extractMinimalViableSchemaForRequestDocument"; | ||
export type { EnumTypeResolver, ExecutionResult, FunctionFieldResolver, IncrementalExecutionResult, ObjectTypeResolver, ResolveInfo, Resolvers, ScalarTypeResolver, SchemaFragment, SchemaFragmentForReturnTypeRequest, SchemaFragmentForRuntimeTypeRequest, SchemaFragmentLoader, SchemaFragmentLoaderResult, SchemaFragmentRequest, SubscriptionExecutionResult, TotalExecutionResult, UserResolvers, } from "./types"; | ||
export type { EnumTypeResolver, ExecutionResult, FunctionFieldResolver, IncrementalExecutionResult, ObjectTypeResolver, ResolveInfo, Resolvers, ScalarTypeResolver, SchemaFragment, SchemaFragmentForReturnTypeRequest, SchemaFragmentForRuntimeTypeRequest, SchemaFragmentLoader, SchemaFragmentLoaderResult, SchemaFragmentRequest, SubscriptionExecutionResult, TotalExecutionResult, UserResolvers, DocumentWithMinimalViableSchema, DefinitionNodeWithMinimalViableSchema, } from "./types"; | ||
export type { PromiseOrValue } from "./jsutils/PromiseOrValue"; | ||
@@ -21,0 +22,0 @@ export type { ArgumentNode, BooleanValueNode, DirectiveDefinitionNode, DirectiveNode, DocumentNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, EnumValueDefinitionNode, EnumValueNode, FieldDefinitionNode, FieldNode, FloatValueNode, FragmentDefinitionNode, FragmentSpreadNode, InlineFragmentNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InputValueDefinitionNode, IntValueNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, ListTypeNode, ListValueNode, NameNode, NamedTypeNode, NonNullTypeNode, NullValueNode, ObjectFieldNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, ObjectValueNode, OperationDefinitionNode, OperationTypeDefinitionNode, ScalarTypeDefinitionNode, ScalarTypeExtensionNode, SchemaDefinitionNode, SchemaExtensionNode, SelectionSetNode, StringValueNode, UnionTypeDefinitionNode, UnionTypeExtensionNode, VariableDefinitionNode, VariableNode, } from "graphql"; |
@@ -37,2 +37,3 @@ "use strict"; | ||
annotateDocumentWithSupermassiveLegacyTypesGraphQLTransform: () => import_annotateDocumentGraphQLTransform2.annotateDocumentGraphQLTransform, | ||
createSchemaDefinitions: () => import_mergeSchemaDefinitions.createSchemaDefinitions, | ||
decodeASTSchema: () => import_decodeASTSchema.decodeASTSchema, | ||
@@ -49,2 +50,3 @@ encodeASTSchema: () => import_encodeASTSchema.encodeASTSchema, | ||
mergeSchemaDefinitions: () => import_mergeSchemaDefinitions.mergeSchemaDefinitions, | ||
schemaFragmentFromMinimalViableSchemaDocument: () => import_schemaFragmentFromMinimalViableSchemaDocument.schemaFragmentFromMinimalViableSchemaDocument, | ||
specifiedScalarResolvers: () => import_resolvers.specifiedScalarResolvers, | ||
@@ -73,4 +75,5 @@ subscribeWithSchema: () => import_subscribeWithSchema.subscribeWithSchema, | ||
var import_mergeSchemaDefinitions = require("./utilities/mergeSchemaDefinitions"); | ||
var import_schemaFragmentFromMinimalViableSchemaDocument = require("./utilities/schemaFragmentFromMinimalViableSchemaDocument"); | ||
var LegacyTypedAST = __toESM(require("./legacyAST/TypedAST")); | ||
var import_addTypesToRequestDocument = require("./legacyAST/addTypesToRequestDocument"); | ||
var import_annotateDocumentGraphQLTransform2 = require("./legacyAST/annotateDocumentGraphQLTransform"); |
@@ -159,2 +159,10 @@ import { GraphQLError, GraphQLFormattedError, GraphQLScalarType, DocumentNode, FragmentDefinitionNode, OperationDefinitionNode } from "graphql"; | ||
export type SchemaFragmentLoader = (currentFragment: SchemaFragment, currentContextValue: unknown, req: SchemaFragmentRequest) => Promise<SchemaFragmentLoaderResult>; | ||
export type DocumentWithMinimalViableSchema = { | ||
readonly kind: "Document"; | ||
readonly loc?: Location; | ||
readonly definitions: DefinitionNodeWithMinimalViableSchema[]; | ||
}; | ||
export type DefinitionNodeWithMinimalViableSchema = (OperationDefinitionNode | FragmentDefinitionNode) & { | ||
readonly __defs: SchemaDefinitions; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -230,2 +230,3 @@ "use strict"; | ||
const args = (0, import_definition.getDirectiveDefinitionArgs)(tuple); | ||
const locations = (0, import_definition.getDirectiveLocations)(tuple); | ||
return { | ||
@@ -235,6 +236,9 @@ kind: import_graphql.Kind.DIRECTIVE_DEFINITION, | ||
arguments: args ? decodeArguments(args, types) : [], | ||
// TODO? locations and repeatable are irrelevant for execution | ||
repeatable: false, | ||
locations: [] | ||
locations: locations.map((loc) => ({ | ||
kind: import_graphql.Kind.NAME, | ||
value: (0, import_definition.decodeDirectiveLocation)(loc) | ||
})), | ||
// TODO? repeatable are irrelevant for execution | ||
repeatable: false | ||
}; | ||
} |
import { DirectiveDefinitionTuple, SchemaDefinitions, TypeDefinitionsRecord } from "../schema/definition"; | ||
export declare function createSchemaDefinitions(definitions: SchemaDefinitions[]): SchemaDefinitions; | ||
export declare function mergeSchemaDefinitions(accumulator: SchemaDefinitions, definitions: SchemaDefinitions[]): SchemaDefinitions; | ||
@@ -3,0 +4,0 @@ export declare function mergeDirectives(target: DirectiveDefinitionTuple[], source: DirectiveDefinitionTuple[]): void; |
@@ -21,2 +21,3 @@ "use strict"; | ||
__export(mergeSchemaDefinitions_exports, { | ||
createSchemaDefinitions: () => createSchemaDefinitions, | ||
mergeDirectives: () => mergeDirectives, | ||
@@ -29,2 +30,5 @@ mergeSchemaDefinitions: () => mergeSchemaDefinitions, | ||
var import_inspect = require("../jsutils/inspect"); | ||
function createSchemaDefinitions(definitions) { | ||
return mergeSchemaDefinitions({ types: {}, directives: [] }, definitions); | ||
} | ||
function mergeSchemaDefinitions(accumulator, definitions) { | ||
@@ -31,0 +35,0 @@ var _a; |
{ | ||
"name": "@graphitation/supermassive", | ||
"license": "MIT", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"main": "./lib/index", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1572460
404
15653