I tried GitHub, but not sure how to place this request.
I logged in https://github.com/orgs/aspnetzero/teams/customers. It shows "Team discussion are disabled".
Can you give me a link for placing request/suggestion/question such as this expecting feature?
Thanks,
Good article!
Thanks!
I am not too sure the request http information such as Content-Type, because I connot control the client side.
As I know so far, the request Content-Type can be: application/x-www-form-urlencoded, application/x-www-urlencoded, text/xml, application/xml, text/plain.
Yes, if I can define the class, I don't need to use [FromBody]. This API acts as a "web hook". I cannot control what data type is in the request body from client. It may be a json object, or a xml document, or just a plan string. I've tried to replace string type with object type on input prameter. Such as :
public class TestAppService : AppServiceBase { public object ReceiveData([FromBody] object body) { return body; } }
It works only if client request body with json object. It still returns same error, if the request body is other types (e.g. string or xml).
Thank you for clarifying!
Understand. Thank you!
Thank you! You actually answered my next question.
I wonder how the Startup pipeling routes the GraphQL request to be handled by GraphQL.Net, instead of MVC controller.
Let's say I have a controller by chance named "GraphqlController". When a request sent from client to endpoint http://company.com/graphql/, it should be routed to GraphqlController, Index() Action method, as MVC default route map on Startup pipeline. Now, Apollo-Client sends a GraphQL request to same endpoint. Does it conflict with the GraphqlController?
Thank you for your code example! It is very helpful. After comparing the 5 different implements, I am going to pick the Apollo Client as my solution. Here is one thing I am still unclear:
Apollo sends the request query to https://<base url>/graphql. How does the server ROUTE this request to "ReservationQuery" to resolve the query? (i.e. Which C# code lines involve this pipeline?)
Thanks,
Do you mean the "Playground"? That is not what I am asking. I like to know "how to send a request to /graphql endpoint from Angular UI."
I missed "Yarn". Just tried again. It works now. Thank you!