Hello All! This is been cracking me nut… :disappoi...
# prisma-whats-new
b
Hello All! This is been cracking me nut… 😞 Any thoughts on why I’m getting
[object object]
when I ran my
graphql
subscriptions
?
m
It could be a couple of things... but for me, I had to add the name of the subscription as the key to the object that my pubsub function returned
pubsub.publish('PEOPLE_CHANGE', { peopleChanged: people })
When I added peopleChanged:, the name of my subscription, it worked.
b
hmmn.. I see what you’re saying. Its got to be something else in my case. For instance
Have got this:
Copy code
postLiked: {
            type: PostType,

            subscribe: () => {
                console.log('SUBSCRIBING...');
                return pubsub.asyncIterator('POST_LIKED');
            },
            resolve: post => {
                console.log(post);
                return post;
            }
And I’m publishing like this:
Copy code
pubsub.publish('POST_LIKED', {
                            postLiked: like
                        });