replaced eslint:recommended with prettier

This commit is contained in:
Wyatt Johnson
2018-01-11 20:00:34 -07:00
parent d56c19016a
commit 0abc2ca243
649 changed files with 16235 additions and 13008 deletions
+8 -9
View File
@@ -1,7 +1,4 @@
const {
GraphQLObjectType,
GraphQLInterfaceType
} = require('graphql');
const { GraphQLObjectType, GraphQLInterfaceType } = require('graphql');
/**
* Iterates over each field in a schema.
@@ -18,14 +15,16 @@ const {
* @return {void}
*/
const forEachField = (schema, fn, options = {}) => {
const {includeResolveType = false} = options;
const { includeResolveType = false } = options;
const typeMap = schema.getTypeMap();
Object.keys(typeMap).forEach((typeName) => {
Object.keys(typeMap).forEach(typeName => {
const type = typeMap[typeName];
if (type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType) {
if (
type instanceof GraphQLObjectType ||
type instanceof GraphQLInterfaceType
) {
// Here we capture the change to extract the resolve type. We pass this
// with the `isResolveType = true` to introduce the specific beheviour.
if (includeResolveType && 'resolveType' in type) {
@@ -33,7 +32,7 @@ const forEachField = (schema, fn, options = {}) => {
}
const fields = type.getFields();
Object.keys(fields).forEach((fieldName) => {
Object.keys(fields).forEach(fieldName => {
const field = fields[fieldName];
fn(field, typeName, fieldName);
});