We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I followed your tutorial, and I get this issue: "message": "Cannot read property 'chat' of undefined" after creating an element (Chat).
here you have my code:
Subscription resolver
const Subscription = { chat: { subscribe: async (parent, args, ctx, info) => ctx.db.subscription.chat({}, info) } } module.exports = { Subscription }
mutation Create Chat
async function createChat (parent, args, ctx, info) { const userId = getUserId(ctx) args.data.author = { connect: { id: userId } } return forwardTo('db')(parent, args, ctx, info) }
Datamodel
type Chat { id: ID! @unique createdAt: DateTime! updatedAt: DateTime! message: String! author: User }
schema.graphql
type Subscription { chat(where: ChatSubscriptionWhereInput): ChatSubscriptionPayload }
Full code is here: https://github.com/alan345/naperg/tree/master/server Any ideas where this issue might come from? Thanks! issue also posted here: https://www.prisma.io/forum/t/realtime-message-cannot-read-property-xxx-of-undefined/4703
The text was updated successfully, but these errors were encountered:
Issue has been solved by upgrading: "graphql-yoga": "1.16.0" => "graphql-yoga": "1.16.4", "prisma-binding": "2.1.4" => "prisma-binding": "2.1.6", "prisma": "1.13.7" => "prisma": "1.18.1"
alan345/naperg@877628a#diff-d9505df4ce0441b9486ff4a0d2c4d2ec
Sorry, something went wrong.
No branches or pull requests
Hi,
I followed your tutorial, and I get this issue: "message": "Cannot read property 'chat' of undefined" after creating an element (Chat).
here you have my code:
Subscription resolver
mutation Create Chat
Datamodel
schema.graphql
Full code is here: https://github.com/alan345/naperg/tree/master/server
Any ideas where this issue might come from?
Thanks!
issue also posted here: https://www.prisma.io/forum/t/realtime-message-cannot-read-property-xxx-of-undefined/4703
The text was updated successfully, but these errors were encountered: