{"id":142,"date":"2023-09-23T16:05:50","date_gmt":"2023-09-23T13:05:50","guid":{"rendered":"https:\/\/codeblog.xyz\/?p=142"},"modified":"2023-10-23T01:42:50","modified_gmt":"2023-10-22T22:42:50","slug":"graphql-20-basic-consepts","status":"publish","type":"post","link":"https:\/\/codeblog.xyz\/?p=142","title":{"rendered":"GraphQL &#8211; 20 basic consepts"},"content":{"rendered":"\n<p>GraphQL is a query language for APIs that offers clients the ability to ask for exactly what they need. It has been growing in popularity due to its flexibility and efficiency. Below are 20 key concepts of GraphQL, with explanations and C# examples for each.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Schema<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>The schema is a contract between the client and server, describing the types and structure of data that can be queried or mutated.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">type Query {\n    user(id: ID!): User\n}\ntype User {\n    id: ID!\n    name: String!\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. Query<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Queries are how clients fetch data from a GraphQL server. They specify what data they need.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class Query\n{\n    public User GetUser(int id) =&gt; \/* fetching logic *\/;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. Resolver<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Resolvers are functions that resolve data for specific fields in a query.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class UserResolver\n{\n    public string GetName(User user) =&gt; user.Name;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4. Mutation<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Mutations allow clients to change data on the server.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class Mutation\n{\n    public User CreateUser(string name) =&gt; \/* creation logic *\/;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5. Subscription<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Subscriptions provide real-time updates when data changes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class Subscription\n{\n    public IObservable&lt;User&gt; OnUserCreated =&gt; \/* observable logic *\/;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6. Scalar Types<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Scalar types are the simplest building blocks, representing single values.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class CustomScalar: ScalarGraphType\n{\n    public CustomScalar()\n    {\n        Name = &quot;CustomScalar&quot;;\n        \/\/ additional logic\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7. Object Types<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Object types define the shape and structure of the response data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class UserType : ObjectGraphType&lt;User&gt;\n{\n    public UserType()\n    {\n        Field(x =&gt; x.Id);\n        Field(x =&gt; x.Name);\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8. Enums<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Enums define a set of named values for a field.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class UserRoleEnum : EnumerationGraphType&lt;UserRole&gt;\n{\n    public UserRoleEnum()\n    {\n        Name = &quot;Role&quot;;\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">9. Interfaces<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Interfaces represent a set of fields that multiple types can include.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class CharacterInterface : InterfaceGraphType&lt;Character&gt;\n{\n    public CharacterInterface()\n    {\n        Name = &quot;Character&quot;;\n        Field(x =&gt; x.Name);\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">10. Unions<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Unions allow a field to return multiple types.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class SearchResultUnion : UnionGraphType\n{\n    public SearchResultUnion()\n    {\n        Type&lt;UserType&gt;();\n        Type&lt;ProductType&gt;();\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">11. Directives<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Directives allow you to include or skip fields conditionally or modify execution.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<p>Built into the library, like <code>@skip<\/code> or <code>@include<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12. Fragments<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Fragments allow you to reuse sets of fields across multiple queries or types.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<p>This is mainly a client-side concept.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">13. Pagination<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Pagination allows clients to fetch large lists in chunks.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<p>Use <code>Skip<\/code> and <code>Take<\/code> in your resolvers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">14. Introspection<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Introspection allows clients to query the schema to discover capabilities. Automatically supported in most libraries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">15. Batch Requests<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>This allows clients to send multiple queries or mutations in one request. Use libraries like DataLoader.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">16. Error Handling<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>GraphQL provides detailed error messages to help developers debug.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<p>Check the <code>Errors<\/code> property in your GraphQL response.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">17. Context<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>Context lets you pass shared information to all resolvers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class MyContext\n{\n    public string UserId { get; set; }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">18. Throttling<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>You can limit the number or complexity of requests to protect your server.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<p>Use libraries like GraphQL-Parser&#8217;s complexity analysis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">19. DataLoader<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>DataLoader is used for batching and caching to improve performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">var loader = new DataLoader&lt;string, User&gt;(keys =&gt; FetchUsers(keys));<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">20. Authentication &amp; Authorization<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Explanation:<\/h4>\n\n\n\n<p>You can authenticate and authorize at the field level.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csharp&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C#&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;csharp&quot;}\">public class AuthDirective : DirectiveGraphType\n{\n    public AuthDirective()\n    {\n        Name = &quot;auth&quot;;\n    }\n}<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Pros and Cons of GraphQL<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Pros:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Flexibility<\/strong>: Clients can ask for exactly what they need.<\/li>\n\n\n\n<li><strong>Efficiency<\/strong>: Single request can fetch multiple resources.<\/li>\n\n\n\n<li><strong>Strongly Typed<\/strong>: Reduces bugs and improves tooling.<\/li>\n\n\n\n<li><strong>Real-time Updates<\/strong>: Through subscriptions.<\/li>\n\n\n\n<li><strong>Discoverable Schema<\/strong>: Self-documenting.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Cons:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Complexity<\/strong>: Learning curve can be steep.<\/li>\n\n\n\n<li><strong>Over-fetching<\/strong>: If not managed, clients can request too much data.<\/li>\n\n\n\n<li><strong>Rate Limiting<\/strong>: More complicated than REST.<\/li>\n\n\n\n<li><strong>Tooling<\/strong>: Less mature than REST.<\/li>\n\n\n\n<li><strong>N+1 Problem<\/strong>: Can occur if batching and caching are not set up correctly.<\/li>\n<\/ol>\n\n\n\n<p>I hope this comprehensive overview helps you understand GraphQL better. If you have more questions, feel free to ask!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GraphQL is a query language for APIs that offers clients the ability to ask for exactly what they need. It has been growing in popularity due to its flexibility and efficiency. Below are 20 key concepts of GraphQL, with explanations and C# examples for each. 1. Schema Explanation: The schema is a contract between the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":2,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions\/254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=\/wp\/v2\/media\/174"}],"wp:attachment":[{"href":"https:\/\/codeblog.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeblog.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}