INNER CODE UNIT · TypeScript

getGraphQLObjectFilterType

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

function getGraphQLObjectFilterType(
    type: GraphQLScalarType | GraphQLEnumType | GraphQLNonNull<any> | GraphQLInterfaceType | GraphQLObjectType | GraphQLList<any>,
    ...excludedFields: string[]): GraphQLInputType {
    if (isLeafType(type)) {
        return getGraphQLLeafFilterType(type);
    }

    if (type instanceof GraphQLNonNull) {
        return getGraphQLObjectFilterType(type.ofType);
    }

    if (type instanceof GraphQLList) {
        return getGraphQLObjectFilterType(type.ofType);
    }

    const typeName = setSuffix(type.name, 'Type', 'ObjectFilterType');
    return cache(typesCache, typeName, () => new GraphQLInputObjectType({
        name: typeName,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…