How to access content item inside a class? #11252
Unanswered
alXDraghiciu
asked this question in
Q&A
Replies: 2 comments 3 replies
-
You need to use a HttpClient request which will return you a JSON response from the GraphQL API. Then you use System.Text.Json or Newtonsoft.Json to convert JSON back to a C# object. |
Beta Was this translation helpful? Give feedback.
3 replies
-
If you are running in coupled/decupled on same web application as your cms then you can use You can query using GraphQL within same web app or from separate webapp or from spa client. However GraphQL being API endpoint, you need to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. What would be the correct way to access data inside a content item to use it in a class or controller? How can I call GraphQL inside the C# code and execute a query?
Beta Was this translation helpful? Give feedback.
All reactions