Skip to content

Commit

Permalink
Remove empty descriptions which will be included in SDL w/graphql@15.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
abernix committed Jan 24, 2020
1 parent 545f960 commit 2df3568
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions packages/apollo-federation/src/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,40 @@ import {

export const KeyDirective = new GraphQLDirective({
name: 'key',
description: '',
locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
args: {
fields: {
type: GraphQLNonNull(GraphQLString),
description: '',
},
},
});

export const ExtendsDirective = new GraphQLDirective({
name: 'extends',
description: '',
locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
});

export const ExternalDirective = new GraphQLDirective({
name: 'external',
description: '',
locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
});

export const RequiresDirective = new GraphQLDirective({
name: 'requires',
description: '',
locations: [DirectiveLocation.FIELD_DEFINITION],
args: {
fields: {
type: GraphQLNonNull(GraphQLString),
description: '',
},
},
});

export const ProvidesDirective = new GraphQLDirective({
name: 'provides',
description: '',
locations: [DirectiveLocation.FIELD_DEFINITION],
args: {
fields: {
type: GraphQLNonNull(GraphQLString),
description: '',
},
},
});
Expand Down
1 change: 0 additions & 1 deletion packages/apollo-federation/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export const entitiesField: GraphQLFieldConfig<any, any> = {
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(AnyType))),
},
},
description: '',
resolve(_source, { representations }, context, info) {
return representations.map((reference: { __typename: string } & object) => {
const { __typename } = reference;
Expand Down

0 comments on commit 2df3568

Please sign in to comment.