INNER CODE UNIT · TypeScript
getInputObjectTypeFields
OS-Guild/graphql-to-mongodb · src/graphQLFilterType.ts:77
function getInputObjectTypeFields(type: GraphQLFieldsType, ...excludedFields: string[]): () => FieldMap<GraphQLInputType> {
return () => {
const generatedFields = getUnresolvedFieldsTypes(type, getGraphQLObjectFilterType, ...excludedFields)();
warnOfIndependentResolveFields(type);
generatedFields['opr'] = { type: GetOprExistsType() };
return generatedFields;
};
}
function getGraphQLLeafFilterType(leafType: GraphQLLeafType, not: boolean = false): GraphQLInputObjectType {
const typeName = leafType.toString() + (not ? `Not` : '') + `Filter`;
return cache(typesCache, typeName, () => new GraphQLInputObjectType({
name: typeName,
description: `Filter type for ${(not ? `$not of ` : '')}${leafType} scalar`,