Skip to content

Commit

Permalink
Adjust spelling of variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix committed Aug 23, 2019
1 parent fa2aa6c commit 4bd1f90
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ export function buildFederatedSchema(
// The last type in the union for `modulesOrSDL` supports this "legacy" input
// style in a simple manner (by just adding the resolvers to the first typeDefs entry)
//
let shappedModulesOrSDL:
let shapedModulesOrSDL:
| (GraphQLSchemaModule | DocumentNode)[]
| DocumentNode;
if ('typeDefs' in modulesOrSDL) {
const { typeDefs, resolvers } = modulesOrSDL;
const augmentedTypeDefs = Array.isArray(typeDefs) ? typeDefs : [typeDefs];
shappedModulesOrSDL = augmentedTypeDefs.map((typeDefs, i) => {
shapedModulesOrSDL = augmentedTypeDefs.map((typeDefs, i) => {
const module: GraphQLSchemaModule = { typeDefs };
// add the resolvers to the first "module" in the array
if (i === 0 && resolvers) module.resolvers = resolvers;
return module;
});
} else {
shappedModulesOrSDL = modulesOrSDL;
shapedModulesOrSDL = modulesOrSDL;
}

const modules = modulesFromSDL(shappedModulesOrSDL);
const modules = modulesFromSDL(shapedModulesOrSDL);

let schema = buildSchemaFromSDL(
modules,
Expand Down

0 comments on commit 4bd1f90

Please sign in to comment.