99designs / 99designs/gqlgen

Subscription docs should mention CORS configuration

Open Beginner friendly
#2,661 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

The docs aren't very clear on how to set up a subscription server.

e.g. `unable to upgrade *middleware.httpFancyWriter to websocket websocket: request origin not allowed by Upgrader.CheckOrigin:` is likely.

AddTransport after NewDefaultServer with a different transport.Websocket appears ineffective.

Contributor guide

Open the contributing guide

Research direction

Look at the subscription server setup documentation in the gqlgen docs, likely under 'subscriptions' or 'server configuration'. Find where CORS configuration for WebSocket upgrades is mentioned or should be added. Check the code for the default server and transport.Websocket configuration to understand the correct placement. Verify by running a subscription example and ensuring the CORS error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
backend, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.