Hi all, how can I override a resolver from the gen...
# prisma-whats-new
Hi all, how can I override a resolver from the generated folder?
It's not entirely clear what you mean with this question. Can you elaborate?
I have created a custom resolver like so:
Copy code
export const Timeline = {
  posts: async (parent, args, ctx: Context, info) => {
    console.log("Parent: " + JSON.stringify(parent));
    console.log("args: " + JSON.stringify(args));
    const { after, id } = args;
   ..... fetch the posts according to a custom rule .....
However, printing the
argument shows that the timeline query has already queried all posts. via the ` posts(....)`prisma resolver defined in
However, I would like for prisma to call my resolver INSTEAD of the prisma resolver, not after. Is this possible?
A quick note on terminology, you have written a resolver. Calling that a custom resolver is like calling a javascript function a custom function.
Ok thanks. With custom I meant that I have written a resovler on top of the default resolver binding that prisma supplies. Do you understand my situation thought?
On to your question. It's not possible to answer the question with the information you presented so far. More information about your entire resolver setup is needed. Also, this question seems to be very closely related to your previous message https://graphcool.slack.com/archives/C0MQJ62NL/p1522765177000616. My hunch is that your questions stem from a misunderstanding/missing knowledge about the resolver execution in a GraphQL server, but it's hard to tell if that's the problem at the moment. My suggestion is that you start a new discussion about this in the Forum, to have a meaningful conversation about your resolver setup.
OK thanks, I started a forum post. Your hunch should be right, im still new to the resolver concept and graphql 🙂