Devographics / Devographics/Monorepo

Comparing data isn't working in State of JS 2022

Open
#254 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
178
Forks
55
Avg merge
1m
Merged PRs (30d)
2

Description

When I try to use "compare data" feature on any chart with any series, I get the following error in console:

```
Access to fetch at 'https://api2.devographics.com/graphql' from origin 'https://2022.stateofjs.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

POST https://api2.devographics.com/graphql net::ERR_FAILED

Uncaught (in promise) TypeError: Failed to fetch
at Wn (data.ts:31:28)
at Qr (helpers.ts:826:54)
at GridDataLoader.tsx:40:38
at GridDataLoader.tsx:54:13
at Wn (react-dom.production.min.js:241:332)
at pl (react-dom.production.min.js:285:111)
at react-dom.production.min.js:282:343
at cl (react-dom.production.min.js:280:396)
at Qh (react-dom.production.min.js:272:439)
at Os (react-dom.production.min.js:127:105)
```
image

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the State of JS 2022 “compare data” feature and inspect data.ts and GridDataLoader.tsx, using the reported GraphQL preflight error as the starting point. Trace the request to https://api2.devographics.com/graphql and verify the fix by comparing chart data without a CORS or failed-fetch error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.