INNER CODE UNIT · TypeScript

enhanceWithNotField

OS-Guild/graphql-to-mongodb · src/graphQLFilterType.ts:131

function enhanceWithNotField(fields: GraphQLInputFieldConfigMap, scalarType: GraphQLScalarType | GraphQLEnumType): void {
    fields.NOT = { type: getGraphQLLeafFilterType(scalarType, true), description: '$not' };
}

function warnOfIndependentResolveFields(type: GraphQLFieldsType): void {
    cache(warnedIndependentResolvers, type.toString(), () => {
        const fields =
            getTypeFields(type, (key, field) =>
                field.resolve && !Array.isArray(field.dependencies))();

        Object.keys(fields).forEach(key =>
            warn(`Field ${key} of type ${type} has a resolve function and no dependencies`));

        return 1;
    });
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…