Wont work on GraphQL Yoga
Open
Nobody has claimed this yet.
question
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Description
Description
- Seems like this wont work on GraphQL Yoga, but upon setting it up there are no errors
- Already tried putting the Socket.io config after server.start but no luck
const express = require('express');
const { GraphQLServer, PubSub } = require('graphql-yoga');
...
const graphQLServer = new GraphQLServer({
typeDefs: TYPE_DEFS,
resolvers,
middlewares: [yupMiddleware()],
context: request => {
return {
...request,
prisma,
pubsub,
}
},
})
server.express.use('/uploads', express.static('uploads'))
...
const io = socketio(graphQLServer)
io.on('connection', async (socket) => {
console.log('a user connected');
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided GraphQL Yoga and Express setup, then reproduce the Socket.IO initialization shown in the issue and inspect the server integration entry points. Done means establishing a working client connection in this setup or documenting the confirmed compatibility limitation and required configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, graphql, javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100