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

Prepared statement needs to be re-prepared with sql views #1099

Open
jemink opened this issue Jun 29, 2021 · 0 comments
Open

Prepared statement needs to be re-prepared with sql views #1099

jemink opened this issue Jun 29, 2021 · 0 comments

Comments

@jemink
Copy link

jemink commented Jun 29, 2021

I created sql views with two tables called Draft

CREATE VIEW `Draft` AS
    SELECT company.address as address, company.id as id
    FROM `company`, `admin`
    WHERE `company`.`company_id` = `admin`.`id`;

Then added Draft model inside the schema.prisma like below

model Draft {
  id      Int    @unique
  address String
}

But when I run this query in playground I am getting below error with node js and with playground

const data = await ctx.prisma.draft.findMany({})

image

@tgriesser tgriesser transferred this issue from graphql-nexus/nexus Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant