How to get typedefs from graphql endpoint?

how to get typedefs or schema from graphql endpoint?

The graphql endpoint is a federated subgraph.

Either rover or Apollo-cli might help you.

hai team,

Thank you for replying, I wanted to get the typedefs using a javascript file or piece of code . The rover or Apollo cli were commands. I wanted the functionality to implement my use case.

Thank you

Try this
https://www.graphql-code-generator.com/docs/plugins/typescript/