INNER CODE UNIT · TypeScript

fields

OS-Guild/graphql-to-mongodb · src/common.ts:90

        const fields = getTypeFields(graphQLType, (key, field) => !field.resolve, typeResolver, ...excludedFields)();
        const fieldsTypes = {};
        Object.keys(fields).forEach(key => fieldsTypes[key] = { type: fields[key].type });
        return fieldsTypes;
    };
}

export function getInnerType(graphQLType: GraphQLType): GraphQLType {
    let innerType = graphQLType;

    while (innerType instanceof GraphQLList
        || innerType instanceof GraphQLNonNull) {
        innerType = innerType.ofType;
    }

    return innerType;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…