@apollo/federation-internals
Advanced tools
Comparing version 2.10.0-alpha.2 to 2.10.0-alpha.3
@@ -132,2 +132,7 @@ import { ASTNode, GraphQLError, GraphQLErrorOptions, GraphQLFormattedError } from "graphql"; | ||
CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS: ErrorCodeDefinition; | ||
COST_APPLIED_TO_INTERFACE_FIELD: ErrorCodeDefinition; | ||
LIST_SIZE_APPLIED_TO_NON_LIST: ErrorCodeDefinition; | ||
LIST_SIZE_INVALID_ASSUMED_SIZE: ErrorCodeDefinition; | ||
LIST_SIZE_INVALID_SIZED_FIELD: ErrorCodeDefinition; | ||
LIST_SIZE_INVALID_SLICING_ARGUMENT: ErrorCodeDefinition; | ||
}; | ||
@@ -134,0 +139,0 @@ export declare const REMOVED_ERRORS: string[][]; |
@@ -212,2 +212,7 @@ "use strict"; | ||
const CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS = makeCodeDefinition('CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS', 'Argument on field is marked contextual in only some subgraphs', { addedIn: '2.7.0' }); | ||
const COST_APPLIED_TO_INTERFACE_FIELD = makeCodeDefinition('COST_APPLIED_TO_INTERFACE_FIELD', 'The `@cost` directive must be applied to concrete types', { addedIn: '2.9.2' }); | ||
const LIST_SIZE_APPLIED_TO_NON_LIST = makeCodeDefinition('LIST_SIZE_APPLIED_TO_NON_LIST', 'The `@listSize` directive must be applied to list types', { addedIn: '2.9.2' }); | ||
const LIST_SIZE_INVALID_ASSUMED_SIZE = makeCodeDefinition('LIST_SIZE_INVALID_ASSUMED_SIZE', 'The `@listSize` directive assumed size cannot be negative', { addedIn: '2.9.2' }); | ||
const LIST_SIZE_INVALID_SLICING_ARGUMENT = makeCodeDefinition('LIST_SIZE_INVALID_SLICING_ARGUMENT', 'The `@listSize` directive must have existing integer slicing arguments', { addedIn: '2.9.2' }); | ||
const LIST_SIZE_INVALID_SIZED_FIELD = makeCodeDefinition('LIST_SIZE_INVALID_SIZED_FIELD', 'The `@listSize` directive must reference existing list fields as sized fields', { addedIn: '2.9.2' }); | ||
exports.ERROR_CATEGORIES = { | ||
@@ -306,2 +311,7 @@ DIRECTIVE_FIELDS_MISSING_EXTERNAL, | ||
CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS, | ||
COST_APPLIED_TO_INTERFACE_FIELD, | ||
LIST_SIZE_APPLIED_TO_NON_LIST, | ||
LIST_SIZE_INVALID_ASSUMED_SIZE, | ||
LIST_SIZE_INVALID_SIZED_FIELD, | ||
LIST_SIZE_INVALID_SLICING_ARGUMENT, | ||
}; | ||
@@ -308,0 +318,0 @@ const codeDefByCode = Object.values(exports.ERRORS).reduce((obj, codeDef) => { obj[codeDef.code] = codeDef; return obj; }, {}); |
@@ -136,3 +136,3 @@ import { CompositeType, CoreFeature, Directive, DirectiveDefinition, FieldDefinition, InputFieldDefinition, InterfaceType, NamedType, ObjectType, ScalarType, Schema, SchemaBlueprint, SchemaConfig, SchemaElement, UnionType } from "./definitions"; | ||
export declare function newEmptyFederation2Schema(config?: SchemaConfig): Schema; | ||
export declare function parseFieldSetArgument({ parentType, directive, fieldAccessor, validate, decorateValidationErrors, }: { | ||
export declare function parseFieldSetArgument({ parentType, directive, fieldAccessor, validate, decorateValidationErrors, normalize, }: { | ||
parentType: CompositeType; | ||
@@ -145,2 +145,3 @@ directive: Directive<SchemaElement<any, any>, { | ||
decorateValidationErrors?: boolean; | ||
normalize?: boolean; | ||
}): SelectionSet; | ||
@@ -147,0 +148,0 @@ export declare function collectTargetFields({ parentType, directive, includeInterfaceFieldsImplementations, validate, }: { |
@@ -6,3 +6,3 @@ import { ArgumentNode, DocumentNode, FieldNode, FragmentDefinitionNode, OperationDefinitionNode, SelectionNode, SelectionSetNode } from "graphql"; | ||
declare abstract class AbstractOperationElement<T extends AbstractOperationElement<T>> extends DirectiveTargetElement<T> { | ||
private attachements?; | ||
private attachments?; | ||
constructor(schema: Schema, directives?: readonly Directive<any>[]); | ||
@@ -19,5 +19,5 @@ collectVariables(collector: VariableCollector): void; | ||
protected abstract collectVariablesInElement(collector: VariableCollector): void; | ||
addAttachement(key: string, value: string): void; | ||
getAttachement(key: string): string | undefined; | ||
protected copyAttachementsTo(elt: AbstractOperationElement<any>): void; | ||
addAttachment(key: string, value: string): void; | ||
getAttachment(key: string): string | undefined; | ||
protected copyAttachmentsTo(elt: AbstractOperationElement<any>): void; | ||
protected keyForDirectives(): string; | ||
@@ -44,2 +44,3 @@ } | ||
baseType(): NamedType; | ||
copy(): Field<TArgs>; | ||
withUpdatedArguments(newArgs: TArgs): Field<TArgs>; | ||
@@ -145,2 +146,3 @@ withUpdatedDefinition(newDefinition: FieldDefinition<any>): Field<TArgs>; | ||
collectUsedFragmentNames(collector: Map<string, number>): void; | ||
collectVariables(collector: VariableCollector): void; | ||
toFragmentDefinitionNode(): FragmentDefinitionNode; | ||
@@ -365,2 +367,4 @@ canApplyDirectlyAtType(type: CompositeType): boolean; | ||
isTypenameField(): boolean; | ||
isPlainTypenameField(): boolean; | ||
withAttachment(key: string, value: string): FieldSelection; | ||
withUpdatedComponents(field: Field<any>, selectionSet: SelectionSet | undefined): FieldSelection; | ||
@@ -367,0 +371,0 @@ key(): string; |
{ | ||
"name": "@apollo/federation-internals", | ||
"version": "2.10.0-alpha.2", | ||
"version": "2.10.0-alpha.3", | ||
"description": "Apollo Federation internal utilities", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -600,2 +600,32 @@ import { ASTNode, GraphQLError, GraphQLErrorOptions, GraphQLFormattedError } from "graphql"; | ||
const COST_APPLIED_TO_INTERFACE_FIELD = makeCodeDefinition( | ||
'COST_APPLIED_TO_INTERFACE_FIELD', | ||
'The `@cost` directive must be applied to concrete types', | ||
{ addedIn: '2.9.2' }, | ||
); | ||
const LIST_SIZE_APPLIED_TO_NON_LIST = makeCodeDefinition( | ||
'LIST_SIZE_APPLIED_TO_NON_LIST', | ||
'The `@listSize` directive must be applied to list types', | ||
{ addedIn: '2.9.2' }, | ||
); | ||
const LIST_SIZE_INVALID_ASSUMED_SIZE = makeCodeDefinition( | ||
'LIST_SIZE_INVALID_ASSUMED_SIZE', | ||
'The `@listSize` directive assumed size cannot be negative', | ||
{ addedIn: '2.9.2' }, | ||
); | ||
const LIST_SIZE_INVALID_SLICING_ARGUMENT = makeCodeDefinition( | ||
'LIST_SIZE_INVALID_SLICING_ARGUMENT', | ||
'The `@listSize` directive must have existing integer slicing arguments', | ||
{ addedIn: '2.9.2' }, | ||
); | ||
const LIST_SIZE_INVALID_SIZED_FIELD = makeCodeDefinition( | ||
'LIST_SIZE_INVALID_SIZED_FIELD', | ||
'The `@listSize` directive must reference existing list fields as sized fields', | ||
{ addedIn: '2.9.2' }, | ||
); | ||
export const ERROR_CATEGORIES = { | ||
@@ -694,3 +724,9 @@ DIRECTIVE_FIELDS_MISSING_EXTERNAL, | ||
INTERFACE_KEY_MISSING_IMPLEMENTATION_TYPE, | ||
CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS, | ||
CONTEXTUAL_ARGUMENT_NOT_CONTEXTUAL_IN_ALL_SUBGRAPHS, | ||
// Errors related to demand control | ||
COST_APPLIED_TO_INTERFACE_FIELD, | ||
LIST_SIZE_APPLIED_TO_NON_LIST, | ||
LIST_SIZE_INVALID_ASSUMED_SIZE, | ||
LIST_SIZE_INVALID_SIZED_FIELD, | ||
LIST_SIZE_INVALID_SLICING_ARGUMENT, | ||
}; | ||
@@ -697,0 +733,0 @@ |
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 too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
2218712
35221