I'm using nexus prisma. I want my Angular app to s...
# orm-help
b
I'm using nexus prisma. I want my Angular app to subscribe notification events so it can show notifications on UI to users real time. Here is my code:
Copy code
import { prismaObjectType } from 'nexus-prisma'

export const Subscription = prismaObjectType({
  name: 'Subscription',
  definition(t) {
    t.prismaFields(['notification'])
  },
})
But the server can't start.
[ERROR] 18:21:34 Error: Subscription are not supported yet
. What is the problem? I think Prisma already supports Subscription, right?
There's a short tutorial explaining how to make subscriptions work on that release note
The type mismatch should also no longer be here, so you should be fine without doing the
as any
b
Thank you @nuno @weakky, I have a question in the pull request: https://github.com/prisma/nexus/issues/86
oh sorry, my mistake. It works now.
w
No worries! It’s still super confusing to reference a type that doesn’t exist on the autocompletion, and then have it magically appear after you reload your server. We’ll improve that once we have time for time for it. Right now it’s mainly a workaround so that people can use subscriptions til we properly support them 🙏
👍 1