Given the following schema: ```type User { id: I...
# orm-help
r
Given the following schema:
Copy code
type User {
  id: ID!
  email: String!
  name: String
  active: Boolean
  roles: [Role]
  permissions: [Permission!]
  forms: [MemberForm!]
}
and the following resolver:
Copy code
import { UserResolvers } from '../generated/graphqlgen'

export const User: UserResolvers.Type = {
  ...UserResolvers.defaultResolvers,

  permissions: (parent, args, ctx) => ctx.db.user({ id: parent.id }).permissions(),
  forms: (parent, args, ctx) => ctx.db.user({ id: parent.id }).forms()
}
Any ideas why I would keep getting this error when trying to query for
forms
or
permissions
on a user?
"Cannot read property 'selectionSet' of undefined"
Copy code
user(id: "cjohx9n5h002j092058rtzjc6") {
    forms {
      name
    }
    permissions {
      value
    }
  }
😓 1
My
datamodel.graphql
has the following:
Copy code
type User {
  id: ID! @unique
  email: String! @unique
  password: String
  name: String
  active: Boolean @default(value: "false")
  roles: [Role]
  permissions: [Permission!]!
  forms: [MemberForm!]!
  refId: String
  refType: UserType @default(value: "WEWORK")
}

type Permission {
  id: ID! @unique
  value: String! @unique
}

type MemberForm {
  id: ID! @unique
  name: String! @unique
  description: String
  formEntries: [MemberFormEntry!]!
}
j
same, you on linux?
r
nope. MacOS
looks like it works if you downgrade to prisma
1.20.1