graphql-compose: addResolver stopped working for filterArgs
Hi,
I migrated my project dependencies to “graphql-compose-mongoose” “version”: “7.0.1”, and my filters stopped working :
I have a generic method that I use to add filter inputs like
addEntityByLocationSearch('connection')
addEntityByLocationSearch('findMany')
this is the corpus of the method
const addEntityByLocationSearch = function (resolverName) {
console.log( "adding entity filter by location for ", resolverName, " in ", EntityTC._gqType )
const extendedResolver = EntityTC.getResolver(resolverName).addFilterArg({
name: 'loc',
type: InputLatLngTC,
description: 'Search around a given location (lat, lng) in priority',
query: (query, value, resolveParams) => {
// FIXME do localized query
// query.name = new RegExp(value, 'i');
},
});
extendedResolver.name = resolverName;
EntityTC.addResolver(extendedResolver);
}
I get an error in my graphQL saying that cloc does not exist.
When I introspected my shcema in memory I found that the type used is FilterEntityInput, and querying gql about it, I don’t find any field named “loc”
{
__type(name: "FilterEntityInput") {
name
inputFields {
name
type {
name
description
}
}
}
}
Did the syntax change?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 19 (6 by maintainers)
Sorry for the delay. I had 3 talks and 2 workshops in the past week. Tomorrow night I’ll go home. So I’ll try to answer to you at the end of the week. Too tired and my brain doesn’t work.