@apollo/federation-internals
Advanced tools
Comparing version 2.3.2 to 2.3.3
# CHANGELOG for `@apollo/federation-internals` | ||
## 2.3.3 | ||
## 2.3.2 | ||
@@ -4,0 +6,0 @@ |
import { DocumentNode, Source } from "graphql"; | ||
import { SchemaBlueprint, Schema, Type } from "./definitions"; | ||
export declare type BuildSchemaOptions = { | ||
export type BuildSchemaOptions = { | ||
blueprint?: SchemaBlueprint; | ||
@@ -5,0 +5,0 @@ validate?: boolean; |
@@ -9,3 +9,3 @@ import { ASTNode, GraphQLError, StringValueNode } from "graphql"; | ||
export declare const corePurposes: ("SECURITY" | "EXECUTION")[]; | ||
export declare type CorePurpose = typeof corePurposes[number]; | ||
export type CorePurpose = typeof corePurposes[number]; | ||
export declare abstract class FeatureDefinition { | ||
@@ -40,3 +40,3 @@ readonly url: FeatureUrl; | ||
} | ||
export declare type CoreDirectiveArgs = { | ||
export type CoreDirectiveArgs = { | ||
url: undefined; | ||
@@ -47,3 +47,3 @@ feature: string; | ||
}; | ||
export declare type LinkDirectiveArgs = { | ||
export type LinkDirectiveArgs = { | ||
url: string; | ||
@@ -55,4 +55,4 @@ feature: undefined; | ||
}; | ||
export declare type CoreOrLinkDirectiveArgs = CoreDirectiveArgs | LinkDirectiveArgs; | ||
export declare type CoreImport = { | ||
export type CoreOrLinkDirectiveArgs = CoreDirectiveArgs | LinkDirectiveArgs; | ||
export type CoreImport = { | ||
name: string; | ||
@@ -59,0 +59,0 @@ as?: string; |
@@ -8,22 +8,22 @@ import { ConstArgumentNode, ASTNode, DirectiveLocation, ConstDirectiveNode, DocumentNode, GraphQLError, GraphQLSchema, Kind, TypeNode, VariableDefinitionNode, VariableNode, DirectiveDefinitionNode, DirectiveNode } from "graphql"; | ||
export declare const typenameFieldName = "__typename"; | ||
export declare type QueryRootKind = 'query'; | ||
export declare type MutationRootKind = 'mutation'; | ||
export declare type SubscriptionRootKind = 'subscription'; | ||
export declare type SchemaRootKind = QueryRootKind | MutationRootKind | SubscriptionRootKind; | ||
export type QueryRootKind = 'query'; | ||
export type MutationRootKind = 'mutation'; | ||
export type SubscriptionRootKind = 'subscription'; | ||
export type SchemaRootKind = QueryRootKind | MutationRootKind | SubscriptionRootKind; | ||
export declare const allSchemaRootKinds: SchemaRootKind[]; | ||
export declare function defaultRootName(rootKind: SchemaRootKind): string; | ||
export declare function isSchemaRootType(type: NamedType): boolean; | ||
export declare type Type = NamedType | WrapperType; | ||
export declare type NamedType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | InputObjectType; | ||
export declare type OutputType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | ListType<any> | NonNullType<any>; | ||
export declare type InputType = ScalarType | EnumType | InputObjectType | ListType<any> | NonNullType<any>; | ||
export declare type WrapperType = ListType<any> | NonNullType<any>; | ||
export declare type AbstractType = InterfaceType | UnionType; | ||
export declare type CompositeType = ObjectType | InterfaceType | UnionType; | ||
export declare type OutputTypeReferencer = FieldDefinition<any>; | ||
export declare type InputTypeReferencer = InputFieldDefinition | ArgumentDefinition<any>; | ||
export declare type ObjectTypeReferencer = OutputTypeReferencer | UnionType | SchemaDefinition; | ||
export declare type InterfaceTypeReferencer = OutputTypeReferencer | ObjectType | InterfaceType; | ||
export declare type NullableType = NamedType | ListType<any>; | ||
export declare type NamedTypeKind = NamedType['kind']; | ||
export type Type = NamedType | WrapperType; | ||
export type NamedType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | InputObjectType; | ||
export type OutputType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | ListType<any> | NonNullType<any>; | ||
export type InputType = ScalarType | EnumType | InputObjectType | ListType<any> | NonNullType<any>; | ||
export type WrapperType = ListType<any> | NonNullType<any>; | ||
export type AbstractType = InterfaceType | UnionType; | ||
export type CompositeType = ObjectType | InterfaceType | UnionType; | ||
export type OutputTypeReferencer = FieldDefinition<any>; | ||
export type InputTypeReferencer = InputFieldDefinition | ArgumentDefinition<any>; | ||
export type ObjectTypeReferencer = OutputTypeReferencer | UnionType | SchemaDefinition; | ||
export type InterfaceTypeReferencer = OutputTypeReferencer | ObjectType | InterfaceType; | ||
export type NullableType = NamedType | ListType<any>; | ||
export type NamedTypeKind = NamedType['kind']; | ||
export declare function isNamedType(type: Type): type is NamedType; | ||
@@ -63,3 +63,3 @@ export declare function isWrapperType(type: Type): type is WrapperType; | ||
export declare function typeFromAST(schema: Schema, node: TypeNode): Type; | ||
export declare type LeafType = ScalarType | EnumType; | ||
export type LeafType = ScalarType | EnumType; | ||
export declare function isLeafType(type: Type): type is LeafType; | ||
@@ -69,3 +69,3 @@ export interface Named { | ||
} | ||
export declare type ExtendableElement = SchemaDefinition | NamedType; | ||
export type ExtendableElement = SchemaDefinition | NamedType; | ||
export declare class DirectiveTargetElement<T extends DirectiveTargetElement<T>> { | ||
@@ -112,3 +112,3 @@ private readonly _schema; | ||
} | ||
declare type UnappliedDirective = { | ||
type UnappliedDirective = { | ||
nameOrDef: DirectiveDefinition<Record<string, any>> | string; | ||
@@ -243,7 +243,7 @@ args: Record<string, any>; | ||
} | ||
export declare type DeferDirectiveArgs = { | ||
export type DeferDirectiveArgs = { | ||
label?: string; | ||
if?: boolean | Variable; | ||
}; | ||
export declare type StreamDirectiveArgs = { | ||
export type StreamDirectiveArgs = { | ||
label?: string; | ||
@@ -253,3 +253,3 @@ initialCount: number; | ||
}; | ||
export declare type SchemaConfig = { | ||
export type SchemaConfig = { | ||
cacheAST?: boolean; | ||
@@ -631,3 +631,3 @@ }; | ||
} | ||
export declare type Variables = readonly Variable[]; | ||
export type Variables = readonly Variable[]; | ||
export declare function mergeVariables(v1s: Variables, v2s: Variables): Variables; | ||
@@ -634,0 +634,0 @@ export declare function containsVariable(variables: Variables, toCheck: Variable): boolean; |
import { DirectiveLocation, GraphQLError } from "graphql"; | ||
import { InputType, OutputType, Schema } from "./definitions"; | ||
export declare type DirectiveSpecification = { | ||
export type DirectiveSpecification = { | ||
name: string; | ||
checkOrAdd: (schema: Schema, nameInSchema?: string, asBuiltIn?: boolean) => GraphQLError[]; | ||
}; | ||
export declare type TypeSpecification = { | ||
export type TypeSpecification = { | ||
name: string; | ||
checkOrAdd: (schema: Schema, nameInSchema?: string, asBuiltIn?: boolean) => GraphQLError[]; | ||
}; | ||
export declare type ArgumentSpecification = { | ||
export type ArgumentSpecification = { | ||
name: string; | ||
@@ -16,3 +16,3 @@ type: InputType; | ||
}; | ||
export declare type FieldSpecification = { | ||
export type FieldSpecification = { | ||
name: string; | ||
@@ -19,0 +19,0 @@ type: OutputType; |
import { ASTNode, GraphQLError, GraphQLErrorOptions, GraphQLFormattedError } from "graphql"; | ||
declare type SchemaRootKind = 'query' | 'mutation' | 'subscription'; | ||
export declare type ErrorCodeMetadata = { | ||
type SchemaRootKind = 'query' | 'mutation' | 'subscription'; | ||
export type ErrorCodeMetadata = { | ||
addedIn: string; | ||
replaces?: string[]; | ||
}; | ||
export declare type ErrorCodeDefinition = { | ||
export type ErrorCodeDefinition = { | ||
code: string; | ||
@@ -18,3 +18,3 @@ description: string; | ||
export declare function printErrors(errors: GraphQLError[]): string; | ||
export declare type ErrorCodeCategory<TElement = string> = { | ||
export type ErrorCodeCategory<TElement = string> = { | ||
get(element: TElement): ErrorCodeDefinition; | ||
@@ -21,0 +21,0 @@ }; |
@@ -69,3 +69,3 @@ import { CompositeType, CoreFeature, Directive, DirectiveDefinition, FieldDefinition, InputFieldDefinition, InterfaceType, NamedType, ObjectType, ScalarType, Schema, SchemaBlueprint, SchemaConfig, SchemaElement, UnionType } from "./definitions"; | ||
} | ||
export declare type FederationDirectiveNotDefinedInSchema<TApplicationArgs extends { | ||
export type FederationDirectiveNotDefinedInSchema<TApplicationArgs extends { | ||
[key: string]: any; | ||
@@ -76,3 +76,3 @@ }> = { | ||
}; | ||
export declare type Post20FederationDirectiveDefinition<TApplicationArgs extends { | ||
export type Post20FederationDirectiveDefinition<TApplicationArgs extends { | ||
[key: string]: any; | ||
@@ -168,3 +168,3 @@ }> = DirectiveDefinition<TApplicationArgs> | FederationDirectiveNotDefinedInSchema<TApplicationArgs>; | ||
} | ||
export declare type SubgraphASTNode = ASTNode & { | ||
export type SubgraphASTNode = ASTNode & { | ||
subgraph: string; | ||
@@ -174,3 +174,3 @@ }; | ||
export declare function addSubgraphToError(e: GraphQLError, subgraphName: string, errorCode?: ErrorCodeDefinition): GraphQLError; | ||
export declare type ProvidesOrRequiresApplication = Directive<FieldDefinition<ObjectType | InterfaceType>, { | ||
export type ProvidesOrRequiresApplication = Directive<FieldDefinition<ObjectType | InterfaceType>, { | ||
fields: any; | ||
@@ -177,0 +177,0 @@ }>; |
@@ -63,4 +63,4 @@ import { DocumentNode, FieldNode, FragmentDefinitionNode, SelectionNode, SelectionSetNode } from "graphql"; | ||
} | ||
export declare type OperationElement = Field<any> | FragmentElement; | ||
export declare type OperationPath = OperationElement[]; | ||
export type OperationElement = Field<any> | FragmentElement; | ||
export type OperationPath = OperationElement[]; | ||
export declare function operationPathToStringPath(path: OperationPath): string[]; | ||
@@ -70,3 +70,3 @@ export declare function sameOperationPaths(p1: OperationPath, p2: OperationPath): boolean; | ||
export declare function concatOperationPaths(head: OperationPath, tail: OperationPath): OperationPath; | ||
export declare type RootOperationPath = { | ||
export type RootOperationPath = { | ||
rootKind: SchemaRootKind; | ||
@@ -195,3 +195,3 @@ path: OperationPath; | ||
export declare function selectionOfElement(element: OperationElement, subSelection?: SelectionSet): Selection; | ||
export declare type Selection = FieldSelection | FragmentSelection; | ||
export type Selection = FieldSelection | FragmentSelection; | ||
export declare class FieldSelection extends Freezable<FieldSelection> { | ||
@@ -198,0 +198,0 @@ readonly field: Field<any>; |
import { Directive, DirectiveDefinition, FieldDefinition, NamedType, Schema, SchemaRootKind } from "./definitions"; | ||
export declare type PrintOptions = { | ||
export type PrintOptions = { | ||
indentString: string; | ||
@@ -4,0 +4,0 @@ definitionsOrder: ('schema' | 'types' | 'directives')[]; |
import { GraphQLError } from "graphql"; | ||
import { Subgraphs } from "./federation"; | ||
import { MultiMap } from "./utils"; | ||
export declare type UpgradeResult = UpgradeSuccess | UpgradeFailure; | ||
declare type UpgradeChanges = MultiMap<UpgradeChangeID, UpgradeChange>; | ||
export declare type UpgradeSuccess = { | ||
export type UpgradeResult = UpgradeSuccess | UpgradeFailure; | ||
type UpgradeChanges = MultiMap<UpgradeChangeID, UpgradeChange>; | ||
export type UpgradeSuccess = { | ||
subgraphs: Subgraphs; | ||
@@ -11,3 +11,3 @@ changes: Map<string, UpgradeChanges>; | ||
}; | ||
export declare type UpgradeFailure = { | ||
export type UpgradeFailure = { | ||
subgraphs?: never; | ||
@@ -17,4 +17,4 @@ changes?: never; | ||
}; | ||
export declare type UpgradeChangeID = UpgradeChange['id']; | ||
export declare type UpgradeChange = ExternalOnTypeExtensionRemoval | TypeExtensionRemoval | UnusedExternalRemoval | TypeWithOnlyUnusedExternalRemoval | ExternalOnInterfaceRemoval | ExternalOnObjectTypeRemoval | InactiveProvidesOrRequiresRemoval | InactiveProvidesOrRequiresFieldsRemoval | ShareableFieldAddition | ShareableTypeAddition | KeyOnInterfaceRemoval | ProvidesOrRequiresOnInterfaceFieldRemoval | ProvidesOnNonCompositeRemoval | FieldsArgumentCoercionToString | RemovedTagOnExternal; | ||
export type UpgradeChangeID = UpgradeChange['id']; | ||
export type UpgradeChange = ExternalOnTypeExtensionRemoval | TypeExtensionRemoval | UnusedExternalRemoval | TypeWithOnlyUnusedExternalRemoval | ExternalOnInterfaceRemoval | ExternalOnObjectTypeRemoval | InactiveProvidesOrRequiresRemoval | InactiveProvidesOrRequiresFieldsRemoval | ShareableFieldAddition | ShareableTypeAddition | KeyOnInterfaceRemoval | ProvidesOrRequiresOnInterfaceFieldRemoval | ProvidesOnNonCompositeRemoval | FieldsArgumentCoercionToString | RemovedTagOnExternal; | ||
export declare class ExternalOnTypeExtensionRemoval { | ||
@@ -21,0 +21,0 @@ readonly field: string; |
import { AbstractType, InterfaceType, ObjectType, Type, UnionType } from "./definitions"; | ||
export declare const ALL_SUBTYPING_RULES: ("direct" | "nonNullable_downgrade" | "list_upgrade" | "list_propagation" | "nonNullable_propagation")[]; | ||
export declare type SubtypingRule = typeof ALL_SUBTYPING_RULES[number]; | ||
export type SubtypingRule = typeof ALL_SUBTYPING_RULES[number]; | ||
export declare const DEFAULT_SUBTYPING_RULES: ("direct" | "nonNullable_downgrade" | "list_upgrade" | "list_propagation" | "nonNullable_propagation")[]; | ||
@@ -5,0 +5,0 @@ export declare function sameType(t1: Type, t2: Type): boolean; |
@@ -57,3 +57,3 @@ export declare function assert(condition: any, message: string | (() => string)): asserts condition; | ||
}): string; | ||
export declare type Concrete<Type> = { | ||
export type Concrete<Type> = { | ||
[Property in keyof Type]-?: Type[Property]; | ||
@@ -60,0 +60,0 @@ }; |
@@ -56,7 +56,2 @@ "use strict"; | ||
class OrderedMap { | ||
constructor(compareFn = OrderedMap.defaultCompareFn) { | ||
this._keys = []; | ||
this._values = new Map(); | ||
this._compareFn = compareFn; | ||
} | ||
static defaultCompareFn(a, b) { | ||
@@ -71,2 +66,7 @@ if (a < b) { | ||
} | ||
constructor(compareFn = OrderedMap.defaultCompareFn) { | ||
this._keys = []; | ||
this._values = new Map(); | ||
this._compareFn = compareFn; | ||
} | ||
add(key, value) { | ||
@@ -73,0 +73,0 @@ if (!this._values.has(key)) { |
{ | ||
"name": "@apollo/federation-internals", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Apollo Federation internal utilities", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
2018045