Skip to content

Commit 9db3db8

Browse files
authored
* Adjust test to not use deprecated `introspectionQuery` constant. Instead, use `getIntrospectionQuery` instead, which has been around since before [email protected], thus within our supported version ranges. * Adjust documentation links for moved `introspectionQuery` page. This file now lives at `getIntrospectionQuery`. * Applying upstream modification to `printDescription`. I'm assuming we'll want to keep this change which was also applied upstream, though I'm not sure what our longer term plans are for keeping up with these changes. Ref: https://github.com/graphql/graphql-js/pull/2177/files#diff-71ba52e9c625f826d2b0df2963c8633aR320 * Remove empty descriptions which will be included in SDL w/graphql@15. In `graphql@15`, empty descriptions are intentionally included in the SDL output. In order to be excluded entirely, they must be absent (or `null`). Ref: graphql/graphql-js#2177 Apollo-Orig-Commit-AS: apollographql/apollo-server@131c9b8
1 parent bd2300a commit 9db3db8

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

federation-js/src/directives.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,40 @@ import {
2323

2424
export const KeyDirective = new GraphQLDirective({
2525
name: 'key',
26-
description: '',
2726
locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
2827
args: {
2928
fields: {
3029
type: GraphQLNonNull(GraphQLString),
31-
description: '',
3230
},
3331
},
3432
});
3533

3634
export const ExtendsDirective = new GraphQLDirective({
3735
name: 'extends',
38-
description: '',
3936
locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
4037
});
4138

4239
export const ExternalDirective = new GraphQLDirective({
4340
name: 'external',
44-
description: '',
4541
locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
4642
});
4743

4844
export const RequiresDirective = new GraphQLDirective({
4945
name: 'requires',
50-
description: '',
5146
locations: [DirectiveLocation.FIELD_DEFINITION],
5247
args: {
5348
fields: {
5449
type: GraphQLNonNull(GraphQLString),
55-
description: '',
5650
},
5751
},
5852
});
5953

6054
export const ProvidesDirective = new GraphQLDirective({
6155
name: 'provides',
62-
description: '',
6356
locations: [DirectiveLocation.FIELD_DEFINITION],
6457
args: {
6558
fields: {
6659
type: GraphQLNonNull(GraphQLString),
67-
description: '',
6860
},
6961
},
7062
});

federation-js/src/service/printFederatedSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ function printDescription(
342342
| GraphQLUnionType,
343343
indentation: string = '',
344344
): string {
345-
if (!def.description) {
345+
if (def.description == null) {
346346
return '';
347347
}
348348

federation-js/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const entitiesField: GraphQLFieldConfig<any, any> = {
7676
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(AnyType))),
7777
},
7878
},
79-
description: '',
8079
resolve(_source, { representations }, context, info) {
8180
return representations.map((reference: { __typename: string } & object) => {
8281
const { __typename } = reference;

0 commit comments

Comments
 (0)