{"id":2970,"date":"2021-05-17T13:27:00","date_gmt":"2021-05-17T01:27:00","guid":{"rendered":"https:\/\/www.talkcrypto.org\/blog\/?p=2970"},"modified":"2023-11-28T00:57:12","modified_gmt":"2023-11-27T11:57:12","slug":"understanding-a-graphql-schema","status":"publish","type":"post","link":"https:\/\/www.talkcrypto.org\/blog\/2021\/05\/17\/understanding-a-graphql-schema\/","title":{"rendered":"Understanding a GraphQL schema"},"content":{"rendered":"\n<p>Understanding a GraphQL schema is very confusing at first. There is no scroll bar so you don&#8217;t know how long the document is, the structure is hard to visual, and there is a lot of superfluous information for beginners. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/image-38-872x1024.png\" alt=\"\" class=\"wp-image-2972\" width=\"477\" height=\"560\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/image-38-872x1024.png 872w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/image-38-256x300.png 256w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/image-38-768x901.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/image-38.png 1232w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">The trick<\/h2>\n\n\n\n<p>The trick is to copy all the data into something like <a href=\"https:\/\/jsonformatter.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/jsonformatter.org\/<\/a> and then minimise each section.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"834\" height=\"923\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.19.26-am.png\" alt=\"\" class=\"wp-image-2974\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.19.26-am.png 834w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.19.26-am-271x300.png 271w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.19.26-am-768x850.png 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>What is interesting is that within the Query type, there is blockTs and blockT and it is obvious here that blockT requires an argument of id which is of type String and is mandatory, indicated with the exclamation mark. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"806\" height=\"593\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.23.54-am.png\" alt=\"\" class=\"wp-image-2975\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.23.54-am.png 806w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.23.54-am-300x221.png 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/06\/Screen-Shot-2021-06-12-at-11.23.54-am-768x565.png 768w\" sizes=\"(max-width: 806px) 100vw, 806px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding a GraphQL schema is very confusing at first. There<\/p>\n","protected":false},"author":1,"featured_media":3415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2970","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain"],"featured_image_urls":{"full":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql.png",1800,773,false],"thumbnail":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-150x150.png",150,150,true],"medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-300x129.png",300,129,true],"medium_large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-768x330.png",640,275,true],"large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-1024x440.png",640,275,true],"1536x1536":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-1536x660.png",1536,660,true],"2048x2048":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql.png",1800,773,false],"chromenews-featured":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-1024x440.png",1024,440,true],"chromenews-large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-825x575.png",825,575,true],"chromenews-medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2021\/05\/graphql-590x410.png",590,410,true]},"author_info":{"info":["seandotau"]},"category_info":"<a href=\"https:\/\/www.talkcrypto.org\/blog\/category\/blockchain\/\" rel=\"category tag\">Blockchain<\/a>","tag_info":"Blockchain","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/2970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/comments?post=2970"}],"version-history":[{"count":2,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/2970\/revisions"}],"predecessor-version":[{"id":3035,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/2970\/revisions\/3035"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media\/3415"}],"wp:attachment":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media?parent=2970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/categories?post=2970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/tags?post=2970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}