Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fragmentReplacements stopped working #299

Open
tomitrescak opened this issue Jan 7, 2019 · 1 comment
Open

fragmentReplacements stopped working #299

tomitrescak opened this issue Jan 7, 2019 · 1 comment
Labels
bug/0-needs-info More information is needed for reproduction. kind/bug

Comments

@tomitrescak
Copy link

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 ...

@maticzav
Copy link
Collaborator

maticzav commented Jan 7, 2019

Hey @tomitrescak 👋,

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

@maticzav maticzav added the bug/0-needs-info More information is needed for reproduction. label Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-needs-info More information is needed for reproduction. kind/bug
Projects
None yet
Development

No branches or pull requests

3 participants