Skip to content

Commit

Permalink
Naming similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron committed Mar 23, 2016
1 parent 2d833ad commit 3f6a7f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utilities/extendSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export function extendSchema(
name: type.name,
description: type.description,
fields: () => extendFieldMap(type),
resolveType: throwClientSchemaExecutionError,
resolveType: cannotExecuteClientSchema,
});
}

Expand All @@ -282,7 +282,7 @@ export function extendSchema(
name: type.name,
description: type.description,
types: type.getPossibleTypes().map(getTypeFromDef),
resolveType: throwClientSchemaExecutionError,
resolveType: cannotExecuteClientSchema,
});
}

Expand Down Expand Up @@ -322,7 +322,7 @@ export function extendSchema(
deprecationReason: field.deprecationReason,
type: extendFieldType(field.type),
args: keyMap(field.args, arg => arg.name),
resolve: throwClientSchemaExecutionError,
resolve: cannotExecuteClientSchema,
};
});

Expand All @@ -342,7 +342,7 @@ export function extendSchema(
newFieldMap[fieldName] = {
type: buildFieldType(field.type),
args: buildInputValues(field.arguments),
resolve: throwClientSchemaExecutionError,
resolve: cannotExecuteClientSchema,
};
});
});
Expand Down Expand Up @@ -384,15 +384,15 @@ export function extendSchema(
return new GraphQLInterfaceType({
name: typeAST.name.value,
fields: () => buildFieldMap(typeAST),
resolveType: throwClientSchemaExecutionError,
resolveType: cannotExecuteClientSchema,
});
}

function buildUnionType(typeAST: UnionTypeDefinition) {
return new GraphQLUnionType({
name: typeAST.name.value,
types: typeAST.types.map(getTypeFromAST),
resolveType: throwClientSchemaExecutionError,
resolveType: cannotExecuteClientSchema,
});
}

Expand Down Expand Up @@ -434,7 +434,7 @@ export function extendSchema(
field => ({
type: buildFieldType(field.type),
args: buildInputValues(field.arguments),
resolve: throwClientSchemaExecutionError,
resolve: cannotExecuteClientSchema,
})
);
}
Expand Down Expand Up @@ -464,6 +464,6 @@ export function extendSchema(
}
}

function throwClientSchemaExecutionError() {
function cannotExecuteClientSchema() {
throw new Error('Client Schema cannot be used for execution.');
}

0 comments on commit 3f6a7f4

Please sign in to comment.