Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
fix(mapSchema): rewire directives last
Browse files Browse the repository at this point in the history
As they do not take a thunk.
  • Loading branch information
yaacovCR committed Mar 11, 2020
1 parent 9a565c7 commit b50b4ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ export function rewireTypes(
newTypeMap[newName] = namedType;
});

const newDirectives = directives.map(directive => rewireDirective(directive));

Object.keys(newTypeMap).forEach(typeName => {
newTypeMap[typeName] = rewireNamedType(newTypeMap[typeName]);
});

const newDirectives = directives.map(directive => rewireDirective(directive));

return pruneTypes(newTypeMap, newDirectives);

function rewireDirective(directive: GraphQLDirective): GraphQLDirective {
Expand Down

0 comments on commit b50b4ce

Please sign in to comment.