GraphQL usage with REST Endpoints in .Net core 6.0

GraphQL usage with REST Endpoints in .Net core 6.0


0

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

  • 1

    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

    – Panagiotis Kanavos

    1 hour ago


  • 1

    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

    – Panagiotis Kanavos

    1 hour ago



Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *