Skip to content

Support leetcode.cn: login works, but GraphQL schema differs from leetcode.com #7

@dong-frank

Description

@dong-frank

I’ve tried adding leetcode.cn support in the login flow, and authentication works correctly.

However, full leetcode.cn support is not a simple base URL switch.
The GraphQL schema appears to differ between leetcode.com and leetcode.cn, so some existing queries fail on .cn.

For example:

  • On leetcode.com, daily challenge uses fields like [activeDailyCodingChallengeQuestion]
  • On leetcode.cn, that field is not available, and related data seems to be exposed via different fields (e.g. todayRecord, dailyQuestionRecords).

Current impact:

Login works on leetcode.cn.
Some feature queries (such as daily challenge and possibly others) return GraphQL errors due to field mismatches.

BTW, I plan to continue working on full leetcode.cn support.
If anyone has bandwidth and is interested, contributions or guidance would be greatly appreciated.
Thanks again for building and open-sourcing this project.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions