Since I am new to GraphQL, I don’t really know how to call a REST Endpoint and query the fields accordingly. In particular, I want to fetch certain fields from the entire response of a GET API.
What I have learnt is GraphQL sends a POST Request. How do I hit the GET endpoints ?
PS – We cannot use Apollo Client in the project.
2
The question is unclear and shows a bit of confusion on what GraphQL is. There's no such thing as a REST endpoint. REST is an architectural style, not a protocol. All GraphQL services work over HTTP and can be called with an HTTP POST. Apollo Client makes this easier and adds a lot of features but in the end, it sends HTTP POST requests
1 hour ago
What are you actually trying to do? Call a GraphQL endpoint from C#? Or call a GraphQL endpoint written in C# from Angular? The server library you're using may already contain examples if not a full IDE. For example HotChocolate contains an IDE that can be used to create, run and inspect queries. Some of them can even generate client code examples
1 hour ago