prisma-binding icon indicating copy to clipboard operation
prisma-binding copied to clipboard

fragmentReplacements stopped working

Open tomitrescak opened this issue 5 years ago • 1 comments

Hi, not sure what is going on, but fragment replacements stopped working. I have version "2.2.10".

This is my resolveer:

Process: {
  owner: {
      fragment: graphql`
        fragment Instance on BpmnProcessInstance {
          processId
          ownerId
        }
      `,
      resolve(parent, _, ctx) {
        // here parent does not have processId, neither ownerId
        return ctx.db.query.user({ where: { id: parent.ownerId } });
      }
    }
}

I am collecting fragemtns with:

const fragmentReplacements = extractFragmentReplacements(resolvers);

// and using with binding

import * as Prisma from './generated/prisma';
let db: Prisma.Prisma = new Prisma.Prisma({
  fragmentReplacements,
  endpoint: process.env.ENDPOINT
});

Yet, no luck ...

tomitrescak avatar Jan 07 '19 08:01 tomitrescak

Hey @tomitrescak 👋,

Could you compose a short reproduction repository with the latest version of prisma-binding?

maticzav avatar Jan 07 '19 10:01 maticzav