---
title: "Comment by K-Von Madison on \"GraphQL for Beginners: Setting Up GraphQL Server\" | Hashnode"
description: "Hi Victoria. First of all thanks, I love the content. I understand we are implementing this code all in the index js file. However (pardon my ignorance I&#39;m"
url: "https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d"
---

[Discussion](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db)

Comment [GraphQL for Beginners: Setting Up GraphQL Server](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db)

[K-Von Madison](https://hashnode.com/@Kdash201)

[Mar 31, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d)

Hi Victoria. First of all thanks, I love the content. I understand we are implementing this code all in the index js file. However (pardon my ignorance I'm still a newbie) I'm getting the below error message. I'm having a hard time debugging. Any assistance is greatly appreciated.

TypeError: PubSub is not a constructor at Object.<anonymous> (C:\\Users\\K-Von\\Desktop\\projects\\github-help\\project\\server\\index.js:4:16)

[K-Von Madison](https://hashnode.com/@Kdash201)

[Mar 31, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-624523a7114d74ee1e632c99)

code snippet:

const { GraphQLServer, PubSub } = require("graphql-yoga");

const pubSub = new PubSub();

[Victoria Lo](https://hashnode.com/@victoria)

[Apr 2, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-6247baba4b4dde0dc0be5e8f)

Hi [K-Von Madison](https://hashnode.com/@Kdash201), thanks for reading. Please refer to the GitHub repo for the code: [github.com/victoria-lo/devthoughts](https://github.com/victoria-lo/devthoughts)

[kfn8dkodemonkey](https://hashnode.com/@kaffeinatedkodemonke)

[Apr 2, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-62488f624b4dde0dc0be7224)

Hello [K-Von Madison](https://hashnode.com/@Kdash201). I am having the same issue. Have you resolved the problem?

[kfn8dkodemonkey](https://hashnode.com/@kaffeinatedkodemonke)

[Apr 2, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-624897424b4dde0dc0be72d1)

Hello [Victoria Lo](https://hashnode.com/@victoria). I am having the same issue as K-Von Madison: TypeError: PubSub is not a constructor at Object.<anonymous>

I have looked at the git documents but still have the issue and the documents dose not seem to touch on this issue.

[K-Von Madison](https://hashnode.com/@Kdash201)

[Apr 2, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-6248b82516cdedfe9f7cd99a)

Hi [kfn8dkodemonkey](https://hashnode.com/@kaffeinatedkodemonke), unfortunately I wasn't able to fix it even after cloning the repo

[kfn8dkodemonkey](https://hashnode.com/@kaffeinatedkodemonke)

[Apr 4, 2022](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-624b6f6d4b4dde0dc0beb585)

Hmmm okay [K-Von Madison](https://hashnode.com/@Kdash201). I am looking into something and if it works I will let you know.

[stanley Melara](https://hashnode.com/@stanleyw35)

[Feb 21, 2023](https://hashnode.com/posts/graphql-for-beginners-setting-up-graphql-server/610d52cd528eff11aea881db/comment/62451dd3b4e1ecee678b629d#reply-63f45ae83c8949b64ddcd31f)

[K-Von Madison](https://hashnode.com/@Kdash201) I resolved the issue installing spefific version package "graphql-yoga": "^1.18.3" the same version of the repo github.com/victoria-lo/devthoughts
