Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-17-2021 10:40 AM
I'm using GraphQL on top of Neo4j with the @neo4j/graphql NodeJS library.
I'd like to implement custom resolvers that re-use the auto-generated resolvers, but then extend them by doing advanced filtering, augmenting the results,...
So simply put, in the example given here:
where it says "implement resolver here" I want to first get the results from the auto-generated resolver (also passing on any possible 'where' clause,...) and then do my own magic with it.
However I can't find how to call the auto-generated resolver from the custom resolver. It feels like it should be simple but I don't see it 😞
Any ideas?
05-19-2021 06:25 AM
Anyone?
Meanwhile, I've found that this is possible with the old neo4-graphql-js library in a very straight-forward manner:
import { neo4jgraphql } from 'neo4j-graphql-js';
const resolvers = {
Query: {
Movie(object, params, ctx, resolveInfo) {
const movies = neo4jgraphql(object, params, ctx, resolveInfo);
// do stuff with movies
return movies;
}
}
};
06-01-2021 01:26 PM
Heya @frederik.willaert
I have a ticket open here: GraphQL Queries do not return relationship data on custom cypher queries · Issue #227 · neo4j/graphq...
Might be worth adding your voice to this.
All the sessions of the conference are now available online