Giter VIP home page Giter VIP logo

Comments (7)

aylei avatar aylei commented on June 6, 2024 4

Actually, I find these APIs by reading the code of https://github.com/skygragon/leetcode-cli

from leetcode-rust.

TieWay59 avatar TieWay59 commented on June 6, 2024 4

Hi, I learned it today. It's not safe for a company to expose its graphql schema in production, so Leetcode disabled its introspection feature which will let everybody know all the schema. see https://www.apollographql.com/blog/graphql/security/why-you-should-disable-graphql-introspection-in-production/

But there is a workaround. You can open the leetcode website and check the browser network request search for graphql, there would be many graphql requests and you can try to find a needed pattern by reading the payload & response.

Here is an example of questionOfToday from https://leetcode.cn/problemset/all/ you'll find similar results in leetcode.com though.

image

@Nitigya272001 I hope this could help you, and I know it's still so tricky because you need to guess some requests might happen on one specific page and read a lot of the web requests.

from leetcode-rust.

akarsh1995 avatar akarsh1995 commented on June 6, 2024 4

I've populated a list of all leetcode's GraphQL queries and its postman collection @ https://github.com/akarsh1995/leetcode-graphql-queries

from leetcode-rust.

DavidTeju avatar DavidTeju commented on June 6, 2024 3

Hi, I learned it today. It's not safe for a company to expose its graphql schema in production, so Leetcode disabled its introspection feature which will let everybody know all the schema. see https://www.apollographql.com/blog/graphql/security/why-you-should-disable-graphql-introspection-in-production/

But there is a workaround. You can open the leetcode website and check the browser network request search for graphql, there would be many graphql requests and you can try to find a needed pattern by reading the payload & response.

Here is an example of questionOfToday from https://leetcode.cn/problemset/all/ you'll find similar results in leetcode.com though.

image

@Nitigya272001 I hope this could help you, and I know it's still so tricky because you need to guess some requests might happen on one specific page and read a lot of the web requests.

@TieWay59 Your solution came very in handy for me! Thank you very much!!

from leetcode-rust.

zwhitchcox avatar zwhitchcox commented on June 6, 2024

Nice! Thank you!

from leetcode-rust.

Nitigya272001 avatar Nitigya272001 commented on June 6, 2024

Hey, can anybody please tell me all the endpoints of graphql leetcode api?

from leetcode-rust.

alexhuang091 avatar alexhuang091 commented on June 6, 2024

Hey, can anybody please tell me all the endpoints of graphql leetcode api?

from https://github.com/shuzijun/leetcode-editor/blob/master/src/main/java/com/shuzijun/leetcode/plugin/utils/URLUtils.java should be https://leetcode.com/graphql

from leetcode-rust.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.