PageSourceSearch

https://graphql.org/_next/static/chunks/pages/learn/best-practices-9cbe990de2555374.js

js graphql.org collected 2026-09-24 07:01:47 UTC 5,099 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8891],{95229:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/learn/best-practices",function(){return i(35374)}])},2144:function(e,t,i){"use strict";i.d(t,{o:function(){return o}});var r=i(52676),n=i(4814),s=i(85454),a=i(17676);function o({items:e,numbered:t}){return(0,r.jsx)("ul",{className:"grid grid-cols-1 justify-stretch gap-2 pt-6 sm:grid-cols-2 lg:gap-4",children:e.map((e,i)=>{let o;let l=e.link.replace(/^\/learn\//,"").replace(/\/$/,""),c=a.g[l];return c&&(o=c.section),(0,r.jsx)("li",{className:"flex text-neu-900",children:(0,r.jsxs)("a",{href:e.link,className:(0,n.W)("gql-focus-visible grid w-full border border-neu-200 bg-neu-0 transition-colors [grid-template-areas:'header''desc'] [grid-template-rows:auto_1fr] hover:ring hover:ring-neu-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 dark:border-neu-100 dark:hover:ring-neu-50 lg:[grid-template-areas:'header_header''desc_arrow'] lg:[grid-template-columns:1fr_64px]","getting-started"===o&&"bg-pri-lighter/10 dark:bg-pri-lighter/5","best-practices"===o&&"bg-sec-lighter/10 dark:bg-sec-lighter/5"),children:[(0,r.jsxs)("span",{className:"flex flex-col gap-1 [grid-area:header]",children:[t&&(0,r.jsxs)("span",{className:"typography-body-sm px-2 pt-2 text-neu-700 max-lg:typography-body-md lg:px-4 lg:pt-4",children:[t," ",i+1]}),(0,r.jsxs)("span",{className:(0,n.W)("typography-h3 flex items-center gap-2 border-neu-200 text-neu-900 dark:border-neu-100",e.icon?"border-b":"pl-2 lg:pl-4"),children:[e.icon&&(0,r.jsx)("span",{className:"flex items-center justify-center border-r border-neu-200 p-2 lg:p-4",children:"function"==typeof e.icon?(0,r.jsx)(e.icon,{className:"size-8 shrink-0"}):e.icon}),e.title]})]}),(0,r.jsx)("p",{className:"typography-body-sm text-pretty p-4 text-neu-900 [grid-area:desc] max-lg:typography-body-md max-lg:border-t max-lg:border-neu-200 dark:max-lg:border-neu-100",children:e.description?e.description:e.link.replace(/^https?:\/\//,"")}),(0,r.jsx)("span",{className:(0,n.W)("hidden items-center justify-center place-self-end border-l border-neu-200 p-4 [grid-area:arrow] dark:border-neu-100 lg:flex",e.icon?"h-full":"border-t"),children:(0,r.jsx)(s.Z,{className:"size-8 shrink-0 -rotate-90"})})]})},e.title)})})}},35374:function(e,t,i){"use strict";i.r(t),i.d(t,{useTOC:function(){return l}});var r=i(52676),n=i(92937),s=i(45043),a=i(79428),o=i(2144);function l(e){return[]}t.default=(0,n.c)(function(e){let t={em:"em",h1:"h1",p:"p",...(0,a.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"GraphQL Best Practices"}),"\n",(0,r.jsxs)(t.p,{children:["The GraphQL specification is intentionally silent on a handful of important issues facing APIs such as dealing with the network, authorization, and pagination. This doesn’t mean that there aren’t solutions for these issues when using GraphQL, just that they’re outside the description about what GraphQL ",(0,r.jsx)(t.em,{children:"is"})," and instead just common practice."]}),"\n",(0,r.jsx)(t.p,{children:"The articles in this section should not be taken as gospel, and in some cases may rightfully be ignored in favor of some other approach. Some articles introduce some of the philosophy developed within Facebook around designing and deploying GraphQL services, while others are more tactical suggestions for solving common problems like serving over HTTP and performing authorization."}),"\n",(0,r.jsx)(o.o,{numbered:"Lesson",items:[{title:"Thinking in Graphs",link:"/learn/thinking-in-graphs/",description:"Model your business domain as a graph"},{title:"Serving over HTTP",link:"/learn/serving-over-http/",description:"Handle GraphQL requests on HTTP servers"},{title:"Authorization",link:"/learn/authorization/",description:"Delegate authorization logic to the business logic layer"},{title:"Pagination",link:"/learn/pagination/",description:"Allow clients to traverse lists of objects with a consistent field pagination model"},{title:"Schema Design",link:"/learn/schema-design/",description:"Design and evolve a type system over time without versions"},{title:"Global Object Identification",link:"/learn/global-object-identification/",description:"Consistent object access enables simple caching and object lookups"},{title:"Caching",link:"/learn/caching/",description:"Provide Object Identifiers so clients can build rich cac
1hes"},{title:"Performance",link:"/learn/performance/",description:"Optimize the execution and delivery of GraphQL responses"},{title:"Security",link:"/learn/security/",description:"Protect GraphQL APIs from malicious operations"},{title:"Common Errors",link:"/learn/debug-errors/",description:"Learn about common `graphql-http` errors and how to debug them."}]})]})},"/learn/best-practices",{filePath:"src/pages/learn/best-practices.mdx",timestamp:1789481543e3,pageMap:s.v,frontMatter:{},title:"GraphQL Best Practices"},"undefined"==typeof RemoteContent?l:RemoteContent.useTOC)}},function(e){e.O(0,[3556,5043,2888,9774,179],function(){return e(e.s=95229)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.