@apollo/federation
Advanced tools
Comparing version 0.25.0 to 0.25.1
@@ -7,2 +7,9 @@ # CHANGELOG for `@apollo/federation` | ||
- `ASTNodeWithDirectives` now includes all AST nodes with the `directives` field on it. [PR #755](https://github.com/apollographql/federation/pull/755) | ||
## Update spec | ||
- Add `repeatable` keyword to the @key directive in federation spec. [PR #758](https://github.com/apollographql/federation/pull/758) | ||
## v0.25.0 | ||
- Composition errors now include `locations` corresponding to the line number & column in the subgraph SDL. [PR #686](https://github.com/apollographql/federation/pull/686) | ||
@@ -9,0 +16,0 @@ |
@@ -1,3 +0,4 @@ | ||
import { FieldDefinitionNode, StringValueNode, NameNode, DocumentNode, DirectiveNode, GraphQLNamedType, GraphQLError, GraphQLSchema, GraphQLObjectType, GraphQLField, SelectionNode, TypeDefinitionNode, InputValueDefinitionNode, TypeExtensionNode, ASTNode, DirectiveDefinitionNode, GraphQLDirective, OperationTypeNode, EnumValueDefinitionNode, SchemaDefinitionNode, ExecutableDefinitionNode, TypeSystemExtensionNode } from 'graphql'; | ||
import { StringValueNode, NameNode, DocumentNode, DirectiveNode, GraphQLNamedType, GraphQLError, GraphQLSchema, GraphQLObjectType, GraphQLField, SelectionNode, TypeDefinitionNode, TypeExtensionNode, ASTNode, DirectiveDefinitionNode, GraphQLDirective, OperationTypeNode } from 'graphql'; | ||
import { ExternalFieldDefinition, DefaultRootOperationTypeName, Maybe, FederationType, FederationDirective, FederationField, ServiceDefinition } from './types'; | ||
import { ASTNodeWithDirectives } from '../directives'; | ||
export declare function isStringValueNode(node: any): node is StringValueNode; | ||
@@ -8,5 +9,5 @@ export declare function isDirectiveDefinitionNode(node: any): node is DirectiveDefinitionNode; | ||
}>(fields: ReadonlyArray<Node>, serviceName: string): any; | ||
export declare function findDirectivesOnNode(node: Maybe<FieldDefinitionNode | InputValueDefinitionNode | EnumValueDefinitionNode | SchemaDefinitionNode | ExecutableDefinitionNode | SelectionNode | TypeDefinitionNode | TypeSystemExtensionNode>, directiveName: string): DirectiveNode[]; | ||
export declare function findDirectivesOnNode(node: Maybe<ASTNodeWithDirectives>, directiveName: string): DirectiveNode[]; | ||
export declare function printFieldSet(selections: readonly SelectionNode[]): string; | ||
export declare function findSelectionSetOnNode(node: Maybe<FieldDefinitionNode | InputValueDefinitionNode | EnumValueDefinitionNode | SchemaDefinitionNode | ExecutableDefinitionNode | SelectionNode | TypeDefinitionNode | TypeSystemExtensionNode>, directiveName: string, printedSelectionSet: string): import("graphql").ValueNode | undefined; | ||
export declare function findSelectionSetOnNode(node: Maybe<ASTNodeWithDirectives>, directiveName: string, printedSelectionSet: string): import("graphql").ValueNode | undefined; | ||
export declare function stripExternalFieldsFromTypeDefs(typeDefs: DocumentNode, serviceName: string): { | ||
@@ -13,0 +14,0 @@ typeDefsWithoutExternalFields: DocumentNode; |
@@ -1,2 +0,2 @@ | ||
import { GraphQLDirective, GraphQLNamedType, GraphQLInputObjectType, DirectiveNode, ScalarTypeDefinitionNode, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, EnumTypeDefinitionNode, ScalarTypeExtensionNode, ObjectTypeExtensionNode, InterfaceTypeExtensionNode, UnionTypeExtensionNode, EnumTypeExtensionNode, GraphQLField, FieldDefinitionNode } from 'graphql'; | ||
import { GraphQLDirective, GraphQLNamedType, GraphQLInputObjectType, DirectiveNode, GraphQLField, FieldDefinitionNode, InputValueDefinitionNode, SchemaDefinitionNode, TypeSystemExtensionNode, TypeDefinitionNode, ExecutableDefinitionNode } from 'graphql'; | ||
export declare const KeyDirective: GraphQLDirective; | ||
@@ -9,3 +9,3 @@ export declare const ExtendsDirective: GraphQLDirective; | ||
export default federationDirectives; | ||
export declare type ASTNodeWithDirectives = ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | FieldDefinitionNode; | ||
export declare type ASTNodeWithDirectives = FieldDefinitionNode | InputValueDefinitionNode | ExecutableDefinitionNode | SchemaDefinitionNode | TypeDefinitionNode | TypeSystemExtensionNode; | ||
export declare type GraphQLNamedTypeWithDirectives = Exclude<GraphQLNamedType, GraphQLInputObjectType>; | ||
@@ -12,0 +12,0 @@ export declare function gatherDirectives(type: GraphQLNamedTypeWithDirectives | GraphQLField<any, any>): DirectiveNode[]; |
{ | ||
"name": "@apollo/federation", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "Apollo Federation Utilities", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"apollo-graphql": "^0.9.2", | ||
"apollo-graphql": "^0.9.3", | ||
"lodash.xorby": "^4.7.0" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "493fd4153d104cbd87c8f33da85d8b92c94ecae0" | ||
"gitHead": "5ea2b6a7b12a657aecd0f1049c069eb1225bd8f7" | ||
} |
@@ -913,3 +913,3 @@ import { composeAndValidate } from '../composeAndValidate'; | ||
# Federation directives | ||
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE | ||
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE | ||
directive @external on FIELD_DEFINITION | ||
@@ -972,3 +972,3 @@ directive @requires(fields: _FieldSet!) on FIELD_DEFINITION | ||
# Federation directives | ||
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE | ||
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE | ||
directive @external on FIELD_DEFINITION | ||
@@ -975,0 +975,0 @@ directive @requires(fields: _FieldSet!) on FIELD_DEFINITION |
@@ -172,3 +172,3 @@ import gql from 'graphql-tag'; | ||
# Federation directives | ||
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE | ||
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE | ||
directive @external on FIELD_DEFINITION | ||
@@ -322,3 +322,3 @@ directive @requires(fields: _FieldSet!) on FIELD_DEFINITION | ||
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE | ||
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE | ||
directive @external on FIELD_DEFINITION | ||
@@ -325,0 +325,0 @@ directive @requires(fields: _FieldSet!) on FIELD_DEFINITION |
@@ -34,6 +34,2 @@ import { | ||
isNamedType, | ||
EnumValueDefinitionNode, | ||
SchemaDefinitionNode, | ||
ExecutableDefinitionNode, | ||
TypeSystemExtensionNode, | ||
stripIgnoredCharacters, | ||
@@ -50,3 +46,3 @@ } from 'graphql'; | ||
} from './types'; | ||
import federationDirectives from '../directives'; | ||
import federationDirectives, { ASTNodeWithDirectives } from '../directives'; | ||
import { assert, isNotNullOrUndefined } from '../utilities'; | ||
@@ -75,10 +71,3 @@ | ||
node: Maybe< | ||
| FieldDefinitionNode | ||
| InputValueDefinitionNode | ||
| EnumValueDefinitionNode | ||
| SchemaDefinitionNode | ||
| ExecutableDefinitionNode | ||
| SelectionNode | ||
| TypeDefinitionNode | ||
| TypeSystemExtensionNode | ||
ASTNodeWithDirectives | ||
>, | ||
@@ -114,10 +103,3 @@ directiveName: string, | ||
node: Maybe< | ||
| FieldDefinitionNode | ||
| InputValueDefinitionNode | ||
| EnumValueDefinitionNode | ||
| SchemaDefinitionNode | ||
| ExecutableDefinitionNode | ||
| SelectionNode | ||
| TypeDefinitionNode | ||
| TypeSystemExtensionNode | ||
ASTNodeWithDirectives | ||
>, | ||
@@ -124,0 +106,0 @@ directiveName: string, |
@@ -10,14 +10,9 @@ import { | ||
DirectiveNode, | ||
ScalarTypeDefinitionNode, | ||
ObjectTypeDefinitionNode, | ||
InterfaceTypeDefinitionNode, | ||
UnionTypeDefinitionNode, | ||
EnumTypeDefinitionNode, | ||
ScalarTypeExtensionNode, | ||
ObjectTypeExtensionNode, | ||
InterfaceTypeExtensionNode, | ||
UnionTypeExtensionNode, | ||
EnumTypeExtensionNode, | ||
GraphQLField, | ||
FieldDefinitionNode, | ||
InputValueDefinitionNode, | ||
SchemaDefinitionNode, | ||
TypeSystemExtensionNode, | ||
TypeDefinitionNode, | ||
ExecutableDefinitionNode, | ||
} from 'graphql'; | ||
@@ -76,13 +71,8 @@ | ||
export type ASTNodeWithDirectives = | ||
| ScalarTypeDefinitionNode | ||
| ObjectTypeDefinitionNode | ||
| InterfaceTypeDefinitionNode | ||
| UnionTypeDefinitionNode | ||
| EnumTypeDefinitionNode | ||
| ScalarTypeExtensionNode | ||
| ObjectTypeExtensionNode | ||
| InterfaceTypeExtensionNode | ||
| UnionTypeExtensionNode | ||
| EnumTypeExtensionNode | ||
| FieldDefinitionNode; | ||
| FieldDefinitionNode | ||
| InputValueDefinitionNode | ||
| ExecutableDefinitionNode | ||
| SchemaDefinitionNode | ||
| TypeDefinitionNode | ||
| TypeSystemExtensionNode; | ||
@@ -89,0 +79,0 @@ // | GraphQLField<any, any> |
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
782069
17189
Updatedapollo-graphql@^0.9.3