CINXE.COM

Cloud Security Alliance Star Level One Badge

<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="theme-color" content="#111" media="(prefers-color-scheme: dark)"/><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"/><style>:root{--nextra-primary-hue:173deg;--nextra-primary-saturation:40%;--nextra-primary-lightness:45%;--nextra-navbar-height:64px;--nextra-menu-height:3.75rem;--nextra-banner-height:2.5rem;--nextra-bg:250,250,250;}.dark{--nextra-primary-hue:67.1deg;--nextra-primary-saturation:100%;--nextra-primary-lightness:55%;--nextra-bg:17,17,17;}</style><link rel="icon" href="/graphql/codegen/_next/static/media/favicon.352251c6.svg"/><meta name="next-head-count" content="5"/><link rel="preload" href="/graphql/codegen/_next/static/media/dc03e58dafb0f94e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/graphql/codegen/_next/static/media/eb0b6447daad5399-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/graphql/codegen/_next/static/css/15b6f1524a313f32.css" as="style"/><link rel="stylesheet" href="/graphql/codegen/_next/static/css/15b6f1524a313f32.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/graphql/codegen/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/graphql/codegen/_next/static/chunks/webpack-ca9378987265a0e4.js" defer=""></script><script src="/graphql/codegen/_next/static/chunks/framework-85f54b842cdc614d.js" defer=""></script><script src="/graphql/codegen/_next/static/chunks/main-bffd5d0fc6e49ebf.js" defer=""></script><script src="/graphql/codegen/_next/static/chunks/pages/_app-4cb93ca212b6f8c4.js" defer=""></script><script src="/graphql/codegen/_next/static/chunks/1227-110fbb2cc2440b9b.js" defer=""></script><script src="/graphql/codegen/_next/static/chunks/pages/plugins/typescript/typescript-resolvers-5c98e5ddca74a57e.js" defer=""></script><script src="/graphql/codegen/_next/static/u6ASScd3CT8d7V6lLAcYP/_buildManifest.js" defer=""></script><script src="/graphql/codegen/_next/static/u6ASScd3CT8d7V6lLAcYP/_ssgManifest.js" defer=""></script><style id="__jsx-307672915">:root{--font-sans:'__neueMontreal_44a316', '__neueMontreal_Fallback_44a316'}</style><meta name="msapplication-config" content="none" /><link rel="manifest" href="/site.webmanifest" /><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" /><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" /><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" /><link rel="shorcut icon" type="image/x-icon" href="/favicon.ico"><script> window.$crisp = []; window.CRISP_WEBSITE_ID = 'af9adec5-ddfa-4db9-a4a3-25769daf2fc2'; (function () { d = document; s = d.createElement('script'); s.src = 'https://client.crisp.chat/l.js'; s.async = 1; d.getElementsByTagName('head')[0].appendChild(s); })(); window.$crisp.push([ 'set', 'session:segments', [["codegen"]], ]); </script><script>!function(t){if(window.ko)return;window.ko=[],["identify","track","removeListeners","open","on","off","qualify","ready"].forEach(function(t){ko[t]=function(){var n=[].slice.call(arguments);return n.unshift(t),ko.push(n),ko}});var n=document.createElement("script");n.async=!0,n.setAttribute("src","https://cdn.getkoala.com/v1/pk_fab338b8afd93b93f49fafebf9651287060e/sdk.js"),(document.body || document.head).appendChild(n)}();</script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-VN2KZS6FK4"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){window.dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-VN2KZS6FK4'); </script></head><body><div id="__next"><script>((e,o,s,u,d,m,l,h)=>{let i=document.documentElement,T=["light","dark"];function p(a){(Array.isArray(e)?e:[e]).forEach(g=>{let k=g==="class",S=k&&m?d.map(f=>m[f]||f):d;k?(i.classList.remove(...S),i.classList.add(a)):i.setAttribute(g,a)}),R(a)}function R(a){h&&T.includes(a)&&(i.style.colorScheme=a)}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let a=localStorage.getItem(o)||s,g=l&&a==="system"?c():a;p(g)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div dir="ltr"><script>document.documentElement.setAttribute('dir','ltr')</script><div class="sticky top-0 z-20 border-b border-beige-400/[var(--border-opacity)] bg-[rgb(var(--nextra-bg))] px-6 py-4 text-green-1000 transition-[border-color] duration-500 md:mb-[7px] md:mt-2 dark:border-neutral-700/[var(--border-opacity)] dark:text-neutral-200 [&amp;.light]:border-beige-400/[var(--border-opacity)] [&amp;.light]:bg-white [&amp;.light]:text-green-1000" style="--border-opacity:0"><div class="flex items-center justify-between md:hidden"><a class="hive-focus -m-2 flex items-center gap-3 rounded-md p-2 outline-none transition focus-visible:ring" href="/graphql/codegen"><svg width="53" height="53" viewBox="0 0 53 53" fill="currentColor" class="size-8"><path d="m42.212 16.24-5.427-5.427-7.46 7.46a3.997 3.997 0 0 1-5.652 0l-7.46-7.46-5.428 5.427 7.46 7.46a3.997 3.997 0 0 1 0 5.653l-7.46 7.46 5.427 5.427 7.46-7.46a3.997 3.997 0 0 1 5.653 0l7.46 7.46 5.428-5.427-7.46-7.46a3.997 3.997 0 0 1 0-5.653l7.46-7.46Z"></path><path d="M26.498 41.672 21.072 47.1l5.427 5.426 5.426-5.426-5.427-5.427ZM26.499.525 21.073 5.95l5.426 5.426 5.426-5.426L26.5.525ZM47.074 21.101l-5.426 5.427 5.426 5.426 5.426-5.426-5.426-5.427ZM5.926 21.1.5 26.528l5.426 5.426 5.426-5.426-5.426-5.426Z"></path></svg><span class="text-2xl font-medium tracking-[-0.16px]">Codegen</span></a><button type="button" aria-label="Menu" class="md:_hidden hover nextra-hamburger -m-1 rounded-lg bg-transparent p-1 text-green-1000 focus-visible:outline-none focus-visible:ring active:bg-beige-200 dark:text-neutral-200 dark:active:bg-neutral-800"><svg fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor" class="size-6 stroke-current [&amp;_path]:[stroke-linecap:square]"><g><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16"></path></g><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12h16"></path><g><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 18h16"></path></g></svg></button></div><nav aria-label="Navigation Menu" data-orientation="horizontal" dir="ltr" id="h-navmenu-container" class="relative z-10 flex-1 items-center mx-auto hidden md:flex max-w-[90rem]"><a class="hive-focus -m-2 flex items-center gap-3 rounded-md p-2 outline-none transition focus-visible:ring" href="/graphql/codegen"><svg width="53" height="53" viewBox="0 0 53 53" fill="currentColor" class="size-8"><path d="m42.212 16.24-5.427-5.427-7.46 7.46a3.997 3.997 0 0 1-5.652 0l-7.46-7.46-5.428 5.427 7.46 7.46a3.997 3.997 0 0 1 0 5.653l-7.46 7.46 5.427 5.427 7.46-7.46a3.997 3.997 0 0 1 5.653 0l7.46 7.46 5.428-5.427-7.46-7.46a3.997 3.997 0 0 1 0-5.653l7.46-7.46Z"></path><path d="M26.498 41.672 21.072 47.1l5.427 5.426 5.426-5.426-5.427-5.427ZM26.499.525 21.073 5.95l5.426 5.426 5.426-5.426L26.5.525ZM47.074 21.101l-5.426 5.427 5.426 5.426 5.426-5.426-5.426-5.427ZM5.926 21.1.5 26.528l5.426 5.426 5.426-5.426-5.426-5.426Z"></path></svg><span class="text-2xl font-medium tracking-[-0.16px]">Codegen</span></a><div style="position:relative"><ul data-orientation="horizontal" class="group flex flex-1 list-none items-center rounded-lg border-beige-200 px-1.5 lg:border lg:px-3 dark:border-neutral-700 ml-4 bg-white dark:bg-transparent [@media(min-width:1180px)]:ml-16" dir="ltr"><li><button id="radix-:R756:-trigger-radix-:Rkv56:" data-state="closed" aria-expanded="false" aria-controls="radix-:R756:-content-radix-:Rkv56:" class="hive-focus cursor-default rounded p-3 font-medium leading-normal text-green-800 aria-expanded:text-green-1000 dark:text-neutral-300 dark:aria-expanded:text-neutral-100" data-radix-collection-item="">Products</button></li><li><button id="radix-:R756:-trigger-radix-:R14v56:" data-state="closed" aria-expanded="false" aria-controls="radix-:R756:-content-radix-:R14v56:" class="hive-focus cursor-default rounded p-3 font-medium leading-normal text-green-800 aria-expanded:text-green-1000 dark:text-neutral-300 dark:aria-expanded:text-neutral-100" data-radix-collection-item="">Developer</button></li><li><button id="radix-:R756:-trigger-radix-:R24v56:" data-state="closed" aria-expanded="false" aria-controls="radix-:R756:-content-radix-:R24v56:" class="hive-focus cursor-default rounded p-3 font-medium leading-normal text-green-800 aria-expanded:text-green-1000 dark:text-neutral-300 dark:aria-expanded:text-neutral-100" data-radix-collection-item="">Company</button></li><li class="flex"><a data-radix-collection-item="" class="hive-focus [data-active=&quot;true&quot;]:text-green-1000 rounded p-3 leading-normal text-green-800 transition-colors hover:bg-beige-100 hover:text-green-1000 dark:text-neutral-300 dark:hover:bg-neutral-800/50 dark:hover:text-neutral-100 [&amp;:hover&gt;svg]:opacity-100 font-medium outline-none transition focus-visible:ring" href="/graphql/codegen/plugins">Plugins</a></li></ul></div><div class="flex-1"></div><div class="_not-prose _relative _flex _items-center _text-gray-900 dark:_text-gray-300 contrast-more:_text-gray-800 contrast-more:dark:_text-gray-300 relative ml-4 basis-64 [&amp;_:is(input,kbd)]:text-green-700 dark:[&amp;_:is(input,kbd)]:text-neutral-300 [&amp;_input]:h-12 [&amp;_input]:w-full [&amp;_input]:rounded-lg [&amp;_input]:border [&amp;_input]:border-green-200 [&amp;_input]:bg-white [&amp;_input]:pl-4 [&amp;_input]:pr-8 [&amp;_input]:ring-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_32%/var(--tw-ring-opacity))] [&amp;_input]:ring-offset-[rgb(var(--nextra-bg))] dark:[&amp;_input]:border-neutral-800 [&amp;_input]:dark:bg-inherit [&amp;_kbd]:absolute [&amp;_kbd]:right-4 [&amp;_kbd]:top-1/2 [&amp;_kbd]:my-0 [&amp;_kbd]:-translate-y-1/2 [&amp;_kbd]:border-none [&amp;_kbd]:bg-green-200 dark:[&amp;_kbd]:bg-neutral-700"><input spellcheck="false" class="_rounded-lg _px-3 _py-2 _transition-colors _w-full md:_w-64 _text-base _leading-tight md:_text-sm _bg-black/[.05] dark:_bg-gray-50/10 placeholder:_text-gray-500 dark:placeholder:_text-gray-400 contrast-more:_border contrast-more:_border-current [&amp;::-webkit-search-cancel-button]:_appearance-none" autoComplete="off" placeholder="Search documentation…" id="headlessui-combobox-input-:R1dqv56:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/></div><a target="_blank" rel="noopener noreferrer" class="relative flex items-center justify-center gap-2 text-nowrap rounded-lg px-6 py-3 font-medium leading-6 focus-visible:outline focus-visible:ring-0 focus-visible:ring-offset-0 sm:w-fit dark:text-neutral-200 [&amp;:hover&gt;:first-child]:-inset-px [&amp;:hover&gt;:first-child]:rounded-[9px] bg-transparent text-green-1000 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-green-800 ml-4 max-lg:hidden outline-none transition focus-visible:ring" href="https://the-guild.dev/contact"><div class="absolute inset-0 rounded-lg border border-green-800 dark:border-neutral-200"></div>Contact <span class="hidden xl:contents">us</span></a><a class="relative flex items-center justify-center gap-2 text-nowrap rounded-lg px-6 py-3 font-medium leading-6 text-green-1000 focus-visible:outline focus-visible:ring-0 focus-visible:ring-offset-0 sm:w-fit [&amp;:hover&gt;:first-child]:-inset-px [&amp;:hover&gt;:first-child]:rounded-[9px] bg-primary hover:bg-green-800 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-green-800 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:hover:text-neutral-900 ml-4 outline-none transition focus-visible:ring" href="https://app.graphql-hive.com/"><div class="absolute inset-0 rounded-lg border border-green-800 dark:border-neutral-200"></div>Sign in</a><div id="h-navmenu-viewport" class="absolute left-0 top-full flex" style="perspective:2000px"></div><style>@media (prefers-reduced-motion: reduce) { #h-navmenu-container * { animation-duration: 0ms !important; transition-duration: 0ms !important; } }</style></nav></div><div class="_mx-auto _flex _max-w-[90rem]"><div class="[transition:background-color_1.5s_ease] _bg-transparent"></div><aside class="nextra-sidebar-container _flex _flex-col md:_top-16 md:_shrink-0 motion-reduce:_transform-none motion-reduce:_transition-none [.resizing_&amp;]:_transition-none _transform-gpu _transition-all _ease-in-out print:_hidden md:_w-64 md:_sticky md:_self-start max-md:[transform:translate3d(0,-100%,0)]"><div class="_px-4 _pt-4 md:_hidden"><div class="_not-prose _relative _flex _items-center _text-gray-900 dark:_text-gray-300 contrast-more:_text-gray-800 contrast-more:dark:_text-gray-300"><input spellcheck="false" class="_rounded-lg _px-3 _py-2 _transition-colors _w-full md:_w-64 _text-base _leading-tight md:_text-sm _bg-black/[.05] dark:_bg-gray-50/10 placeholder:_text-gray-500 dark:placeholder:_text-gray-400 contrast-more:_border contrast-more:_border-current [&amp;::-webkit-search-cancel-button]:_appearance-none" autoComplete="off" placeholder="Search documentation…" id="headlessui-combobox-input-:Rmrjd6:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/></div></div><div class="_overflow-y-auto _p-4 _grow md:_h-[calc(100vh-var(--nextra-navbar-height)-var(--nextra-menu-height))] nextra-scrollbar"><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-100" style="transition-duration:500ms"><div><ul class="_flex _flex-col _gap-1 nextra-menu-desktop max-md:_hidden"><li class="open"><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/typescript" type="button" data-headlessui-state="">TypeScript<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180 *:ltr:_rotate-90 *:rtl:_rotate-[-270deg]"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-100" style="transition-duration:500ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/named-operations-object">named-operations-object</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/relay-operation-optimizer">relay-operation-optimizer</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typed-document-node">typed-document-node</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript">typescript</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-apollo-angular">apollo-angular</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-apollo-client-helpers">apollo-client-helpers</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-apollo-next">apollo-next</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-document-nodes">document-nodes</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-fabbrica">fabbrica</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-generic-sdk">generic-sdk</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-graphql-files-modules">graphql-files-modules</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-graphql-request">graphql-request</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-mongodb">mongodb</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-msw">msw</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-oclif">oclif</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-nhost">nhost</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-operations">operations</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-react-apollo">react-apollo</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-react-query">react-query</a></li><li class="_flex _flex-col _gap-1 active"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _bg-primary-100 _font-semibold _text-primary-800 dark:_bg-primary-400/10 dark:_text-primary-600 contrast-more:_border-primary-500 contrast-more:dark:_border-primary-500" href="/graphql/codegen/plugins/typescript/typescript-resolvers">resolvers</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-rtk-query">rtk-query</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-stencil-apollo">stencil-apollo</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-svelte-apollo">svelte-apollo</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-type-graphql">type-graphql</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-urql">urql</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-validation-schema">validation-schema</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-vue-apollo">vue-apollo</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-vue-apollo-smart-ops">vue-apollo-smart-ops</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-vue-urql">vue-urql</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/typescript/typescript-mock-data">typescript-mock-data</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/presets" type="button" data-headlessui-state="">Presets<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/presets/preset-client">client-preset</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/presets/graphql-modules-preset">graphql-modules</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/presets/import-types-preset">import-types</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/presets/near-operation-file-preset">near-operation-file</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/java" type="button" data-headlessui-state="">Java<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/java/java">java</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/java/java-apollo-android">java-apollo-android</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/java/java-resolvers">java-resolvers</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/java/kotlin">kotlin</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/c-sharp" type="button" data-headlessui-state="">C-Sharp<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/c-sharp/c-sharp-operations">operations</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/flow" type="button" data-headlessui-state="">Flow<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/flow/flow-operations">operations</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/flow/flow-resolvers">resolvers</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/dart" type="button" data-headlessui-state="">dart<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/dart/flutter-freezed">flutter-freezed</a></li></ul></div></div></li><li class=""><button class="_transition _items-center _justify-between _gap-2 _text-left _w-full _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" data-href="/plugins/other" type="button" data-headlessui-state="">other<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="_shrink-0 _rounded-sm _p-0.5 hover:_bg-gray-800/5 dark:hover:_bg-gray-100/5 motion-reduce:*:_transition-none *:_origin-center *:_transition-transform *:rtl:_-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="_transform-gpu _transition-all _ease-in-out motion-reduce:_transition-none _opacity-0 _overflow-hidden" style="height:0;transition-duration:300ms"><div><ul class="_flex _flex-col _gap-1 _relative before:_absolute before:_inset-y-1 before:_w-px before:_bg-gray-200 before:_content-[&quot;&quot;] dark:before:_bg-neutral-800 ltr:_pl-3 ltr:before:_left-0 rtl:_pr-3 rtl:before:_right-0 _pt-1 ltr:_ml-3 rtl:_mr-3"><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/add">add</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/fragment-matcher">fragment-matcher</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/hasura-allow-list">hasura-allow-list</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/introspection">introspection</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/jsdoc">jsdoc</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/reason-client">reason-client</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/schema-ast">schema-ast</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/time">time</a></li><li class="_flex _flex-col _gap-1"><a class="nextra-focus _flex _rounded _px-2 _py-1.5 _text-sm _transition-colors [word-break:break-word] _cursor-pointer contrast-more:_border _text-gray-500 hover:_bg-gray-100 hover:_text-gray-900 dark:_text-neutral-400 dark:hover:_bg-primary-100/5 dark:hover:_text-gray-50 contrast-more:_text-gray-900 contrast-more:dark:_text-gray-50 contrast-more:_border-transparent contrast-more:hover:_border-gray-900 contrast-more:dark:hover:_border-gray-50" href="/graphql/codegen/plugins/other/urql-introspection">urql-introspection</a></li></ul></div></div></li></ul></div></div></div><div class="nextra-sidebar-footer _sticky _bottom-0 _flex _items-center _gap-2 _py-4 _mx-3 _px-1" data-toggle-animation="off"><div class="_grow _flex _flex-col"><button title="Change theme" class="_h-7 _rounded-md _px-2 _text-xs _font-medium _transition-colors _text-gray-600 dark:_text-gray-400" id="headlessui-listbox-button-:Rrnjd6:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><div class="_flex _items-center _gap-2 _capitalize"><svg fill="none" viewBox="3 3 18 18" width="12" height="12" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" fill="currentColor" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg><span class="">Light</span></div></button></div><button class="_transition max-md:_hidden _rounded-md _p-2 _text-gray-600 dark:_text-gray-400" title="Hide sidebar" type="button" data-headlessui-state=""><svg viewBox="0 0 16 16" fill="currentColor" height="12" class=""><path d="M4.177 7.823l2.396-2.396A.25.25 0 017 5.604v4.792a.25.25 0 01-.427.177L4.177 8.177a.25.25 0 010-.354z"></path><path fill-rule="evenodd" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm1.75-.25a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25H9.5v-13H1.75zm12.5 13H11v-13h3.25a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25z"></path></svg></button></div></aside><nav class="nextra-toc _order-last max-xl:_hidden _w-64 _shrink-0 print:_hidden" aria-label="table of contents"><div class="_grid _grid-rows-[min-content_1fr_min-content] _sticky _top-[--nextra-navbar-height] _pt-6 _text-sm _max-h-[calc(100vh-var(--nextra-navbar-height))]"><p class="_mx-4 _font-semibold _tracking-tight _pb-2 _shadow-[0_12px_16px_rgb(var(--nextra-bg))] contrast-more:_shadow-none _z-[1]">On This Page</p><ul class="_px-4 nextra-scrollbar _overscroll-y-contain _overflow-y-auto _hyphens-auto _py-1.5"><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#usage-example" class="nextra-focus _font-semibold _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Usage Example</a></li><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#integration-with-apollo-server" class="nextra-focus _font-semibold _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Integration with Apollo-Server</a></li><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#use-your-model-types-mappers" class="nextra-focus _font-semibold _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Use Your Model Types (<code class="nextra-code" dir="ltr">mappers</code>)</a></li><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#enum-resolvers" class="nextra-focus _font-semibold _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Enum Resolvers</a></li><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#usage-example-1" class="nextra-focus _ms-4 _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Usage Example</a></li><li class="_my-2 _scroll-my-6 _scroll-py-6"><a href="#defined-shared-mappers-across-configurations" class="nextra-focus _font-semibold _block _transition-colors _subpixel-antialiased _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-300 contrast-more:_text-gray-900 contrast-more:_underline contrast-more:dark:_text-gray-50 _break-words">Defined shared mappers across configurations</a></li></ul><div class="nextra-toc-footer _pt-4 _flex _flex-col _items-start _gap-2 _pb-4 _mx-4"><a class="nextra-focus _text-xs _font-medium _text-gray-600 dark:_text-gray-400 hover:_text-gray-800 dark:hover:_text-gray-200 contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100" href="https://github.com/dotansimha/graphql-code-generator/issues/new?title=Feedback%20for%20%E2%80%9CTypeScript%20Resolvers%E2%80%9D&amp;labels=kind/docs" target="_blank" rel="noreferrer">Question? Give us feedback →</a><a class="nextra-focus _text-xs _font-medium _text-gray-600 dark:_text-gray-400 hover:_text-gray-800 dark:hover:_text-gray-200 contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100" href="https://github.com/dotansimha/graphql-code-generator/tree/master/website/src/pages/plugins/typescript/typescript-resolvers.mdx">Edit this page on GitHub</a><button class="_transition _flex _items-center _gap-1.5 _whitespace-nowrap _opacity-0 _text-xs _font-medium _text-gray-600 dark:_text-gray-400 hover:_text-gray-800 dark:hover:_text-gray-200 contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100" aria-hidden="true" type="button" disabled="" data-headlessui-state="disabled" data-disabled="">Scroll to top<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="16" class="_-rotate-90 _border _rounded-full _border-current"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button></div></div></nav><div id="reach-skip-nav"></div><article class="_w-full _break-words nextra-content _flex _min-h-[calc(100vh-var(--nextra-navbar-height))] _min-w-0 _justify-center _pb-8 _pr-[calc(env(safe-area-inset-right)-1.5rem)]"><main class="_w-full _min-w-0 _max-w-6xl _px-6 _pt-4 md:_px-12"><div class="nextra-breadcrumb _mt-1.5 _flex _items-center _gap-1 _overflow-hidden _text-sm _text-gray-500 dark:_text-gray-400 contrast-more:_text-current"><a class="_whitespace-nowrap _transition-colors _min-w-6 _overflow-hidden _text-ellipsis nextra-focus _ring-inset hover:_text-gray-900 dark:hover:_text-gray-100" title="Plugins" href="/graphql/codegen/plugins">Plugins</a><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="14" class="_shrink-0 rtl:_rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg><a class="_whitespace-nowrap _transition-colors _min-w-6 _overflow-hidden _text-ellipsis nextra-focus _ring-inset hover:_text-gray-900 dark:hover:_text-gray-100" title="TypeScript" href="/graphql/codegen/plugins/typescript/named-operations-object">TypeScript</a><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="14" class="_shrink-0 rtl:_rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="_whitespace-nowrap _transition-colors _font-medium _text-gray-700 contrast-more:_font-bold contrast-more:_text-current dark:_text-gray-100 contrast-more:dark:_text-current" title="resolvers">resolvers</span></div><div class="nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4 contrast-more:_border-current contrast-more:dark:_border-current _border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"><div class="_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2" style="font-family:&quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;">💡</div><div class="_w-full _min-w-0 _leading-7"><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This plugin is meant to be used for low-level use cases or as building block for presets. <br/> For building a <strong>GraphQL server schema</strong> we recommend using the <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="/graphql/codegen/docs/guides/graphql-server-apollo-yoga-with-server-preset"><code class="nextra-code" dir="ltr">server-preset</code></a>.</p></div></div> <h1 class="_mt-2 _text-4xl _font-bold _tracking-tight _text-slate-900 dark:_text-slate-100">TypeScript Resolvers</h1> <table class="_not-prose _block _overflow-x-auto nextra-scrollbar [&amp;:not(:first-child)]:_mt-6 _p-0"><thead><tr class="_m-0 _border-t _border-gray-300 _p-0 dark:_border-gray-600 even:_bg-gray-100 even:dark:_bg-gray-600/20"><th class="_m-0 _border _border-gray-300 _px-4 _py-2 _font-semibold dark:_border-gray-600">Package name</th><th class="_m-0 _border _border-gray-300 _px-4 _py-2 _font-semibold dark:_border-gray-600">Weekly Downloads</th><th class="_m-0 _border _border-gray-300 _px-4 _py-2 _font-semibold dark:_border-gray-600">Version</th><th class="_m-0 _border _border-gray-300 _px-4 _py-2 _font-semibold dark:_border-gray-600">License</th><th class="_m-0 _border _border-gray-300 _px-4 _py-2 _font-semibold dark:_border-gray-600">Updated</th></tr></thead><tbody><tr class="_m-0 _border-t _border-gray-300 _p-0 dark:_border-gray-600 even:_bg-gray-100 even:dark:_bg-gray-600/20"><td class="_m-0 _border _border-gray-300 _px-4 _py-2 dark:_border-gray-600"><a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://npmjs.com/package/@graphql-codegen/typescript-resolvers" target="_blank" rel="noreferrer"><code class="nextra-code" dir="ltr">@graphql-codegen/typescript-resolvers</code></a></td><td class="_m-0 _border _border-gray-300 _px-4 _py-2 dark:_border-gray-600"><img title="Downloads" src="https://badgen.net/npm/dw/@graphql-codegen/typescript-resolvers" alt="Downloads"/></td><td class="_m-0 _border _border-gray-300 _px-4 _py-2 dark:_border-gray-600"><img title="Version" src="https://badgen.net/npm/v/@graphql-codegen/typescript-resolvers" alt="Version"/></td><td class="_m-0 _border _border-gray-300 _px-4 _py-2 dark:_border-gray-600"><img title="License" src="https://badgen.net/npm/license/@graphql-codegen/typescript-resolvers" alt="License"/></td><td class="_m-0 _border _border-gray-300 _px-4 _py-2 dark:_border-gray-600">Nov 22nd, 2024</td></tr></tbody></table> <h2 id="installation" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Installation<a href="#installation" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <button type="button" aria-hidden="true" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0"></button><div tabindex="-1"><div class="nextra-scrollbar _overflow-x-auto _overscroll-x-contain _overflow-y-hidden _mt-4 _flex _w-full _gap-2 _border-b _border-gray-200 _pb-px dark:_border-neutral-800 nextra-focus" role="tablist" aria-orientation="horizontal"><button class="_outline-none _whitespace-nowrap _rounded-t _p-2 _font-medium _leading-5 _transition-colors _-mb-0.5 _select-none _border-b-2 _border-current _text-primary-600" id="headlessui-tabs-tab-:R2o1o6j9d6:" role="tab" type="button" aria-selected="true" tabindex="0" data-headlessui-state="selected" data-selected="">npm</button><button class="_whitespace-nowrap _rounded-t _p-2 _font-medium _leading-5 _transition-colors _-mb-0.5 _select-none _border-b-2 _border-transparent _text-gray-600 dark:_text-gray-200" id="headlessui-tabs-tab-:R4o1o6j9d6:" role="tab" type="button" aria-selected="false" tabindex="-1" data-headlessui-state="">pnpm</button><button class="_whitespace-nowrap _rounded-t _p-2 _font-medium _leading-5 _transition-colors _-mb-0.5 _select-none _border-b-2 _border-transparent _text-gray-600 dark:_text-gray-200" id="headlessui-tabs-tab-:R6o1o6j9d6:" role="tab" type="button" aria-selected="false" tabindex="-1" data-headlessui-state="">yarn</button><button class="_whitespace-nowrap _rounded-t _p-2 _font-medium _leading-5 _transition-colors _-mb-0.5 _select-none _border-b-2 _border-transparent _text-gray-600 dark:_text-gray-200" id="headlessui-tabs-tab-:R8o1o6j9d6:" role="tab" type="button" aria-selected="false" tabindex="-1" data-headlessui-state="">bun</button></div><div><div class="_rounded _mt-6" id="headlessui-tabs-panel-:R381o6j9d6:" role="tabpanel" tabindex="0" data-headlessui-state="selected" data-selected=""><div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> i</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> -D</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> @graphql-codegen/typescript-resolvers</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div></div><div class="_rounded _mt-6" id="headlessui-tabs-panel-:R581o6j9d6:" role="tabpanel" tabindex="-1" hidden="" style="display:none" data-headlessui-state=""><div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> -D</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> @graphql-codegen/typescript-resolvers</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div></div><div class="_rounded _mt-6" id="headlessui-tabs-panel-:R781o6j9d6:" role="tabpanel" tabindex="-1" hidden="" style="display:none" data-headlessui-state=""><div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">yarn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> @graphql-codegen/typescript-resolvers</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div></div><div class="_rounded _mt-6" id="headlessui-tabs-panel-:R981o6j9d6:" role="tabpanel" tabindex="-1" hidden="" style="display:none" data-headlessui-state=""><div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">bun</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> @graphql-codegen/typescript-resolvers</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div></div></div></div> <div class="nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4 contrast-more:_border-current contrast-more:dark:_border-current _border-yellow-100 _bg-yellow-50 _text-yellow-900 dark:_border-yellow-200/30 dark:_bg-yellow-700/30 dark:_text-yellow-200"><div class="_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2" style="font-family:&quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;">⚠️</div><div class="_w-full _min-w-0 _leading-7"><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><strong>Usage Requirements</strong> In order to use this GraphQL Codegen plugin, please make sure that you have GraphQL operations (<code class="nextra-code" dir="ltr">query</code> / <code class="nextra-code" dir="ltr">mutation</code> / <code class="nextra-code" dir="ltr">subscription</code> and <code class="nextra-code" dir="ltr">fragment</code>) set as <code class="nextra-code" dir="ltr">documents: …</code> in your <code class="nextra-code" dir="ltr">codegen.yml</code>.</p><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Without loading your GraphQL operations (<code class="nextra-code" dir="ltr">query</code>, <code class="nextra-code" dir="ltr">mutation</code>, <code class="nextra-code" dir="ltr">subscription</code> and <code class="nextra-code" dir="ltr">fragment</code>), you won’t see any change in the generated output.</p></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This plugin generates TypeScript signature for <code class="nextra-code" dir="ltr">resolve</code> functions of your GraphQL API. You can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers).</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can find a blog post explaining the usage of this plugin here: <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen" target="_blank" rel="noreferrer">https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen</a></p> <h2 id="config-api-reference" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Config API Reference<a href="#config-api-reference" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <h3 id="useindexsignature" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">useIndexSignature</code><a href="#useindexsignature" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Adds an index signature to any generates resolver.</p> <h4 id="usage-examples" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> useIndexSignature: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="noschemastitching" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">noSchemaStitching</code><a href="#noschemastitching" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Disables/Enables Schema Stitching support. By default, the resolver signature does not include the support for schema-stitching. Set to <code class="nextra-code" dir="ltr">false</code> to enable that.</p> <h4 id="usage-examples-1" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-1" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> noSchemaStitching: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">false</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="wrapfielddefinitions" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">wrapFieldDefinitions</code><a href="#wrapfielddefinitions" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Set to <code class="nextra-code" dir="ltr">true</code> in order to wrap field definitions with <code class="nextra-code" dir="ltr">FieldWrapper</code>. This is useful to allow return types such as Promises and functions. Needed for compatibility with <code class="nextra-code" dir="ltr">federation: true</code> when</p> <h3 id="customresolveinfo" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">customResolveInfo</code><a href="#customresolveinfo" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">graphql#GraphQLResolveInfo</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can provide your custom GraphQLResolveInfo instead of the default one from graphql-js</p> <h4 id="usage-examples-2" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-2" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> customResolveInfo: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-types#MyResolveInfo&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="customresolverfn" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">customResolverFn</code><a href="#customresolverfn" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">(parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) =&gt; Promise&lt;TResult&gt; | TResult</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can provide your custom ResolveFn instead the default. It has to be a type that uses the generics <code class="nextra-code" dir="ltr">&lt;TResult, TParent, TContext, TArgs&gt;</code></p> <h4 id="usage-examples-3" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-3" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="custom-signature" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Signature<a href="#custom-signature" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> customResolverFn: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-types#MyResolveFn&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="with-graphile" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">With Graphile<a href="#with-graphile" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> customResolverFn: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-types#MyResolveFn&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;path/to/file.ts&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;plugins&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: [</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;add&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;content&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;import { GraphileHelpers } from &#x27;graphile-utils/node8plus/fieldHelpers&#x27;;&quot;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;typescript&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;typescript-resolvers&quot;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> ],</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;config&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &quot;customResolverFn&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> parent: TParent,</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> args: TArgs,</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> context: TContext,</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> info: GraphQLResolveInfo &amp; { graphile: GraphileHelpers&lt;TParent&gt; }</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">) =&gt; Promise&lt;TResult&gt; | TResult;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="directiveresolvermappings" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">directiveResolverMappings</code><a href="#directiveresolvermappings" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">Record</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Map the usage of a directive into using a specific resolver.</p> <h4 id="usage-examples-4" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-4" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> customResolverFn: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;../resolver-types.ts#UnauthenticatedResolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> directiveResolverMappings: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> authenticated: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;../resolvers-types.ts#AuthenticatedResolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="allowparenttypeoverride" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">allowParentTypeOverride</code><a href="#allowparenttypeoverride" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to override the <code class="nextra-code" dir="ltr">ParentType</code> generic in each resolver, by avoid enforcing the base type of the generated generic type.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This will generate <code class="nextra-code" dir="ltr">ParentType = Type</code> instead of <code class="nextra-code" dir="ltr">ParentType extends Type = Type</code> in each resolver.</p> <h4 id="usage-examples-5" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-5" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> allowParentTypeOverride: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="optionalinfoargument" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">optionalInfoArgument</code><a href="#optionalinfoargument" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Sets <code class="nextra-code" dir="ltr">info</code> argument of resolver function to be optional field. Useful for testing.</p> <h4 id="usage-examples-6" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-6" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> optionalInfoArgument: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="makeresolvertypecallable" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">makeResolverTypeCallable</code><a href="#makeresolvertypecallable" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Set to <code class="nextra-code" dir="ltr">true</code> in order to allow the Resolver type to be callable</p> <h4 id="usage-examples-7" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-7" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> makeResolverTypeCallable: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="addunderscoretoargstype" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">addUnderscoreToArgsType</code><a href="#addunderscoretoargstype" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Adds <code class="nextra-code" dir="ltr">_</code> to generated <code class="nextra-code" dir="ltr">Args</code> types in order to avoid duplicate identifiers.</p> <h4 id="usage-examples-8" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-8" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> addUnderscoreToArgsType: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="contexttype" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">contextType</code><a href="#contexttype" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Use this configuration to set a custom type for your <code class="nextra-code" dir="ltr">context</code>, and it will affect all the resolvers, without the need to override it using generics each time. If you wish to use an external type and import it from another file, you can use <code class="nextra-code" dir="ltr">add</code> plugin and add the required <code class="nextra-code" dir="ltr">import</code> statement, or you can use a <code class="nextra-code" dir="ltr">module#type</code> syntax.</p> <h4 id="usage-examples-9" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-9" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="custom-context-type" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Context Type<a href="#custom-context-type" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> contextType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;MyContext&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="custom-context-type-by-path" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Context Type by Path<a href="#custom-context-type-by-path" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Note that the path should be relative to the generated file.</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> contextType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-types#MyContext&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="fieldcontexttypes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">fieldContextTypes</code><a href="#fieldcontexttypes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">Array_1</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Use this to set a custom type for a specific field <code class="nextra-code" dir="ltr">context</code>. It will only affect the targeted resolvers. You can either use <code class="nextra-code" dir="ltr">Field.Path#ContextTypeName</code> or <code class="nextra-code" dir="ltr">Field.Path#ExternalFileName#ContextTypeName</code></p> <h4 id="usage-examples-10" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-10" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="custom-field-context-types" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Field Context Types<a href="#custom-field-context-types" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> fieldContextTypes: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;MyType.foo#CustomContextType&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;MyType.bar#./my-file#ContextTypeOne&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="rootvaluetype" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">rootValueType</code><a href="#rootvaluetype" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Use this configuration to set a custom type for the <code class="nextra-code" dir="ltr">rootValue</code>, and it will affect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time. If you wish to use an external type and import it from another file, you can use <code class="nextra-code" dir="ltr">add</code> plugin and add the required <code class="nextra-code" dir="ltr">import</code> statement, or you can use both <code class="nextra-code" dir="ltr">module#type</code> or <code class="nextra-code" dir="ltr">module#namespace#type</code> syntax.</p> <h4 id="usage-examples-11" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-11" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="custom-rootvalue-type" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom RootValue Type<a href="#custom-rootvalue-type" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> rootValueType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;MyRootValue&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="custom-rootvalue-type-1" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom RootValue Type<a href="#custom-rootvalue-type-1" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> rootValueType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-types#MyRootValue&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="directivecontexttypes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">directiveContextTypes</code><a href="#directivecontexttypes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">Array_1</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Use this to set a custom type for a specific field <code class="nextra-code" dir="ltr">context</code> decorated by a directive. It will only affect the targeted resolvers. You can either use <code class="nextra-code" dir="ltr">Field.Path#ContextTypeName</code> or <code class="nextra-code" dir="ltr">Field.Path#ExternalFileName#ContextTypeName</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">ContextTypeName should by a generic Type that take the context or field context type as only type parameter.</p> <h4 id="usage-examples-12" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-12" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="directive-context-extender" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Directive Context Extender<a href="#directive-context-extender" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> directiveContextTypes: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;myCustomDirectiveName#./my-file#CustomContextExtender&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="mappertypesuffix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">mapperTypeSuffix</code><a href="#mappertypesuffix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Adds a suffix to the imported names to prevent name clashes.</p> <h4 id="usage-examples-13" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-13" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mapperTypeSuffix: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;Model&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="mappers" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">mappers</code><a href="#mappers" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">object</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Replaces a GraphQL type usage with a custom type, allowing you to return custom object from your resolvers. You can use both <code class="nextra-code" dir="ltr">module#type</code> and <code class="nextra-code" dir="ltr">module#namespace#type</code> syntax.</p> <h4 id="usage-examples-14" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-14" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="custom-context-type-1" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Context Type<a href="#custom-context-type-1" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mappers: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> User: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-models#UserDbObject&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Book: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-models#Collections&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="defaultmapper" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">defaultMapper</code><a href="#defaultmapper" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to set the default mapper when it’s not being override by <code class="nextra-code" dir="ltr">mappers</code> or generics. You can specify a type name, or specify a string in <code class="nextra-code" dir="ltr">module#type</code> or <code class="nextra-code" dir="ltr">module#namespace#type</code> format. The default value of mappers is the TypeScript type generated by <code class="nextra-code" dir="ltr">typescript</code> package.</p> <h4 id="usage-examples-15" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-15" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="replace-with-any" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Replace with any<a href="#replace-with-any" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultMapper: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;any&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="custom-base-object" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Custom Base Object<a href="#custom-base-object" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultMapper: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./my-file#BaseObject&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="wrap-default-types-with-partial" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Wrap default types with Partial<a href="#wrap-default-types-with-partial" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can also specify a custom wrapper for the original type, without overriding the original generated types, use <code class="nextra-code" dir="ltr">{T}</code> to specify the identifier. (for flow, use <code class="nextra-code" dir="ltr">$Shape&lt;{T}&gt;</code>)</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultMapper: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;Partial&lt;{T}&gt;&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="allow-deep-partial-with-utility-types" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Allow deep partial with <code class="nextra-code" dir="ltr">utility-types</code><a href="#allow-deep-partial-with-utility-types" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, { add: { content: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;import { DeepPartial } from &#x27;utility-types&#x27;;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> } }],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultMapper: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;DeepPartial&lt;{T}&gt;&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> avoidCheckingAbstractTypesRecursively: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // required if you have complex nested abstract types</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="avoidoptionals" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">avoidOptionals</code><a href="#avoidoptionals" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">AvoidOptionalsConfig | boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This will cause the generator to avoid using optionals (<code class="nextra-code" dir="ltr">?</code>), so all field resolvers must be implemented in order to avoid compilation errors.</p> <h4 id="usage-examples-16" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-16" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="override-all-definition-types" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Override all definition types<a href="#override-all-definition-types" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> avoidOptionals: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="override-only-specific-definition-types" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Override only specific definition types<a href="#override-only-specific-definition-types" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> avoidOptionals: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> field: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> inputValue: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> object: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultValue: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> query: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mutation: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> subscription: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="showunusedmappers" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">showUnusedMappers</code><a href="#showunusedmappers" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Warns about unused mappers.</p> <h4 id="usage-examples-17" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-17" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> showUnusedMappers: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="enumvalues" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">enumValues</code><a href="#enumvalues" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">EnumValuesMap</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Overrides the default value of enum values declared in your GraphQL schema, supported in this plugin because of the need for integration with <code class="nextra-code" dir="ltr">typescript</code> package. See documentation under <code class="nextra-code" dir="ltr">typescript</code> plugin for more information and examples.</p> <h3 id="resolvertypewrappersignature" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">resolverTypeWrapperSignature</code><a href="#resolvertypewrappersignature" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">Promise&lt;T&gt; | T</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to override <code class="nextra-code" dir="ltr">resolverTypeWrapper</code> definition.</p> <h3 id="federation" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">federation</code><a href="#federation" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Supports Apollo Federation</p> <h3 id="enumprefix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">enumPrefix</code><a href="#enumprefix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to disable prefixing for generated enums, works in combination with <code class="nextra-code" dir="ltr">typesPrefix</code>.</p> <h4 id="usage-examples-18" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-18" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="disable-enum-prefixes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Disable enum prefixes<a href="#disable-enum-prefixes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typesPrefix: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;I&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> enumPrefix: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">false</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="enumsuffix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">enumSuffix</code><a href="#enumsuffix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to disable suffixing for generated enums, works in combination with <code class="nextra-code" dir="ltr">typesSuffix</code>.</p> <h4 id="usage-examples-19" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-19" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="disable-enum-suffixes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Disable enum suffixes<a href="#disable-enum-suffixes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typesSuffix: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;I&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> enumSuffix: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">false</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="optionalresolvetype" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">optionalResolveType</code><a href="#optionalresolvetype" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Sets the <code class="nextra-code" dir="ltr">__resolveType</code> field as optional field.</p> <h3 id="immutabletypes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">immutableTypes</code><a href="#immutabletypes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Generates immutable types by adding <code class="nextra-code" dir="ltr">readonly</code> to properties and uses <code class="nextra-code" dir="ltr">ReadonlyArray</code>.</p> <h3 id="namespacedimportname" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">namespacedImportName</code><a href="#namespacedimportname" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">&#x27;&#x27;</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Prefixes all GraphQL related generated types with that value, as namespaces import. You can use this feature to allow separation of plugins to different files.</p> <h3 id="resolvertypesuffix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">resolverTypeSuffix</code><a href="#resolvertypesuffix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">Resolvers</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Suffix we add to each generated type resolver.</p> <h3 id="allresolverstypename" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">allResolversTypeName</code><a href="#allresolverstypename" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">Resolvers</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">The type name to use when exporting all resolvers signature as unified type.</p> <h3 id="internalresolversprefix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">internalResolversPrefix</code><a href="#internalresolversprefix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">&#x27;__&#x27;</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Defines the prefix value used for <code class="nextra-code" dir="ltr">__resolveType</code> and <code class="nextra-code" dir="ltr">__isTypeOf</code> resolvers. If you are using <code class="nextra-code" dir="ltr">mercurius-js</code>, please set this field to empty string for better compatibility.</p> <h3 id="generateinternalresolversifneeded" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">generateInternalResolversIfNeeded</code><a href="#generateinternalresolversifneeded" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">object</code> default: <code class="nextra-code" dir="ltr">{ __resolveReference: false }</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If relevant internal resolvers are set to <code class="nextra-code" dir="ltr">true</code>, the resolver type will only be generated if the right conditions are met. Enabling this allows a more correct type generation for the resolvers. For example:</p> <ul class="[:is(ol,ul)_&amp;]:_my-3 [&amp;:not(:first-child)]:_mt-6 _list-disc ltr:_ml-6 rtl:_mr-6"> <li class="_my-2"> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><code class="nextra-code" dir="ltr">__isTypeOf</code> is generated for implementing types and union members</p> </li> <li class="_my-2"> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><code class="nextra-code" dir="ltr">__resolveReference</code> is generated for federation types that have at least one resolvable <code class="nextra-code" dir="ltr">@key</code> directive</p> </li> </ul> <h3 id="onlyresolvetypeforinterfaces" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">onlyResolveTypeForInterfaces</code><a href="#onlyresolvetypeforinterfaces" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Turning this flag to <code class="nextra-code" dir="ltr">true</code> will generate resolver signature that has only <code class="nextra-code" dir="ltr">resolveType</code> for interfaces, forcing developers to write inherited type resolvers in the type itself.</p> <h3 id="resolversnonoptionaltypename" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">resolversNonOptionalTypename</code><a href="#resolversnonoptionaltypename" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">ResolversNonOptionalTypenameConfig | boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Makes <code class="nextra-code" dir="ltr">__typename</code> of resolver mappings non-optional without affecting the base types.</p> <h4 id="usage-examples-20" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-20" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="enable-for-all" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Enable for all<a href="#enable-for-all" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> resolversNonOptionalTypename: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // or { unionMember: true, interfaceImplementingType: true }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="enable-except-for-some-types" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Enable except for some types<a href="#enable-except-for-some-types" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolver&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> resolversNonOptionalTypename: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> unionMember: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> interfaceImplementingType: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> excludeTypes: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;MyType&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="avoidcheckingabstracttypesrecursively" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">avoidCheckingAbstractTypesRecursively</code><a href="#avoidcheckingabstracttypesrecursively" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If true, recursively goes through all object type’s fields, checks if they have abstract types and generates expected types correctly. This may not work for cases where provided default mapper types are also nested e.g. <code class="nextra-code" dir="ltr">defaultMapper: DeepPartial&lt;{T}&gt;</code> or <code class="nextra-code" dir="ltr">defaultMapper: Partial&lt;{T}&gt;</code>.</p> <h3 id="strictscalars" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">strictScalars</code><a href="#strictscalars" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Makes scalars strict.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If scalars are found in the schema that are not defined in <code class="nextra-code" dir="ltr">scalars</code> an error will be thrown during codegen.</p> <h4 id="usage-examples-21" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-21" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> strictScalars: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="defaultscalartype" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">defaultScalarType</code><a href="#defaultscalartype" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">any</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allows you to override the type that unknown scalars will have.</p> <h4 id="usage-examples-22" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-22" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> defaultScalarType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;unknown&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="scalars" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">scalars</code><a href="#scalars" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">ScalarsMap_1</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Extends or overrides the built-in scalars and custom GraphQL scalars to a custom type.</p> <h4 id="usage-examples-23" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-23" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> scalars: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> ID: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> input: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;string&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> output: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;string | number&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> DateTime: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;Date&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> JSON: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;{ [key: string]: any }&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="namingconvention" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">namingConvention</code><a href="#namingconvention" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">NamingConvention_1</code> default: <code class="nextra-code" dir="ltr">change-case-all#pascalCase</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Allow you to override the naming convention of the output. You can either override all namings, or specify an object with specific custom naming convention per output. The format of the converter must be a valid <code class="nextra-code" dir="ltr">module#method</code>. Allowed values for specific output are: <code class="nextra-code" dir="ltr">typeNames</code>, <code class="nextra-code" dir="ltr">enumValues</code>. You can also use “keep” to keep all GraphQL names as-is. Additionally, you can set <code class="nextra-code" dir="ltr">transformUnderscore</code> to <code class="nextra-code" dir="ltr">true</code> if you want to override the default behavior, which is to preserve underscores.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Available case functions in <code class="nextra-code" dir="ltr">change-case-all</code> are <code class="nextra-code" dir="ltr">camelCase</code>, <code class="nextra-code" dir="ltr">capitalCase</code>, <code class="nextra-code" dir="ltr">constantCase</code>, <code class="nextra-code" dir="ltr">dotCase</code>, <code class="nextra-code" dir="ltr">headerCase</code>, <code class="nextra-code" dir="ltr">noCase</code>, <code class="nextra-code" dir="ltr">paramCase</code>, <code class="nextra-code" dir="ltr">pascalCase</code>, <code class="nextra-code" dir="ltr">pathCase</code>, <code class="nextra-code" dir="ltr">sentenceCase</code>, <code class="nextra-code" dir="ltr">snakeCase</code>, <code class="nextra-code" dir="ltr">lowerCase</code>, <code class="nextra-code" dir="ltr">localeLowerCase</code>, <code class="nextra-code" dir="ltr">lowerCaseFirst</code>, <code class="nextra-code" dir="ltr">spongeCase</code>, <code class="nextra-code" dir="ltr">titleCase</code>, <code class="nextra-code" dir="ltr">upperCase</code>, <code class="nextra-code" dir="ltr">localeUpperCase</code> and <code class="nextra-code" dir="ltr">upperCaseFirst</code> <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://github.com/btxtiger/change-case-all" target="_blank" rel="noreferrer">See more</a></p> <h4 id="usage-examples-24" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-24" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <h5 id="override-all-names" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Override All Names<a href="#override-all-names" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> namingConvention: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;change-case-all#lowerCase&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="upper-case-enum-values" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Upper-case enum values<a href="#upper-case-enum-values" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> namingConvention: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typeNames: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;change-case-all#pascalCase&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> enumValues: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;change-case-all#upperCase&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="keep-names-as-is" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Keep names as is<a href="#keep-names-as-is" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> namingConvention: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;keep&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h5 id="remove-underscores" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-lg">Remove Underscores<a href="#remove-underscores" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> namingConvention: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typeNames: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;change-case-all#pascalCase&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> transformUnderscore: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="typesprefix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">typesPrefix</code><a href="#typesprefix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">(empty)</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Prefixes all the generated types.</p> <h4 id="usage-examples-25" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-25" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typesPrefix: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;I&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="typessuffix" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">typesSuffix</code><a href="#typessuffix" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">(empty)</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Suffixes all the generated types.</p> <h4 id="usage-examples-26" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-26" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> typesSuffix: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;I&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="skiptypename" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">skipTypename</code><a href="#skiptypename" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Does not add <code class="nextra-code" dir="ltr">__typename</code> to the generated types, unless it was specified in the selection set.</p> <h4 id="usage-examples-27" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-27" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> skipTypename: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="nonoptionaltypename" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">nonOptionalTypename</code><a href="#nonoptionaltypename" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Automatically adds <code class="nextra-code" dir="ltr">__typename</code> field to the generated types, even when they are not specified in the selection set, and makes it non-optional</p> <h4 id="usage-examples-28" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-28" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> nonOptionalTypename: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="usetypeimports" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">useTypeImports</code><a href="#usetypeimports" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Will use <code class="nextra-code" dir="ltr">import type {}</code> rather than <code class="nextra-code" dir="ltr">import {}</code> when importing only types. This gives compatibility with TypeScript’s “importsNotUsedAsValues”: “error” option</p> <h4 id="usage-examples-29" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-xl">Usage Examples<a href="#usage-examples-29" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // ...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;path/to/file&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // plugins...</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> useTypeImports: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> };</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config;</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h3 id="dedupefragments" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">dedupeFragments</code><a href="#dedupefragments" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node.</p> <h3 id="inlinefragmenttypes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">inlineFragmentTypes</code><a href="#inlinefragmenttypes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">string</code> default: <code class="nextra-code" dir="ltr">inline</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Whether fragment types should be inlined into other operations. “inline” is the default behavior and will perform deep inlining fragment types within operation type definitions. “combine” is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). “mask” transforms the types for use with fragment masking. Useful when masked types are needed when not using the “client” preset e.g. such as combining it with Apollo Client’s data masking feature.</p> <h3 id="emitlegacycommonjsimports" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">emitLegacyCommonJSImports</code><a href="#emitlegacycommonjsimports" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">true</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Emit legacy common js imports. Default it will be <code class="nextra-code" dir="ltr">true</code> this way it ensure that generated code works with <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://github.com/dotansimha/graphql-code-generator/issues/8065" target="_blank" rel="noreferrer">non-compliant bundlers</a>.</p> <h3 id="extractallfieldstotypes" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">extractAllFieldsToTypes</code><a href="#extractallfieldstotypes" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time.</p> <h3 id="printfieldsonnewlines" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl"><code class="nextra-code" dir="ltr">printFieldsOnNewLines</code><a href="#printfieldsonnewlines" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">type: <code class="nextra-code" dir="ltr">boolean</code> default: <code class="nextra-code" dir="ltr">false</code></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output.</p> <div class="nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4 contrast-more:_border-current contrast-more:dark:_border-current _border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"><div class="_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2" style="font-family:&quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;">💡</div><div class="_w-full _min-w-0 _leading-7"><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Watch <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://graphql.wtf/episodes/26-type-safe-resolvers-with-graphql-code-generator" target="_blank" rel="noreferrer">Episode #26 of <code class="nextra-code" dir="ltr">graphql.wtf</code></a> for a quick introduction to this plugin and its features:</p></div></div> <iframe class="mt-6 aspect-video w-full" title="YouTube Video Player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" src="https://youtube.com/embed/tHMaNmqPIC4"></iframe> <div class="nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4 contrast-more:_border-current contrast-more:dark:_border-current _border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"><div class="_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2" style="font-family:&quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;">💡</div><div class="_w-full _min-w-0 _leading-7"><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://graphql.wtf/" target="_blank" rel="noreferrer">More weekly episodes are available in <code class="nextra-code" dir="ltr">graphql.wtf</code></a> by <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://twitter.com/notrab" target="_blank" rel="noreferrer">Jamie Barton</a>.</p></div></div> <!-- --> <h2 id="usage-example" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Usage Example<a href="#usage-example" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <div class="nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4 contrast-more:_border-current contrast-more:dark:_border-current _border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"><div class="_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2" style="font-family:&quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;">💡</div><div class="_w-full _min-w-0 _leading-7"><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><strong>Quick Start with <code class="nextra-code" dir="ltr">typescript-resolvers</code></strong></p><p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can find <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen" target="_blank" rel="noreferrer">a blog post we wrote about using and customizing this plugin here</a></p></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Run <code class="nextra-code" dir="ltr">graphql-codegen</code> as usual, with this new plugin:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.json&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./src/resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Import the types from the generated file and use in the resolver:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { Resolvers } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> resolvers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> Resolvers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Query: {</span></span> <span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> myQuery</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70">root</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70">args</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70">context</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {}</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This will make the resolver fully typed and compatible with typescript compiler, including the handler’s arguments and return value.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Generated resolvers can be passed directly into <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://npmjs.com/package/graphql-tools" target="_blank" rel="noreferrer">graphql-tools</a> <code class="nextra-code" dir="ltr">makeExecutableSchema</code> function.</p> <h2 id="integration-with-apollo-server" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Integration with Apollo-Server<a href="#integration-with-apollo-server" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">By default <code class="nextra-code" dir="ltr">apollo-server</code> will not work with generated resolvers signature.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If you are using Apollo Server with TypeScript, note that you need to set <code class="nextra-code" dir="ltr">useIndexSignature: true</code> in your config, in order to add a compatible index signature (<a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://github.com/dotansimha/graphql-code-generator/issues/1133#issuecomment-456812621" target="_blank" rel="noreferrer">more info</a>).</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> useIndexSignature: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If you wish to have an easy start, and have the ability to use resolvers chaining without models types, you can also add to your config <code class="nextra-code" dir="ltr">defaultMapper: Partial&lt;{T}&gt;</code>. This will allow you to return partial types in your resolvers.</p> <h2 id="use-your-model-types-mappers" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Use Your Model Types (<code class="nextra-code" dir="ltr">mappers</code>)<a href="#use-your-model-types-mappers" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">If you wish to use your custom model types, codegen allow you to use <code class="nextra-code" dir="ltr">mappers</code> feature to map GraphQL types to your custom model types. <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen" target="_blank" rel="noreferrer">You can find an article explaining how to use <code class="nextra-code" dir="ltr">mappers</code> here</a>.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Here’s the basic example of using it:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.graphql&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> contextType: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;models#MyContextType&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mappers: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> User: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./models#UserModel&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Profile: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./models#UserProfile&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h2 id="enum-resolvers" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Enum Resolvers<a href="#enum-resolvers" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7"><a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://apollographql.com/docs/apollo-server" target="_blank" rel="noreferrer">Apollo-Server</a> and schemas built with <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://graphql-tools.com" target="_blank" rel="noreferrer"><code class="nextra-code" dir="ltr">graphql-tools</code></a> supports creating resolvers for GraphQL <code class="nextra-code" dir="ltr">enum</code>s.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">This is helpful because you can have internal values that are different from the public enum values, and you can use the internal values in your resolvers.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Codegen allows you to specify either <code class="nextra-code" dir="ltr">mappers</code> or <code class="nextra-code" dir="ltr">enumValues</code> to map enums in your resolvers, and if you are using it for enums, you’ll get a resolver signature for the enum resolvers as well.</p> <h3 id="usage-example-1" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">Usage Example<a href="#usage-example-1" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">With the following schema:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">type</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> Query</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70"> favoriteColor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">Color</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">!</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">enum</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> Color</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> RED</span></span> <span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> BLUE</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-2"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div></div> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.graphql&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> enumValues: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Color: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./enums#ColorsCode&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">enums.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> enum</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> ColorsCode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> MY_RED</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;#FF0000&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> MY_BLUE</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;#0000FF&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">resolvers.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { Resolvers } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types&#x27;</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { ColorsCode } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./enums&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> resolvers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> Resolvers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Color: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> RED: ColorsCode.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">MY_RED</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> BLUE: ColorsCode.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">MY_BLUE</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Query: {</span></span> <span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> favoriteColor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> ColorsCode.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">MY_RED</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"> // Now you cn return this, and it will be mapped to your actual GraphQL enum</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can also define the same with explicit enum values:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.graphql&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> enumValues: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Color: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> RED: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;#FF0000&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> BLUE: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;#0000FF&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">Or, with <code class="nextra-code" dir="ltr">mappers</code>:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.graphql&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;./resolvers-types.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mappers: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> Color: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;./enums#ColorsCode&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">]</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <h2 id="defined-shared-mappers-across-configurations" class="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-10 _border-b _pb-1 _text-3xl _border-neutral-200/70 contrast-more:_border-neutral-400 dark:_border-primary-100/10 contrast-more:dark:_border-neutral-400">Defined shared mappers across configurations<a href="#defined-shared-mappers-across-configurations" class="nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">In some case, you might want to share some common <code class="nextra-code" dir="ltr">mappers</code> between many output file configurations.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">To do so, you can leverage the YAML references features as follow:</p> <div class="nextra-code _relative [&amp;:not(:first-child)]:_mt-6"><div class="_px-4 _text-xs _text-gray-700 dark:_text-gray-200 _bg-gray-100 dark:_bg-neutral-900 _flex _items-center _h-12 _gap-2 _rounded-t-md _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _border-b-0"><svg viewBox="0 0 24 24" fill="currentColor" class="_h-4 _w-auto _max-w-6 _shrink-0"><path d="M0 2.66667V21.3333C0 22.8067 1.19333 24 2.66667 24H21.3333C22.8067 24 24 22.8067 24 21.3333V2.66667C24 1.19333 22.8067 0 21.3333 0H2.66667C1.19333 0 0 1.19333 0 2.66667ZM14.2213 12.6013H11.3973V21.3333H9.12133V12.6013H6.356V10.6667H14.2213V12.6013ZM14.664 20.8347V18.5C14.664 18.5 15.9387 19.4613 17.4693 19.4613C19 19.4613 18.94 18.4613 18.94 18.324C18.94 16.872 14.6053 16.872 14.6053 13.656C14.6053 9.28133 20.9213 11.008 20.9213 11.008L20.8427 13.0867C20.8427 13.0867 19.784 12.38 18.5867 12.38C17.3907 12.38 16.9587 12.9493 16.9587 13.5573C16.9587 15.1267 21.3333 14.9693 21.3333 18.128C21.3333 22.992 14.664 20.8347 14.664 20.8347Z"></path></svg><span class="_truncate">codegen.ts</span><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 _ml-auto" title="Copy code" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" height="16" class="nextra-copy-icon"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5"></path></svg></button></div><pre class="nextra-focus _overflow-x-auto _subpixel-antialiased _text-[.9em] _bg-white dark:_bg-black _py-4 _ring-1 _ring-inset _ring-gray-300 dark:_ring-neutral-700 contrast-more:_ring-gray-900 contrast-more:dark:_ring-gray-50 contrast-more:_contrast-150 _rounded-b-md" tabindex="0"><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> { CodegenConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;@graphql-codegen/cli&#x27;</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> sharedMappers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> ID: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;IDType&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span> </span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0"> CodegenConfig</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> schema: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;schema.graphql&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> documents: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;src/*.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> generates: {</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;resolvers-types-1.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mappers: {</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">sharedMappers,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> String: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;StringType&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span> <span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> &#x27;resolvers-types-2.ts&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> plugins: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;typescript-resolvers&#x27;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">],</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config: {</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> mappers: {</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">sharedMappers,</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> String: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&#x27;StringType&#x27;</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> }</span></span> <span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span> <span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> config</span></span></code></pre><div class="_opacity-0 _transition [div:hover&gt;&amp;]:_opacity-100 focus-within:_opacity-100 _flex _gap-1 _absolute _right-4 _top-14"><button class="_transition _border _border-gray-300 dark:_border-neutral-700 contrast-more:_border-gray-900 contrast-more:dark:_border-gray-50 _rounded-md _p-1.5 md:_hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="16"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div></div> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">The above configuration will provide the ID type mapping to both <code class="nextra-code" dir="ltr">resolvers-types-1.ts</code> and <code class="nextra-code" dir="ltr">resolvers-types-2.ts</code> files.</p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">The complete example is available here: <a class="nextra-focus _text-primary-600 _underline hover:_no-underline _decoration-from-font [text-underline-position:from-font]" href="https://github.com/charlypoly/codegen-repros/blob/master/reusable-mappers/codegen.yml" target="_blank" rel="noreferrer">codegen-repros/reusable-mappers</a></p> <p class="[&amp;:not(:first-child)]:_mt-6 _leading-7">You can also achieve a similar reusable mappers configuration by providing a TypeScript or JavaScript file configuration.</p><div class="_mt-16"></div><div class="_mb-8 _flex _items-center _border-t _pt-8 dark:_border-neutral-800 contrast-more:_border-neutral-400 dark:contrast-more:_border-neutral-400 print:_hidden"><a title="react-query" class="nextra-focus _text-gray-600 dark:_text-gray-400 hover:_text-gray-800 dark:hover:_text-gray-200 contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100 _flex _max-w-[50%] _items-center _gap-1 _py-4 _text-base _font-medium _transition-colors [word-break:break-word] md:_text-lg ltr:_pr-4 rtl:_pl-4" href="/graphql/codegen/plugins/typescript/typescript-react-query"><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" class="_inline _h-5 _shrink-0 ltr:_rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg>react-query</a><a title="rtk-query" class="nextra-focus _text-gray-600 dark:_text-gray-400 hover:_text-gray-800 dark:hover:_text-gray-200 contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100 _flex _max-w-[50%] _items-center _gap-1 _py-4 _text-base _font-medium _transition-colors [word-break:break-word] md:_text-lg ltr:_ml-auto ltr:_pl-4 ltr:_text-right rtl:_mr-auto rtl:_pr-4 rtl:_text-left" href="/graphql/codegen/plugins/typescript/typescript-rtk-query">rtk-query<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" class="_inline _h-5 _shrink-0 rtl:_rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></div></main></article></div><footer class="relative flex justify-center px-4 py-6 xl:px-[120px] [&amp;&gt;:first-child]:mx-0 [&amp;&gt;:first-child]:max-w-[90rem] pt-[72px]"><div class="mx-4 grid w-full max-w-[75rem] grid-cols-1 gap-x-6 text-green-800 max-lg:gap-y-16 sm:grid-cols-4 lg:gap-x-8 xl:gap-x-10 dark:text-neutral-400"><div class="max-lg:col-span-full"><a class="hive-focus -m-1.5 flex rounded p-1.5 text-green-1000 dark:text-white outline-none transition focus-visible:ring" href="/graphql/codegen"><div class="flex items-center gap-3 text-green-1000"><svg width="53" height="53" viewBox="0 0 53 53" fill="currentColor" class="size-8"><path d="m42.212 16.24-5.427-5.427-7.46 7.46a3.997 3.997 0 0 1-5.652 0l-7.46-7.46-5.428 5.427 7.46 7.46a3.997 3.997 0 0 1 0 5.653l-7.46 7.46 5.427 5.427 7.46-7.46a3.997 3.997 0 0 1 5.653 0l7.46 7.46 5.428-5.427-7.46-7.46a3.997 3.997 0 0 1 0-5.653l7.46-7.46Z"></path><path d="M26.498 41.672 21.072 47.1l5.427 5.426 5.426-5.426-5.427-5.427ZM26.499.525 21.073 5.95l5.426 5.426 5.426-5.426L26.5.525ZM47.074 21.101l-5.426 5.427 5.426 5.426 5.426-5.426-5.426-5.427ZM5.926 21.1.5 26.528l5.426 5.426 5.426-5.426-5.426-5.426Z"></path></svg><span class="text-2xl/[1.2] font-medium tracking-[-0.16px]">Codegen</span></div></a><p class="mt-6 lg:mt-8">End-to-end type safety</p></div><div class="col-span-full grid grid-flow-row grid-cols-2 justify-stretch gap-6 text-sm sm:col-span-4 sm:grid-cols-3 lg:col-span-3 lg:pb-12 lg:text-base"><div class="flex flex-col gap-y-3 text-nowrap lg:gap-y-4"><h3 class="font-medium dark:text-white">Products</h3><ul class="contents"><li><a title="Schema registry for your GraphQL workflows" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/hive">Hive</a></li><li><a title="A fully-featured GraphQL gateway framework" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/mesh">Mesh</a></li><li><a title="A fully-featured, simple to set up, performant and extendable server" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/yoga-server">Yoga</a></li><li><a title="Generation of typed queries, mutations, subscriptions and typed GraphQL resolvers" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/codegen">Codegen</a></li><li><a title="Schema management tool" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/inspector">Inspector</a></li><li><a title="Common custom GraphQL Scalars for precise type-safe GraphQL schemas" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/scalars">Scalars</a></li><li><a title="Develop and share plugins that are usable with any GraphQL server framework or schema" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/envelop">Envelop</a></li><li><a title="Customizable ESLint parser, plugin, and rule set for GraphQL" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/eslint">GraphQL ESLint</a></li><li><a title="Generate RESTful APIs from your GraphQL server" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/sofa-api">SOFA</a></li></ul></div><div class="flex flex-col gap-[inherit]"><div class="flex flex-col gap-y-3 text-nowrap lg:gap-y-4"><h3 class="font-medium dark:text-white">Developer</h3><ul class="contents"><li><a title="Read the docs" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="/graphql/codegen/docs">Documentation</a></li><li><a title="Check Hive status" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://status.graphql-hive.com/">Hive Status</a></li><li><a title="Read most recent developments from GraphQL Hive" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/hive/product-updates">Hive Updates</a></li><li><a title="Read our blog" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/blog">Blog</a></li></ul></div><div class="flex flex-col gap-y-3 text-nowrap lg:gap-y-4"><h3 class="font-medium dark:text-white">Resources</h3><ul class="contents"><li><a title="Privacy Policy" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/hive/privacy-policy.pdf">Privacy Policy</a></li><li><a title="Terms of Use" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/graphql/hive/terms-of-use.pdf">Terms of Use</a></li></ul></div></div><div class="flex flex-col gap-[inherit]"><div class="flex flex-col gap-y-3 text-nowrap lg:gap-y-4"><h3 class="font-medium dark:text-white">Company</h3><ul class="contents"><li><a title="Learn more about us" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/about-us">About</a></li><li><a title="Brand Assets" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/logos">Brand Assets</a></li><li><a title="Newsletter" class="hive-focus -m-2 block rounded p-2 hover:text-blue-700 hover:underline dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://the-guild.dev/newsletter">Newsletter</a></li></ul></div><a href="https://the-guild.dev/graphql/hive#pricing" class="hive-focus -m-2 rounded p-2 font-medium hover:text-blue-700 hover:underline dark:hover:text-blue-100">Pricing</a><a class="hive-focus -m-2 rounded p-2 font-medium hover:text-blue-700 hover:underline dark:hover:text-blue-100" href="https://the-guild.dev/contact">Contact Us</a></div><a href="https://cloudsecurityalliance.org/star/registry/software-products-guild-ltd-the-guild/services/graphql-hive" target="_blank" rel="noreferrer noopener" class="hive-focus w-fit rounded-full focus-visible:outline-none focus-visible:ring-offset-2 focus-visible:ring-offset-[rgb(var(--nextra-bg))] sm:col-start-[-1] lg:col-start-[-2]"><svg fill="#00559a" viewBox="0 0 137.2 137.2" class="size-20 lg:size-[120px] dark:opacity-95"><title>Cloud Security Alliance Star Level One Badge</title><circle cx="68.95" cy="68.63" r="55.63" fill="#fff"></circle><path d="M68.6 0a68.6 68.6 0 1 0 68.6 68.6A68.68 68.68 0 0 0 68.6 0Zm0 120.6a52 52 0 1 1 52-52 52.05 52.05 0 0 1-52 52Z"></path><path d="m114 51.36.24-1.48v-.24a4 4 0 0 1-.21.38l-.88 1.4-.39-1.4a2.27 2.27 0 0 1-.09-.38v.24l-.24 1.48h-.28l.36-2.22h.33l.36 1.33c0 .13.08.31.1.4 0-.09.15-.27.22-.4l.81-1.33h.32l-.37 2.22Zm-2.67-2-.33 2h-.3l.33-2h-.72v-.23h1.73v.23ZM76.54 55.5v-.08ZM29.55 60.08a6.94 6.94 0 0 0 2.25 1.33 28.85 28.85 0 0 0 3.3 1c.71.17 1.29.33 1.75.48a6.69 6.69 0 0 1 1.07.47 1.42 1.42 0 0 1 .53.49.88.88 0 0 1 .09.56 1.35 1.35 0 0 1-.76 1.1 6 6 0 0 1-2.29.31 7.09 7.09 0 0 1-1.59-.19 10.7 10.7 0 0 1-1.67-.5 15.73 15.73 0 0 1-1.56-.7 9.8 9.8 0 0 1-1.28-.8l-3.61 4.76a14.31 14.31 0 0 0 3.88 1.89 15.75 15.75 0 0 0 5 .76 16 16 0 0 0 3.68-.4 9.77 9.77 0 0 0 3-1.25 7.38 7.38 0 0 0 2.19-2.19 8.08 8.08 0 0 0 1.14-3.2 6.61 6.61 0 0 0-.1-2.66 4.05 4.05 0 0 0-1.16-1.93 5.75 5.75 0 0 0-1-.74H28.54a4.1 4.1 0 0 0 1.01 1.41ZM34.38 55a1.44 1.44 0 0 1 .58-1 3.28 3.28 0 0 1 1.87-.38 8.7 8.7 0 0 1 3.08.53 9.28 9.28 0 0 1 1.93 1c.33.22.75.57.75.57l.46-.57L46.24 51a12 12 0 0 0-3.56-1.88 15.72 15.72 0 0 0-4.81-.65 12.35 12.35 0 0 0-3.63.5 9.44 9.44 0 0 0-2.92 1.41 7.5 7.5 0 0 0-2.05 2.19 7.36 7.36 0 0 0-1 2.64h6.08ZM51.95 71h6.07l1.7-12.06h-6.07L51.95 71zM60.36 54.39h6.13l.74-5.29H48.9l-.74 5.29h6.13l-.16 1.11h6.07l.16-1.11zM76.57 55.42v.08H82l-1.42-6.4h-6.15l-3.22 6.4h5.33ZM88.55 71h6l1-7.38H98l2.52 7.38h6.8l-3.21-8.35a8.35 8.35 0 0 0 3.22-2.38 6.88 6.88 0 0 0 .82-1.33h-17.9ZM96.88 54h3.68a2.38 2.38 0 0 1 2 .66 1.77 1.77 0 0 1 .36.8H109a6.75 6.75 0 0 0-.22-2.57 4.56 4.56 0 0 0-1.42-2.2 6.25 6.25 0 0 0-2.53-1.24 14 14 0 0 0-3.44-.39h-9.76l-.9 6.4h6ZM82.74 59H69.47L63.4 71h6.51l1.73-3.81h6.57l.65 3.81h6.57Zm-5.32 2.92.38 3.29-2.37-2-3.13 2L74 62l-2.42-1.94h3.29l.47-1.06H77l.18 1h3.3ZM76.58 56.41l-1.24 2.58H77l-.42-2.58z"></path><path d="M11.16 60.63a3.54 3.54 0 0 0 1.05-1.94c.15-.8-.12-1.44-.86-1.57s-1.17.62-1.58 1.46-1 1.78-2.24 1.56A1.94 1.94 0 0 1 6 57.61a4 4 0 0 1 .85-1.87l.94.17a3.75 3.75 0 0 0-1 1.86c-.13.76.11 1.35.8 1.48.85.15 1.13-.62 1.51-1.41s1-1.84 2.32-1.61A2 2 0 0 1 13 58.85a4.23 4.23 0 0 1-.89 1.95ZM8.18 52.18l-.63 2.23-.79-.22 1.49-5.33.79.22-.62 2.23L14.28 53l-.24.87ZM9.23 46.22l.31-.81 7.46-.18-.35.91h-2.08l-1.11 2.9L15 50.5l-.33.86Zm3.62 2.28.89-2.32h-3.37q.68.6 1.38 1.26ZM11.25 41.39l.86-1.66a3.94 3.94 0 0 1 1.2-1.56 1.76 1.76 0 0 1 1.87-.1 1.85 1.85 0 0 1 1 1.54 2.11 2.11 0 0 1-.11.83l3.72-.55-.51 1-3.6.5-.54 1 2.63 1.36-.42.81Zm3.8-.37a2.18 2.18 0 0 0 .35-1.35 1 1 0 0 0-.57-.76 1.09 1.09 0 0 0-1.14.05 3 3 0 0 0-.88 1.2l-.42.8 2.12 1.1ZM15.92 33.22l.52-.74 5 3.54 1.9-2.65.67.47-2.43 3.4ZM19.37 28.57l2.61-3 .62.53-2 2.34 1.58 1.37 1.77-2 .6.51-1.77 2 1.8 1.55 2.07-2.39.62.53-2.67 3.07ZM22.75 24.67l.7-.67 3.73 1.81c.58.27 1.15.55 1.76.86-.27-.62-.52-1.22-.78-1.83L26.6 21l.68-.64 2.82 6.84-.67.64ZM28.44 19.48 31.59 17l.51.65-2.44 1.88 1.28 1.67 2.14-1.66.48.63-2.14 1.65 1.45 1.88 2.51-1.93.5.65L32.66 25ZM33.12 16l.77-.49 3.26 5.14 2.75-1.75.44.69-3.52 2.23ZM43.29 10.32a3.48 3.48 0 0 1 4.64 1.86 3.51 3.51 0 1 1-4.64-1.86Zm2.5 5.75a2.6 2.6 0 0 0 1.31-3.52 2.61 2.61 0 1 0-4.78 2.07 2.61 2.61 0 0 0 3.47 1.45ZM50.33 15l-1.89-6.63.83-.23L53.1 11q.8.6 1.59 1.23c-.18-.57-.38-1.24-.56-1.89L53.2 7l.8-.22 1.89 6.65-.82.24-3.84-2.91c-.52-.39-1.06-.81-1.58-1.22l.56 1.89 1 3.34ZM56.24 6.35l3.93-.66.14.81-3 .51.34 2.07 2.67-.44.13.78-2.66.44.39 2.35 3.12-.52.14.8-4 .68ZM62.17 8.24a.62.62 0 1 1 .68.56.62.62 0 0 1-.68-.56Zm.9 3a.62.62 0 0 1 .68.56.62.62 0 0 1-1.24.12.62.62 0 0 1 .56-.71ZM67.49 10.63a3.67 3.67 0 0 0 2.08.74c.82 0 1.4-.35 1.42-1.11s-.8-1-1.7-1.32-1.91-.71-1.89-2 .92-1.91 2.27-1.89a3.9 3.9 0 0 1 2 .55v1a3.7 3.7 0 0 0-2-.67c-.77 0-1.32.31-1.33 1 0 .86.79 1 1.62 1.27 1 .3 2 .71 2 2s-.95 2-2.34 2a4.43 4.43 0 0 1-2.07-.58ZM73.71 5.35l4 .43-.09.82-3.07-.34-.23 2.09 2.69.3-.09.78-2.68-.29L74 11.5l3.15.35-.09.81-4.06-.44ZM79.51 6.08l.89.18-1.22 6 3.2.65-.16.81-4.09-.84ZM85.17 7.33l3.91 1.18-.23.79-3-.92-.64 2.14 2.68.81-.23.75-2.68-.8-.98 2.93-.83-.21ZM89.37 11.91l2.12.83-.28.71-2.12-.82ZM95.88 11.32l.78.38-.44 7.46-.88-.42.15-2.07-2.8-1.36-1.55 1.39-.83-.4Zm-2.56 3.41 2.23 1.09.12-1.54c0-.59.09-1.23.15-1.82l-1.36 1.27ZM97.43 18.28a3.75 3.75 0 0 0 1.4 1.72c.7.43 1.39.42 1.79-.22s-.14-1.31-.77-2-1.27-1.59-.6-2.66a1.93 1.93 0 0 1 2.91-.45 3.85 3.85 0 0 1 1.41 1.48l-.5.81a3.69 3.69 0 0 0-1.36-1.6c-.66-.41-1.3-.41-1.67.19s.15 1.27.73 1.92 1.34 1.64.64 2.75a2 2 0 0 1-3 .48 4.19 4.19 0 0 1-1.48-1.56ZM102 21.21a3.62 3.62 0 0 0 1.26 1.79c.65.5 1.34.55 1.8-.05s0-1.31-.58-2.07-1.12-1.7-.35-2.7a1.94 1.94 0 0 1 2.94-.18 3.93 3.93 0 0 1 1.26 1.62l-.57.75a3.74 3.74 0 0 0-1.21-1.72c-.61-.47-1.25-.53-1.68 0s0 1.28.56 2 1.17 1.75.37 2.8a2 2 0 0 1-3 .19 4.27 4.27 0 0 1-1.38-1.64ZM110.16 20.66l2.93 2.69-.55.61-2.27-2.09-1.42 1.55 2 1.82-.54.59-2-1.83-1.61 1.75 2.3 2.14-.56.6-3-2.75ZM110.21 28.21a3.65 3.65 0 0 0 .87 2c.55.61 1.22.79 1.78.28s.23-1.29-.19-2.14-.78-1.88.15-2.72a2 2 0 0 1 2.93.36 3.85 3.85 0 0 1 1 1.82l-.71.64a3.65 3.65 0 0 0-.87-1.91c-.52-.58-1.13-.76-1.65-.28s-.21 1.26.18 2c.46.94.82 1.94-.15 2.83a2 2 0 0 1-3-.37 4.43 4.43 0 0 1-1-1.91ZM113.81 32.29a3.64 3.64 0 0 0 .68 2.09c.49.66 1.14.9 1.74.45s.35-1.27 0-2.15-.61-1.94.4-2.69a1.93 1.93 0 0 1 2.88.63 3.93 3.93 0 0 1 .78 1.9l-.77.57a3.69 3.69 0 0 0-.68-2c-.47-.62-1.06-.85-1.63-.43s-.32 1.24 0 2.06c.37 1 .64 2-.41 2.79a2 2 0 0 1-3-.65 4.12 4.12 0 0 1-.8-2ZM120.33 37.06c.23-.5.47-1 .72-1.49-.35.22-.8.49-1.29.77l-3.37 2-.44-.76 6-3.46.43.76-1.81 3.88 4.27.37.43.75-6 3.46-.46-.79 3.38-1.94c.48-.29.94-.54 1.3-.74-.55 0-1.1-.07-1.64-.12l-2.63-.23ZM126.18 41.89l1.58 3.67-.76.32-1.22-2.83-1.93.83 1.07 2.48-.73.31-1.06-2.48-2.19.94 1.25 2.87-.75.33-1.61-3.75ZM121.85 49.38l6.6-2 .25.82-2.82 3.88c-.39.54-.79 1.08-1.2 1.61.57-.18 1.23-.4 1.87-.59l3.32-1 .26.84-6.61 2-.25-.82 2.83-3.88c.38-.54.79-1.08 1.19-1.61-.57.19-1.24.4-1.87.59l-3.33 1ZM130.13 57l-.41-2.28.81-.14 1 5.45-.8.15-.42-2.28-6 1.08-.16-.9ZM6.73 79a3.62 3.62 0 0 0-.28 2.19c.16.81.64 1.3 1.38 1.15s.86-1 .93-1.94.29-2 1.52-2.26 2.07.49 2.33 1.81a3.82 3.82 0 0 1-.11 2l-.93.19a3.8 3.8 0 0 0 .23-2.09c-.16-.76-.59-1.22-1.28-1.08s-.83 1-.89 1.85c-.09 1-.28 2.09-1.57 2.35a2 2 0 0 1-2.42-1.86 4.14 4.14 0 0 1 .12-2.15ZM13.22 83.21 14.36 87l-.78.24-.88-3-2 .6.78 2.59-.76.23-.77-2.59-2.28.68.91 3-.79.23-1.16-3.9ZM16 91a4.15 4.15 0 0 1 .29 2l-.92.38a3.35 3.35 0 0 0-.15-2.06 2.63 2.63 0 0 0-3.54-1.44 2.64 2.64 0 0 0-1.46 3.58A3.09 3.09 0 0 0 11.65 95l-.93.39a3.92 3.92 0 0 1-1.26-1.68A3.47 3.47 0 0 1 11.35 89 3.49 3.49 0 0 1 16 91ZM13.92 95.55l3.19-1.77.44.79-3.11 1.72a3.8 3.8 0 0 0-1.44 1.1 1.68 1.68 0 0 0 .06 1.83 1.67 1.67 0 0 0 1.51 1 3.66 3.66 0 0 0 1.65-.62l3.15-1.73.42.77-3.1 1.71a4.26 4.26 0 0 1-2.31.75 2.7 2.7 0 0 1-2.07-1.52 2.65 2.65 0 0 1-.18-2.55 4.17 4.17 0 0 1 1.79-1.48ZM20.5 99.7l1.08 1.53a3.83 3.83 0 0 1 .83 1.77 1.74 1.74 0 0 1-.76 1.71 1.83 1.83 0 0 1-1.84.21 2 2 0 0 1-.69-.48L17.91 108l-.64-.89 1.2-3.43-.67-1-2.42 1.71-.52-.74Zm-1.42 3.55a2.14 2.14 0 0 0 1 .92 1 1 0 0 0 .94-.16 1.07 1.07 0 0 0 .48-1 3 3 0 0 0-.67-1.34l-.52-.74-2 1.38ZM24.08 104.57l.58.7-5.34 4.38-.57-.7ZM26.17 108.22l-1.6-1.69.6-.56L29 110l-.59.57-1.6-1.69-4.42 4.19-.62-.66ZM28.65 114.72l.43-4.61.8.69-.2 2c-.06.52-.11 1-.18 1.58l1.54-.42 2-.52.77.66-4.46 1.15-2 2.38-.69-.59ZM36.83 117.19l-1.95-1.26.45-.69 4.66 3-.44.69-1.95-1.26-3.31 5.12-.76-.49ZM40.67 118.61l1.67.85a3.81 3.81 0 0 1 1.56 1.18 1.72 1.72 0 0 1 .1 1.86 1.8 1.8 0 0 1-1.52 1 2.18 2.18 0 0 1-.84-.1l.6 3.72-1-.5-.54-3.6-1.05-.53-1.34 2.64-.81-.41Zm.4 3.8a2.09 2.09 0 0 0 1.35.33 1 1 0 0 0 .76-.58 1.07 1.07 0 0 0-.06-1.13 3 3 0 0 0-1.22-.87l-.79-.41-1.11 2.13ZM44.64 124.66l1.28-3.43.85.32-1.24 3.34a3.94 3.94 0 0 0-.38 1.76A1.69 1.69 0 0 0 46.4 128a1.66 1.66 0 0 0 1.81-.21 3.69 3.69 0 0 0 .85-1.54l1.26-3.37.83.3-1.25 3.33a4.21 4.21 0 0 1-1.26 2.07 3 3 0 0 1-4.37-1.58 4.23 4.23 0 0 1 .37-2.34ZM50.81 128.78a3.53 3.53 0 0 0 1.84 1.22c.8.21 1.45 0 1.64-.74s-.52-1.26-1.29-1.69-1.69-1.14-1.37-2.36a1.93 1.93 0 0 1 2.64-1.3 3.75 3.75 0 0 1 1.79 1l-.24.92a3.57 3.57 0 0 0-1.82-1.12c-.75-.2-1.36 0-1.54.67-.22.83.52 1.17 1.28 1.61s1.75 1.17 1.42 2.44a2 2 0 0 1-2.73 1.36 4.29 4.29 0 0 1-1.88-1ZM59 125.85l-2.29-.36.13-.81 5.48.87-.13.81-2.32-.36-1 6-.89-.14ZM67.44 125.82h.87l2.74 7h-1l-.74-1.94-3.11-.05-.81 1.91h-.93Zm-.88 4.18H69l-.54-1.44c-.22-.55-.43-1.15-.64-1.72-.22.56-.46 1.14-.71 1.73ZM72.09 131.24a3.53 3.53 0 0 0 2.14.52c.82-.07 1.37-.49 1.3-1.24s-.9-1-1.83-1.14-2-.51-2.08-1.76.72-2 2.06-2.12a3.9 3.9 0 0 1 2 .34l.08 1a3.7 3.7 0 0 0-2-.46c-.77.07-1.28.45-1.22 1.15.08.86.89.93 1.75 1.09 1 .2 2 .51 2.16 1.82s-.75 2.08-2.13 2.2a4.26 4.26 0 0 1-2.12-.36ZM77.76 130.68a3.62 3.62 0 0 0 2.18.32c.81-.15 1.32-.61 1.18-1.36s-1-.88-1.92-1-2-.32-2.23-1.56.53-2 1.86-2.29a3.83 3.83 0 0 1 2 .15l.17.94a3.63 3.63 0 0 0-2.08-.27c-.77.13-1.24.56-1.12 1.25.16.85 1 .85 1.84.93 1 .1 2.08.32 2.32 1.62s-.56 2.13-1.92 2.38a4.23 4.23 0 0 1-2.14-.17ZM83 127.84l-1-3.51.87-.25 1 3.41a4 4 0 0 0 .76 1.64 1.72 1.72 0 0 0 1.81.34 1.67 1.67 0 0 0 1.32-1.25 3.73 3.73 0 0 0-.24-1.75l-1-3.45.84-.25 1 3.41a4.28 4.28 0 0 1 .23 2.41 3.06 3.06 0 0 1-4.47 1.31 4.2 4.2 0 0 1-1.12-2.06ZM88.5 122.32l1.73-.72a3.9 3.9 0 0 1 1.91-.42 1.74 1.74 0 0 1 1.5 1.12 1.83 1.83 0 0 1-.19 1.84 2.41 2.41 0 0 1-.62.57l3.21 2-1 .42-3.09-1.91-1.08.45 1.13 2.68-.84.35Zm3.16 2.16a2.18 2.18 0 0 0 1.13-.81 1 1 0 0 0 0-1 1 1 0 0 0-.89-.69 3.09 3.09 0 0 0-1.46.36l-.83.34.92 2.2ZM95.85 119l.76-.42 5.84 4.66-.86.47-1.6-1.31-2.72 1.5.24 2.07-.81.44Zm1.31 4 2.17-1.2-1.18-1c-.46-.38-1-.79-1.4-1.18.09.6.17 1.22.24 1.85ZM103.62 122.42l-4-5.61.7-.5 4.58 1.43c.64.19 1.28.4 1.91.61-.35-.48-.77-1-1.16-1.59l-2-2.82.72-.51 4 5.61-.7.5-4.59-1.42c-.63-.2-1.27-.4-1.91-.62.36.48.78 1 1.17 1.59l2 2.82ZM107.64 110.32a4 4 0 0 1 1.76-.95l.67.73a3.34 3.34 0 0 0-1.87.84 2.72 2.72 0 1 0 3.71 4 3 3 0 0 0 1-1.85l.68.74a3.88 3.88 0 0 1-1.15 1.76 3.55 3.55 0 1 1-4.8-5.24ZM109.92 108.24l2.67-3 .61.55-2.06 2.29 1.56 1.4 1.8-2 .59.53-1.8 2 1.77 1.59 2.11-2.35.61.54-2.72 3ZM120 99.76l1.65 2.1 2.18-.42-.6.9-1.14.22a2.37 2.37 0 0 1-.38 2.22 2 2 0 0 1-3.71-1.15v-.26h-.3a2 2 0 0 1-1.58-.22 1.77 1.77 0 0 1 2-2.92 1.83 1.83 0 0 1 .74 1.63v.47l1.89-.36-1.24-1.55Zm-2.34 2.87.42-.08V102a1.13 1.13 0 0 0-.44-1 .84.84 0 0 0-1.21.29.83.83 0 0 0 .2 1.2 1.29 1.29 0 0 0 .99.14Zm3.57.13-2.43.47v.42a1.21 1.21 0 0 0 2.32.69 1.47 1.47 0 0 0 .07-1.58ZM119.35 95.18l.8-1.69a3.83 3.83 0 0 1 1.14-1.59 1.74 1.74 0 0 1 1.86-.17 1.83 1.83 0 0 1 1.09 1.49 2.17 2.17 0 0 1-.08.84l3.7-.69-.47 1-3.58.63-.5 1.07 2.69 1.25-.39.82Zm3.79-.5a2.19 2.19 0 0 0 .29-1.36 1 1 0 0 0-.6-.74 1.05 1.05 0 0 0-1.13.09 3.06 3.06 0 0 0-.84 1.24l-.38.81 2.15 1ZM121.83 89.68l.32-.85 6.44 2.5-.32.85ZM127.85 89.29a3.65 3.65 0 0 0 1.3-1.78c.24-.78.06-1.45-.66-1.68s-1.24.47-1.75 1.26-1.22 1.63-2.42 1.25a1.94 1.94 0 0 1-1.18-2.7 3.86 3.86 0 0 1 1.08-1.74l.92.28a3.62 3.62 0 0 0-1.21 1.73c-.23.73-.07 1.35.6 1.56s1.2-.47 1.67-1.2 1.25-1.7 2.51-1.3a2 2 0 0 1 1.22 2.79 4.24 4.24 0 0 1-1.13 1.83ZM124.17 82.53l.19-.89 3.06.64-2.42-3.61.23-1.1 2.5 3.69 4.27-2.54-.24 1.16-4.15 2.43 3.49.73-.19.88Z" fill="#fff"></path><path d="M26.34 76.14h1.49v10h5.38v1.35h-6.87ZM35.1 76.14h6.58v1.35h-5.09V81h4.46v1.3h-4.46v3.92h5.23v1.35H35.1ZM42.73 76.14h1.6l2.43 6.39 1.11 3c.38-1 .76-2 1.15-3.07l2.44-6.34H53l-4.36 11.41h-1.52ZM54.53 76.14h6.57v1.35H56V81h4.45v1.3H56v3.92h5.23v1.35h-6.7ZM63.35 76.14h1.5v10h5.38v1.35h-6.88ZM81.22 76a5.87 5.87 0 1 1-5.79 5.87A5.72 5.72 0 0 1 81.22 76Zm0 10.35a4.49 4.49 0 1 0-4.29-4.48 4.3 4.3 0 0 0 4.29 4.45ZM89.07 87.53V76.14h1.42l4.77 6.33c.66.86 1.32 1.76 2 2.66v-8.99h1.45v11.39h-1.46l-4.76-6.32c-.66-.87-1.32-1.76-2-2.66v8.96ZM101.38 76.14H108v1.35h-5.08V81h4.45v1.3h-4.45v3.92h5.22v1.35h-6.71Z"></path></svg></a></div><div class="col-span-full flex flex-row flex-wrap justify-between gap-x-[inherit] gap-y-8 lg:w-full lg:pb-2 lg:pt-8"><div class="flex gap-6 lg:order-1"><a title="Check our GitHub account" class="hive-focus -m-1 rounded-md p-1 hover:text-blue-700 dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://github.com/the-guild-org"><svg width="24" height="24" fill="currentColor" viewBox="3 3 18 18" class="h-5 w-auto"><title>GitHub</title><path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path></svg></a><a title="Visit our Twitter" class="hive-focus -m-1 rounded-md p-1 hover:text-blue-700 dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://twitter.com/TheGuildDev"><svg viewBox="0 0 1200 1227" fill="currentColor" class="h-5 w-auto"><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"></path></svg></a><a title="Visit our LinkedIn" class="hive-focus -m-1 rounded-md p-1 hover:text-blue-700 dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://linkedin.com/company/the-guild-software"><svg viewBox="0 0 20 20" fill="currentColor" class="h-5 w-auto"><path d="M13.3337 6.66675C14.6597 6.66675 15.9315 7.19353 16.8692 8.13121C17.8069 9.0689 18.3337 10.3407 18.3337 11.6667V17.5001H15.0003V11.6667C15.0003 11.2247 14.8247 10.8008 14.5122 10.4882C14.1996 10.1757 13.7757 10.0001 13.3337 10.0001C12.8916 10.0001 12.4677 10.1757 12.1551 10.4882C11.8426 10.8008 11.667 11.2247 11.667 11.6667V17.5001H8.33366V11.6667C8.33366 10.3407 8.86044 9.0689 9.79813 8.13121C10.7358 7.19353 12.0076 6.66675 13.3337 6.66675ZM1.66699 7.50008H5.00033V17.5001H1.66699V7.50008Z"></path><path d="M3.33366 5.00008C4.25413 5.00008 5.00033 4.25389 5.00033 3.33341C5.00033 2.41294 4.25413 1.66675 3.33366 1.66675C2.41318 1.66675 1.66699 2.41294 1.66699 3.33341C1.66699 4.25389 2.41318 5.00008 3.33366 5.00008Z"></path></svg></a><a title="Reach us on Discord" class="hive-focus -m-1 rounded-md p-1 hover:text-blue-700 dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://discord.com/invite/xud7bH9"><svg width="24" height="24" fill="currentColor" viewBox="0 5 30.67 23.25" class="h-5 w-auto"><title>Discord</title><path d="M26.0015 6.9529C24.0021 6.03845 21.8787 5.37198 19.6623 5C19.3833 5.48048 19.0733 6.13144 18.8563 6.64292C16.4989 6.30193 14.1585 6.30193 11.8336 6.64292C11.6166 6.13144 11.2911 5.48048 11.0276 5C8.79575 5.37198 6.67235 6.03845 4.6869 6.9529C0.672601 12.8736 -0.41235 18.6548 0.130124 24.3585C2.79599 26.2959 5.36889 27.4739 7.89682 28.2489C8.51679 27.4119 9.07477 26.5129 9.55525 25.5675C8.64079 25.2265 7.77283 24.808 6.93587 24.312C7.15286 24.1571 7.36986 23.9866 7.57135 23.8161C12.6241 26.1255 18.0969 26.1255 23.0876 23.8161C23.3046 23.9866 23.5061 24.1571 23.7231 24.312C22.8861 24.808 22.0182 25.2265 21.1037 25.5675C21.5842 26.5129 22.1422 27.4119 22.7621 28.2489C25.2885 27.4739 27.8769 26.2959 30.5288 24.3585C31.1952 17.7559 29.4733 12.0212 26.0015 6.9529ZM10.2527 20.8402C8.73376 20.8402 7.49382 19.4608 7.49382 17.7714C7.49382 16.082 8.70276 14.7025 10.2527 14.7025C11.7871 14.7025 13.0425 16.082 13.0115 17.7714C13.0115 19.4608 11.7871 20.8402 10.2527 20.8402ZM20.4373 20.8402C18.9183 20.8402 17.6768 19.4608 17.6768 17.7714C17.6768 16.082 18.8873 14.7025 20.4373 14.7025C21.9717 14.7025 23.2271 16.082 23.1961 17.7714C23.1961 19.4608 21.9872 20.8402 20.4373 20.8402Z"></path></svg></a><a title="Watch Our Videos" class="hive-focus -m-1 rounded-md p-1 hover:text-blue-700 dark:hover:text-blue-100 outline-none transition focus-visible:ring" href="https://youtube.com/watch?v=d_GBgH-L5c4&amp;list=PLhCf3AUOg4PgQoY_A6xWDQ70yaNtPYtZd"><svg viewBox="0 0 20 20" fill="currentColor" class="h-5 w-auto"><path d="M9.99967 2.66675C7.20901 2.66675 3.58691 3.36597 3.58691 3.36597L3.5778 3.37638C2.30678 3.57966 1.33301 4.67183 1.33301 6.00008V10.0001V10.0014V14.0001V14.0014C1.33425 14.6357 1.56159 15.2489 1.97421 15.7307C2.38683 16.2125 2.95769 16.5315 3.58431 16.6303L3.58691 16.6342C3.58691 16.6342 7.20901 17.3347 9.99967 17.3347C12.7903 17.3347 16.4124 16.6342 16.4124 16.6342L16.4137 16.6329C17.041 16.5343 17.6126 16.2151 18.0255 15.7327C18.4384 15.2503 18.6657 14.6364 18.6663 14.0014V14.0001V10.0014V10.0001V6.00008C18.6654 5.3655 18.4382 4.75205 18.0256 4.26995C17.6129 3.78786 17.0419 3.46872 16.415 3.36987L16.4124 3.36597C16.4124 3.36597 12.7903 2.66675 9.99967 2.66675ZM7.99967 6.93237L13.333 10.0001L7.99967 13.0678V6.93237Z"></path></svg></a></div><p class="text-sm">© <!-- -->2024<!-- --> The Guild</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="360" height="360" viewBox="0 0 360 360" fill="none" class="pointer-events-none absolute bottom-0 left-0 hidden mix-blend-multiply lg:block dark:opacity-5 dark:mix-blend-normal"><path d="M360 159.793a39.152 39.152 0 00-11.468-27.672l-56.99-56.99-6.673-6.673-56.99-56.99A39.153 39.153 0 00200.207 0H0v75.131h226.157c32.428 0 58.712 26.284 58.712 58.712V360H360V159.793z" fill="url(#paint0_linear_711_2541)"></path><defs><linearGradient id="paint0_linear_711_2541" x1="180" y1="-0.00000786805" x2="180" y2="360" gradientUnits="userSpaceOnUse"><stop stop-color="#C1D3D7"></stop><stop offset="1" stop-color="#86B6C1"></stop></linearGradient></defs></svg></footer></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"__nextra_dynamic_mdx":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nconst title = \"TypeScript Resolvers\";\nconst frontMatter = {};\nfunction useTOC(props) {\n const _components = {\n code: \"code\",\n ..._provideComponents()\n };\n return [{\n value: \"Installation\",\n id: \"installation\",\n depth: 2\n }, {\n value: \"Config API Reference\",\n id: \"config-api-reference\",\n depth: 2\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"useIndexSignature\"\n })\n }),\n id: \"useindexsignature\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"noSchemaStitching\"\n })\n }),\n id: \"noschemastitching\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-1\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"wrapFieldDefinitions\"\n })\n }),\n id: \"wrapfielddefinitions\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"customResolveInfo\"\n })\n }),\n id: \"customresolveinfo\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-2\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"customResolverFn\"\n })\n }),\n id: \"customresolverfn\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-3\",\n depth: 4\n }, {\n value: \"Custom Signature\",\n id: \"custom-signature\",\n depth: 5\n }, {\n value: \"With Graphile\",\n id: \"with-graphile\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"directiveResolverMappings\"\n })\n }),\n id: \"directiveresolvermappings\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-4\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"allowParentTypeOverride\"\n })\n }),\n id: \"allowparenttypeoverride\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-5\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"optionalInfoArgument\"\n })\n }),\n id: \"optionalinfoargument\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-6\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"makeResolverTypeCallable\"\n })\n }),\n id: \"makeresolvertypecallable\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-7\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"addUnderscoreToArgsType\"\n })\n }),\n id: \"addunderscoretoargstype\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-8\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"contextType\"\n })\n }),\n id: \"contexttype\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-9\",\n depth: 4\n }, {\n value: \"Custom Context Type\",\n id: \"custom-context-type\",\n depth: 5\n }, {\n value: \"Custom Context Type by Path\",\n id: \"custom-context-type-by-path\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"fieldContextTypes\"\n })\n }),\n id: \"fieldcontexttypes\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-10\",\n depth: 4\n }, {\n value: \"Custom Field Context Types\",\n id: \"custom-field-context-types\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"rootValueType\"\n })\n }),\n id: \"rootvaluetype\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-11\",\n depth: 4\n }, {\n value: \"Custom RootValue Type\",\n id: \"custom-rootvalue-type\",\n depth: 5\n }, {\n value: \"Custom RootValue Type\",\n id: \"custom-rootvalue-type-1\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"directiveContextTypes\"\n })\n }),\n id: \"directivecontexttypes\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-12\",\n depth: 4\n }, {\n value: \"Directive Context Extender\",\n id: \"directive-context-extender\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"mapperTypeSuffix\"\n })\n }),\n id: \"mappertypesuffix\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-13\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"mappers\"\n })\n }),\n id: \"mappers\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-14\",\n depth: 4\n }, {\n value: \"Custom Context Type\",\n id: \"custom-context-type-1\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"defaultMapper\"\n })\n }),\n id: \"defaultmapper\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-15\",\n depth: 4\n }, {\n value: \"Replace with any\",\n id: \"replace-with-any\",\n depth: 5\n }, {\n value: \"Custom Base Object\",\n id: \"custom-base-object\",\n depth: 5\n }, {\n value: \"Wrap default types with Partial\",\n id: \"wrap-default-types-with-partial\",\n depth: 5\n }, {\n value: _jsxs(_Fragment, {\n children: [\"Allow deep partial with \", _jsx(_components.code, {\n children: \"utility-types\"\n })]\n }),\n id: \"allow-deep-partial-with-utility-types\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"avoidOptionals\"\n })\n }),\n id: \"avoidoptionals\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-16\",\n depth: 4\n }, {\n value: \"Override all definition types\",\n id: \"override-all-definition-types\",\n depth: 5\n }, {\n value: \"Override only specific definition types\",\n id: \"override-only-specific-definition-types\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"showUnusedMappers\"\n })\n }),\n id: \"showunusedmappers\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-17\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"enumValues\"\n })\n }),\n id: \"enumvalues\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"resolverTypeWrapperSignature\"\n })\n }),\n id: \"resolvertypewrappersignature\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"federation\"\n })\n }),\n id: \"federation\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"enumPrefix\"\n })\n }),\n id: \"enumprefix\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-18\",\n depth: 4\n }, {\n value: \"Disable enum prefixes\",\n id: \"disable-enum-prefixes\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"enumSuffix\"\n })\n }),\n id: \"enumsuffix\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-19\",\n depth: 4\n }, {\n value: \"Disable enum suffixes\",\n id: \"disable-enum-suffixes\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"optionalResolveType\"\n })\n }),\n id: \"optionalresolvetype\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"immutableTypes\"\n })\n }),\n id: \"immutabletypes\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"namespacedImportName\"\n })\n }),\n id: \"namespacedimportname\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"resolverTypeSuffix\"\n })\n }),\n id: \"resolvertypesuffix\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"allResolversTypeName\"\n })\n }),\n id: \"allresolverstypename\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"internalResolversPrefix\"\n })\n }),\n id: \"internalresolversprefix\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"generateInternalResolversIfNeeded\"\n })\n }),\n id: \"generateinternalresolversifneeded\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"onlyResolveTypeForInterfaces\"\n })\n }),\n id: \"onlyresolvetypeforinterfaces\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"resolversNonOptionalTypename\"\n })\n }),\n id: \"resolversnonoptionaltypename\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-20\",\n depth: 4\n }, {\n value: \"Enable for all\",\n id: \"enable-for-all\",\n depth: 5\n }, {\n value: \"Enable except for some types\",\n id: \"enable-except-for-some-types\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"avoidCheckingAbstractTypesRecursively\"\n })\n }),\n id: \"avoidcheckingabstracttypesrecursively\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"strictScalars\"\n })\n }),\n id: \"strictscalars\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-21\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"defaultScalarType\"\n })\n }),\n id: \"defaultscalartype\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-22\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"scalars\"\n })\n }),\n id: \"scalars\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-23\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"namingConvention\"\n })\n }),\n id: \"namingconvention\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-24\",\n depth: 4\n }, {\n value: \"Override All Names\",\n id: \"override-all-names\",\n depth: 5\n }, {\n value: \"Upper-case enum values\",\n id: \"upper-case-enum-values\",\n depth: 5\n }, {\n value: \"Keep names as is\",\n id: \"keep-names-as-is\",\n depth: 5\n }, {\n value: \"Remove Underscores\",\n id: \"remove-underscores\",\n depth: 5\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"typesPrefix\"\n })\n }),\n id: \"typesprefix\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-25\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"typesSuffix\"\n })\n }),\n id: \"typessuffix\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-26\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"skipTypename\"\n })\n }),\n id: \"skiptypename\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-27\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"nonOptionalTypename\"\n })\n }),\n id: \"nonoptionaltypename\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-28\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"useTypeImports\"\n })\n }),\n id: \"usetypeimports\",\n depth: 3\n }, {\n value: \"Usage Examples\",\n id: \"usage-examples-29\",\n depth: 4\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"dedupeFragments\"\n })\n }),\n id: \"dedupefragments\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"inlineFragmentTypes\"\n })\n }),\n id: \"inlinefragmenttypes\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"emitLegacyCommonJSImports\"\n })\n }),\n id: \"emitlegacycommonjsimports\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"extractAllFieldsToTypes\"\n })\n }),\n id: \"extractallfieldstotypes\",\n depth: 3\n }, {\n value: _jsx(_Fragment, {\n children: _jsx(_components.code, {\n children: \"printFieldsOnNewLines\"\n })\n }),\n id: \"printfieldsonnewlines\",\n depth: 3\n }];\n}\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n img: \"img\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n }, {$Tabs, Callout} = _components;\n if (!$Tabs) _missingMdxReference(\"$Tabs\", true);\n if (!$Tabs.Tab) _missingMdxReference(\"$Tabs.Tab\", true);\n if (!Callout) _missingMdxReference(\"Callout\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h1, {\n children: \"TypeScript Resolvers\"\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Package name\"\n }), _jsx(_components.th, {\n children: \"Weekly Downloads\"\n }), _jsx(_components.th, {\n children: \"Version\"\n }), _jsx(_components.th, {\n children: \"License\"\n }), _jsx(_components.th, {\n children: \"Updated\"\n })]\n })\n }), _jsx(_components.tbody, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.a, {\n href: \"https://npmjs.com/package/@graphql-codegen/typescript-resolvers\",\n children: _jsx(_components.code, {\n children: \"@graphql-codegen/typescript-resolvers\"\n })\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.img, {\n src: \"https://badgen.net/npm/dw/@graphql-codegen/typescript-resolvers\",\n alt: \"Downloads\",\n title: \"Downloads\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.img, {\n src: \"https://badgen.net/npm/v/@graphql-codegen/typescript-resolvers\",\n alt: \"Version\",\n title: \"Version\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.img, {\n src: \"https://badgen.net/npm/license/@graphql-codegen/typescript-resolvers\",\n alt: \"License\",\n title: \"License\"\n })\n }), _jsx(_components.td, {\n children: \"Nov 22nd, 2024\"\n })]\n })\n })]\n }), \"\\n\", _jsx(_components.h2, {\n id: \"installation\",\n children: \"Installation\"\n }), \"\\n\", _jsxs($Tabs, {\n items: [\"npm\", \"pnpm\", \"yarn\", \"bun\"],\n storageKey: \"selectedPackageManager\",\n children: [_jsx($Tabs.Tab, {\n children: _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"sh\",\n \"data-word-wrap\": \"\",\n \"data-copy\": \"\",\n children: _jsx(_components.code, {\n children: _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \"npm\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" i\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" -D\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" @graphql-codegen/typescript-resolvers\"\n })]\n })\n })\n })\n }), _jsx($Tabs.Tab, {\n children: _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"sh\",\n \"data-word-wrap\": \"\",\n \"data-copy\": \"\",\n children: _jsx(_components.code, {\n children: _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \"pnpm\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" add\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" -D\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" @graphql-codegen/typescript-resolvers\"\n })]\n })\n })\n })\n }), _jsx($Tabs.Tab, {\n children: _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"sh\",\n \"data-word-wrap\": \"\",\n \"data-copy\": \"\",\n children: _jsx(_components.code, {\n children: _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \"yarn\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" add\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" --dev\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" @graphql-codegen/typescript-resolvers\"\n })]\n })\n })\n })\n }), _jsx($Tabs.Tab, {\n children: _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"sh\",\n \"data-word-wrap\": \"\",\n \"data-copy\": \"\",\n children: _jsx(_components.code, {\n children: _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \"bun\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" add\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" --dev\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" @graphql-codegen/typescript-resolvers\"\n })]\n })\n })\n })\n })]\n }), \"\\n\", _jsxs(Callout, {\n type: \"warning\",\n children: [_jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Usage Requirements\"\n }), \"\\nIn order to use this GraphQL Codegen plugin, please make sure that you have GraphQL operations (\", _jsx(_components.code, {\n children: \"query\"\n }), \" / \", _jsx(_components.code, {\n children: \"mutation\"\n }), \" / \", _jsx(_components.code, {\n children: \"subscription\"\n }), \" and \", _jsx(_components.code, {\n children: \"fragment\"\n }), \") set as \", _jsx(_components.code, {\n children: \"documents: …\"\n }), \" in your \", _jsx(_components.code, {\n children: \"codegen.yml\"\n }), \".\"]\n }), _jsxs(_components.p, {\n children: [\"Without loading your GraphQL operations (\", _jsx(_components.code, {\n children: \"query\"\n }), \", \", _jsx(_components.code, {\n children: \"mutation\"\n }), \", \", _jsx(_components.code, {\n children: \"subscription\"\n }), \" and \", _jsx(_components.code, {\n children: \"fragment\"\n }), \"), you won’t see any change in the generated output.\"]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This plugin generates TypeScript signature for \", _jsx(_components.code, {\n children: \"resolve\"\n }), \" functions of your GraphQL API.\\nYou can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers).\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"You can find a blog post explaining the usage of this plugin here: \", _jsx(_components.a, {\n href: \"https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen\",\n children: \"https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen\"\n })]\n }), \"\\n\", _jsx(_components.h2, {\n id: \"config-api-reference\",\n children: \"Config API Reference\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"useindexsignature\",\n children: _jsx(_components.code, {\n children: \"useIndexSignature\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Adds an index signature to any generates resolver.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" useIndexSignature: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"noschemastitching\",\n children: _jsx(_components.code, {\n children: \"noSchemaStitching\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Disables/Enables Schema Stitching support.\\nBy default, the resolver signature does not include the support for schema-stitching.\\nSet to \", _jsx(_components.code, {\n children: \"false\"\n }), \" to enable that.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-1\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" noSchemaStitching: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"wrapfielddefinitions\",\n children: _jsx(_components.code, {\n children: \"wrapFieldDefinitions\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Set to \", _jsx(_components.code, {\n children: \"true\"\n }), \" in order to wrap field definitions with \", _jsx(_components.code, {\n children: \"FieldWrapper\"\n }), \".\\nThis is useful to allow return types such as Promises and functions. Needed for\\ncompatibility with \", _jsx(_components.code, {\n children: \"federation: true\"\n }), \" when\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"customresolveinfo\",\n children: _jsx(_components.code, {\n children: \"customResolveInfo\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"graphql#GraphQLResolveInfo\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"You can provide your custom GraphQLResolveInfo instead of the default one from graphql-js\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-2\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" customResolveInfo: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-types#MyResolveInfo'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"customresolverfn\",\n children: _jsx(_components.code, {\n children: \"customResolverFn\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"(parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) =\u003e Promise\u003cTResult\u003e | TResult\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"You can provide your custom ResolveFn instead the default. It has to be a type that uses the generics \", _jsx(_components.code, {\n children: \"\u003cTResult, TParent, TContext, TArgs\u003e\"\n })]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-3\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-signature\",\n children: \"Custom Signature\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" customResolverFn: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-types#MyResolveFn'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"with-graphile\",\n children: \"With Graphile\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" customResolverFn: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-types#MyResolveFn'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"path/to/file.ts\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"plugins\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": [\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"add\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"content\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"\\\"import { GraphileHelpers } from 'graphile-utils/node8plus/fieldHelpers';\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"typescript\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"typescript-resolvers\\\"\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" ],\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"config\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" \\\"customResolverFn\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"\\\"(\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" parent: TParent,\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" args: TArgs,\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" context: TContext,\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" info: GraphQLResolveInfo \u0026 { graphile: GraphileHelpers\u003cTParent\u003e }\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \") =\u003e Promise\u003cTResult\u003e | TResult;\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"\\\\n\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"directiveresolvermappings\",\n children: _jsx(_components.code, {\n children: \"directiveResolverMappings\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"Record\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Map the usage of a directive into using a specific resolver.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-4\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" customResolverFn: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'../resolver-types.ts#UnauthenticatedResolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" directiveResolverMappings: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" authenticated: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'../resolvers-types.ts#AuthenticatedResolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"allowparenttypeoverride\",\n children: _jsx(_components.code, {\n children: \"allowParentTypeOverride\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to override the \", _jsx(_components.code, {\n children: \"ParentType\"\n }), \" generic in each resolver, by avoid enforcing the base type of the generated generic type.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This will generate \", _jsx(_components.code, {\n children: \"ParentType = Type\"\n }), \" instead of \", _jsx(_components.code, {\n children: \"ParentType extends Type = Type\"\n }), \" in each resolver.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-5\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" allowParentTypeOverride: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"optionalinfoargument\",\n children: _jsx(_components.code, {\n children: \"optionalInfoArgument\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sets \", _jsx(_components.code, {\n children: \"info\"\n }), \" argument of resolver function to be optional field. Useful for testing.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-6\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" optionalInfoArgument: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"makeresolvertypecallable\",\n children: _jsx(_components.code, {\n children: \"makeResolverTypeCallable\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Set to \", _jsx(_components.code, {\n children: \"true\"\n }), \" in order to allow the Resolver type to be callable\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-7\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file.ts'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolvers'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" makeResolverTypeCallable: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"addunderscoretoargstype\",\n children: _jsx(_components.code, {\n children: \"addUnderscoreToArgsType\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Adds \", _jsx(_components.code, {\n children: \"_\"\n }), \" to generated \", _jsx(_components.code, {\n children: \"Args\"\n }), \" types in order to avoid duplicate identifiers.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-8\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" addUnderscoreToArgsType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"contexttype\",\n children: _jsx(_components.code, {\n children: \"contextType\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this configuration to set a custom type for your \", _jsx(_components.code, {\n children: \"context\"\n }), \", and it will\\naffect all the resolvers, without the need to override it using generics each time.\\nIf you wish to use an external type and import it from another file, you can use \", _jsx(_components.code, {\n children: \"add\"\n }), \" plugin\\nand add the required \", _jsx(_components.code, {\n children: \"import\"\n }), \" statement, or you can use a \", _jsx(_components.code, {\n children: \"module#type\"\n }), \" syntax.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-9\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-context-type\",\n children: \"Custom Context Type\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" contextType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'MyContext'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-context-type-by-path\",\n children: \"Custom Context Type by Path\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Note that the path should be relative to the generated file.\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" contextType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-types#MyContext'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"fieldcontexttypes\",\n children: _jsx(_components.code, {\n children: \"fieldContextTypes\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"Array_1\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this to set a custom type for a specific field \", _jsx(_components.code, {\n children: \"context\"\n }), \".\\nIt will only affect the targeted resolvers.\\nYou can either use \", _jsx(_components.code, {\n children: \"Field.Path#ContextTypeName\"\n }), \" or \", _jsx(_components.code, {\n children: \"Field.Path#ExternalFileName#ContextTypeName\"\n })]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-10\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-field-context-types\",\n children: \"Custom Field Context Types\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" fieldContextTypes: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'MyType.foo#CustomContextType'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'MyType.bar#./my-file#ContextTypeOne'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"]\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"rootvaluetype\",\n children: _jsx(_components.code, {\n children: \"rootValueType\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this configuration to set a custom type for the \", _jsx(_components.code, {\n children: \"rootValue\"\n }), \", and it will\\naffect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time.\\nIf you wish to use an external type and import it from another file, you can use \", _jsx(_components.code, {\n children: \"add\"\n }), \" plugin\\nand add the required \", _jsx(_components.code, {\n children: \"import\"\n }), \" statement, or you can use both \", _jsx(_components.code, {\n children: \"module#type\"\n }), \" or \", _jsx(_components.code, {\n children: \"module#namespace#type\"\n }), \" syntax.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-11\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-rootvalue-type\",\n children: \"Custom RootValue Type\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" rootValueType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'MyRootValue'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-rootvalue-type-1\",\n children: \"Custom RootValue Type\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" rootValueType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-types#MyRootValue'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"directivecontexttypes\",\n children: _jsx(_components.code, {\n children: \"directiveContextTypes\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"Array_1\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this to set a custom type for a specific field \", _jsx(_components.code, {\n children: \"context\"\n }), \" decorated by a directive.\\nIt will only affect the targeted resolvers.\\nYou can either use \", _jsx(_components.code, {\n children: \"Field.Path#ContextTypeName\"\n }), \" or \", _jsx(_components.code, {\n children: \"Field.Path#ExternalFileName#ContextTypeName\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"ContextTypeName should by a generic Type that take the context or field context type as only type parameter.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-12\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"directive-context-extender\",\n children: \"Directive Context Extender\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" directiveContextTypes: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'myCustomDirectiveName#./my-file#CustomContextExtender'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"]\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"mappertypesuffix\",\n children: _jsx(_components.code, {\n children: \"mapperTypeSuffix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Adds a suffix to the imported names to prevent name clashes.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-13\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" mapperTypeSuffix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'Model'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"mappers\",\n children: _jsx(_components.code, {\n children: \"mappers\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"object\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Replaces a GraphQL type usage with a custom type, allowing you to return custom object from\\nyour resolvers.\\nYou can use both \", _jsx(_components.code, {\n children: \"module#type\"\n }), \" and \", _jsx(_components.code, {\n children: \"module#namespace#type\"\n }), \" syntax.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-14\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-context-type-1\",\n children: \"Custom Context Type\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" mappers: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" User: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-models#UserDbObject'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" Book: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-models#Collections'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"defaultmapper\",\n children: _jsx(_components.code, {\n children: \"defaultMapper\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to set the default mapper when it’s not being override by \", _jsx(_components.code, {\n children: \"mappers\"\n }), \" or generics.\\nYou can specify a type name, or specify a string in \", _jsx(_components.code, {\n children: \"module#type\"\n }), \" or \", _jsx(_components.code, {\n children: \"module#namespace#type\"\n }), \" format.\\nThe default value of mappers is the TypeScript type generated by \", _jsx(_components.code, {\n children: \"typescript\"\n }), \" package.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-15\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"replace-with-any\",\n children: \"Replace with any\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultMapper: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'any'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"custom-base-object\",\n children: \"Custom Base Object\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultMapper: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'./my-file#BaseObject'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"wrap-default-types-with-partial\",\n children: \"Wrap default types with Partial\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"You can also specify a custom wrapper for the original type, without overriding the original generated types, use \", _jsx(_components.code, {\n children: \"{T}\"\n }), \" to specify the identifier. (for flow, use \", _jsx(_components.code, {\n children: \"$Shape\u003c{T}\u003e\"\n }), \")\"]\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultMapper: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'Partial\u003c{T}\u003e'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsxs(_components.h5, {\n id: \"allow-deep-partial-with-utility-types\",\n children: [\"Allow deep partial with \", _jsx(_components.code, {\n children: \"utility-types\"\n })]\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", { add: { content: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"\\\"import { DeepPartial } from 'utility-types';\\\"\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" } }],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultMapper: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'DeepPartial\u003c{T}\u003e'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" avoidCheckingAbstractTypesRecursively: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // required if you have complex nested abstract types\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"avoidoptionals\",\n children: _jsx(_components.code, {\n children: \"avoidOptionals\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"AvoidOptionalsConfig | boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This will cause the generator to avoid using optionals (\", _jsx(_components.code, {\n children: \"?\"\n }), \"),\\nso all field resolvers must be implemented in order to avoid compilation errors.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-16\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"override-all-definition-types\",\n children: \"Override all definition types\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" avoidOptionals: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"override-only-specific-definition-types\",\n children: \"Override only specific definition types\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" avoidOptionals: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" field: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" inputValue: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" object: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultValue: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" query: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" mutation: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" subscription: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"showunusedmappers\",\n children: _jsx(_components.code, {\n children: \"showUnusedMappers\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Warns about unused mappers.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-17\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" showUnusedMappers: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"enumvalues\",\n children: _jsx(_components.code, {\n children: \"enumValues\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"EnumValuesMap\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Overrides the default value of enum values declared in your GraphQL schema, supported\\nin this plugin because of the need for integration with \", _jsx(_components.code, {\n children: \"typescript\"\n }), \" package.\\nSee documentation under \", _jsx(_components.code, {\n children: \"typescript\"\n }), \" plugin for more information and examples.\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"resolvertypewrappersignature\",\n children: _jsx(_components.code, {\n children: \"resolverTypeWrapperSignature\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"Promise\u003cT\u003e | T\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to override \", _jsx(_components.code, {\n children: \"resolverTypeWrapper\"\n }), \" definition.\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"federation\",\n children: _jsx(_components.code, {\n children: \"federation\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Supports Apollo Federation\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"enumprefix\",\n children: _jsx(_components.code, {\n children: \"enumPrefix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to disable prefixing for generated enums, works in combination with \", _jsx(_components.code, {\n children: \"typesPrefix\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-18\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"disable-enum-prefixes\",\n children: \"Disable enum prefixes\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typesPrefix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'I'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" enumPrefix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"enumsuffix\",\n children: _jsx(_components.code, {\n children: \"enumSuffix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to disable suffixing for generated enums, works in combination with \", _jsx(_components.code, {\n children: \"typesSuffix\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-19\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"disable-enum-suffixes\",\n children: \"Disable enum suffixes\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typesSuffix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'I'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" enumSuffix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"optionalresolvetype\",\n children: _jsx(_components.code, {\n children: \"optionalResolveType\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sets the \", _jsx(_components.code, {\n children: \"__resolveType\"\n }), \" field as optional field.\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"immutabletypes\",\n children: _jsx(_components.code, {\n children: \"immutableTypes\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Generates immutable types by adding \", _jsx(_components.code, {\n children: \"readonly\"\n }), \" to properties and uses \", _jsx(_components.code, {\n children: \"ReadonlyArray\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"namespacedimportname\",\n children: _jsx(_components.code, {\n children: \"namespacedImportName\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"''\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Prefixes all GraphQL related generated types with that value, as namespaces import.\\nYou can use this feature to allow separation of plugins to different files.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"resolvertypesuffix\",\n children: _jsx(_components.code, {\n children: \"resolverTypeSuffix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"Resolvers\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Suffix we add to each generated type resolver.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"allresolverstypename\",\n children: _jsx(_components.code, {\n children: \"allResolversTypeName\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"Resolvers\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"The type name to use when exporting all resolvers signature as unified type.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"internalresolversprefix\",\n children: _jsx(_components.code, {\n children: \"internalResolversPrefix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"'__'\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Defines the prefix value used for \", _jsx(_components.code, {\n children: \"__resolveType\"\n }), \" and \", _jsx(_components.code, {\n children: \"__isTypeOf\"\n }), \" resolvers.\\nIf you are using \", _jsx(_components.code, {\n children: \"mercurius-js\"\n }), \", please set this field to empty string for better compatibility.\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"generateinternalresolversifneeded\",\n children: _jsx(_components.code, {\n children: \"generateInternalResolversIfNeeded\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"object\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"{ __resolveReference: false }\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If relevant internal resolvers are set to \", _jsx(_components.code, {\n children: \"true\"\n }), \", the resolver type will only be generated if the right conditions are met.\\nEnabling this allows a more correct type generation for the resolvers.\\nFor example:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"__isTypeOf\"\n }), \" is generated for implementing types and union members\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"__resolveReference\"\n }), \" is generated for federation types that have at least one resolvable \", _jsx(_components.code, {\n children: \"@key\"\n }), \" directive\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"onlyresolvetypeforinterfaces\",\n children: _jsx(_components.code, {\n children: \"onlyResolveTypeForInterfaces\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Turning this flag to \", _jsx(_components.code, {\n children: \"true\"\n }), \" will generate resolver signature that has only \", _jsx(_components.code, {\n children: \"resolveType\"\n }), \" for interfaces, forcing developers to write inherited type resolvers in the type itself.\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"resolversnonoptionaltypename\",\n children: _jsx(_components.code, {\n children: \"resolversNonOptionalTypename\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"ResolversNonOptionalTypenameConfig | boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Makes \", _jsx(_components.code, {\n children: \"__typename\"\n }), \" of resolver mappings non-optional without affecting the base types.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-20\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"enable-for-all\",\n children: \"Enable for all\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" resolversNonOptionalTypename: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // or { unionMember: true, interfaceImplementingType: true }\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"enable-except-for-some-types\",\n children: \"Enable except for some types\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" plugins: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'typescript-resolver'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" resolversNonOptionalTypename: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" unionMember: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" interfaceImplementingType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" excludeTypes: [\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'MyType'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"avoidcheckingabstracttypesrecursively\",\n children: _jsx(_components.code, {\n children: \"avoidCheckingAbstractTypesRecursively\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If true, recursively goes through all object type’s fields, checks if they have abstract types and generates expected types correctly.\\nThis may not work for cases where provided default mapper types are also nested e.g. \", _jsx(_components.code, {\n children: \"defaultMapper: DeepPartial\u003c{T}\u003e\"\n }), \" or \", _jsx(_components.code, {\n children: \"defaultMapper: Partial\u003c{T}\u003e\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"strictscalars\",\n children: _jsx(_components.code, {\n children: \"strictScalars\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Makes scalars strict.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If scalars are found in the schema that are not defined in \", _jsx(_components.code, {\n children: \"scalars\"\n }), \"\\nan error will be thrown during codegen.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-21\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" strictScalars: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"defaultscalartype\",\n children: _jsx(_components.code, {\n children: \"defaultScalarType\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"any\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Allows you to override the type that unknown scalars will have.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-22\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" defaultScalarType: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'unknown'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"scalars\",\n children: _jsx(_components.code, {\n children: \"scalars\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"ScalarsMap_1\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Extends or overrides the built-in scalars and custom GraphQL scalars to a custom type.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-23\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" scalars: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" ID: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" input: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'string'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" output: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'string | number'\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" DateTime: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'Date'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" JSON: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'{ [key: string]: any }'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"namingconvention\",\n children: _jsx(_components.code, {\n children: \"namingConvention\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"NamingConvention_1\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"change-case-all#pascalCase\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Allow you to override the naming convention of the output.\\nYou can either override all namings, or specify an object with specific custom naming convention per output.\\nThe format of the converter must be a valid \", _jsx(_components.code, {\n children: \"module#method\"\n }), \".\\nAllowed values for specific output are: \", _jsx(_components.code, {\n children: \"typeNames\"\n }), \", \", _jsx(_components.code, {\n children: \"enumValues\"\n }), \".\\nYou can also use “keep” to keep all GraphQL names as-is.\\nAdditionally, you can set \", _jsx(_components.code, {\n children: \"transformUnderscore\"\n }), \" to \", _jsx(_components.code, {\n children: \"true\"\n }), \" if you want to override the default behavior,\\nwhich is to preserve underscores.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Available case functions in \", _jsx(_components.code, {\n children: \"change-case-all\"\n }), \" are \", _jsx(_components.code, {\n children: \"camelCase\"\n }), \", \", _jsx(_components.code, {\n children: \"capitalCase\"\n }), \", \", _jsx(_components.code, {\n children: \"constantCase\"\n }), \", \", _jsx(_components.code, {\n children: \"dotCase\"\n }), \", \", _jsx(_components.code, {\n children: \"headerCase\"\n }), \", \", _jsx(_components.code, {\n children: \"noCase\"\n }), \", \", _jsx(_components.code, {\n children: \"paramCase\"\n }), \", \", _jsx(_components.code, {\n children: \"pascalCase\"\n }), \", \", _jsx(_components.code, {\n children: \"pathCase\"\n }), \", \", _jsx(_components.code, {\n children: \"sentenceCase\"\n }), \", \", _jsx(_components.code, {\n children: \"snakeCase\"\n }), \", \", _jsx(_components.code, {\n children: \"lowerCase\"\n }), \", \", _jsx(_components.code, {\n children: \"localeLowerCase\"\n }), \", \", _jsx(_components.code, {\n children: \"lowerCaseFirst\"\n }), \", \", _jsx(_components.code, {\n children: \"spongeCase\"\n }), \", \", _jsx(_components.code, {\n children: \"titleCase\"\n }), \", \", _jsx(_components.code, {\n children: \"upperCase\"\n }), \", \", _jsx(_components.code, {\n children: \"localeUpperCase\"\n }), \" and \", _jsx(_components.code, {\n children: \"upperCaseFirst\"\n }), \"\\n\", _jsx(_components.a, {\n href: \"https://github.com/btxtiger/change-case-all\",\n children: \"See more\"\n })]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-24\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.h5, {\n id: \"override-all-names\",\n children: \"Override All Names\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" namingConvention: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'change-case-all#lowerCase'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"upper-case-enum-values\",\n children: \"Upper-case enum values\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" namingConvention: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typeNames: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'change-case-all#pascalCase'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" enumValues: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'change-case-all#upperCase'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"keep-names-as-is\",\n children: \"Keep names as is\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" namingConvention: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'keep'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h5, {\n id: \"remove-underscores\",\n children: \"Remove Underscores\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" namingConvention: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typeNames: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'change-case-all#pascalCase'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" transformUnderscore: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"typesprefix\",\n children: _jsx(_components.code, {\n children: \"typesPrefix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"(empty)\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Prefixes all the generated types.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-25\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typesPrefix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'I'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"typessuffix\",\n children: _jsx(_components.code, {\n children: \"typesSuffix\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"(empty)\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Suffixes all the generated types.\"\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-26\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" typesSuffix: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \"'I'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"skiptypename\",\n children: _jsx(_components.code, {\n children: \"skipTypename\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Does not add \", _jsx(_components.code, {\n children: \"__typename\"\n }), \" to the generated types, unless it was specified in the selection set.\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-27\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" skipTypename: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"nonoptionaltypename\",\n children: _jsx(_components.code, {\n children: \"nonOptionalTypename\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Automatically adds \", _jsx(_components.code, {\n children: \"__typename\"\n }), \" field to the generated types, even when they are not specified\\nin the selection set, and makes it non-optional\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-28\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" nonOptionalTypename: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"usetypeimports\",\n children: _jsx(_components.code, {\n children: \"useTypeImports\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Will use \", _jsx(_components.code, {\n children: \"import type {}\"\n }), \" rather than \", _jsx(_components.code, {\n children: \"import {}\"\n }), \" when importing only types. This gives\\ncompatibility with TypeScript’s “importsNotUsedAsValues”: “error” option\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"usage-examples-29\",\n children: \"Usage Examples\"\n }), \"\\n\", _jsx(_components.pre, {\n tabIndex: \"0\",\n \"data-language\": \"ts\",\n \"data-word-wrap\": \"\",\n \"data-filename\": \"codegen.ts\",\n \"data-copy\": \"\",\n children: _jsxs(_components.code, {\n children: [_jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" import\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" type\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" { CodegenConfig } \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \"from\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" '@graphql-codegen/cli'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: \" \"\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \" config\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6F42C1\",\n \"--shiki-dark\": \"#B392F0\"\n },\n children: \" CodegenConfig\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // ...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" generates: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#032F62\",\n \"--shiki-dark\": \"#9ECBFF\"\n },\n children: \" 'path/to/file'\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#6A737D\",\n \"--shiki-dark\": \"#6A737D\"\n },\n children: \" // plugins...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config: {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" useTypeImports: \"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#005CC5\",\n \"--shiki-dark\": \"#79B8FF\"\n },\n children: \"true\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n children: _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" };\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n children: [_jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" export\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#D73A49\",\n \"--shiki-dark\": \"#F97583\"\n },\n children: \" default\"\n }), _jsx(_components.span, {\n style: {\n \"--shiki-light\": \"#24292E\",\n \"--shiki-dark\": \"#E1E4E8\"\n },\n children: \" config;\"\n })]\n })]\n })\n }), \"\\n\", _jsx(_components.h3, {\n id: \"dedupefragments\",\n children: _jsx(_components.code, {\n children: \"dedupeFragments\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Removes fragment duplicates for reducing data transfer.\\nIt is done by removing sub-fragments imports from fragment definition\\nInstead - all of them are imported to the Operation node.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"inlinefragmenttypes\",\n children: _jsx(_components.code, {\n children: \"inlineFragmentTypes\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"string\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"inline\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Whether fragment types should be inlined into other operations.\\n“inline” is the default behavior and will perform deep inlining fragment types within operation type definitions.\\n“combine” is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\\n“mask” transforms the types for use with fragment masking. Useful when masked types are needed when not using the “client” preset e.g. such as combining it with Apollo Client’s data masking feature.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"emitlegacycommonjsimports\",\n children: _jsx(_components.code, {\n children: \"emitLegacyCommonJSImports\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"true\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Emit legacy common js imports.\\nDefault it will be \", _jsx(_components.code, {\n children: \"true\"\n }), \" this way it ensure that generated code works with \", _jsx(_components.a, {\n href: \"https://github.com/dotansimha/graphql-code-generator/issues/8065\",\n children: \"non-compliant bundlers\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n id: \"extractallfieldstotypes\",\n children: _jsx(_components.code, {\n children: \"extractAllFieldsToTypes\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Extract all field types to their own types, instead of inlining them.\\nThis helps to reduce type duplication, and makes type errors more readable.\\nIt can also significantly reduce the size of the generated code, the generation time,\\nand the typechecking time.\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"printfieldsonnewlines\",\n children: _jsx(_components.code, {\n children: \"printFieldsOnNewLines\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"type: \", _jsx(_components.code, {\n children: \"boolean\"\n }), \"\\ndefault: \", _jsx(_components.code, {\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.p, {\n children: \"If you prefer to have each field in generated types printed on a new line, set this to true.\\nThis can be useful for improving readability of the resulting types,\\nwithout resorting to running tools like Prettier on the output.\"\n })]\n });\n}\nreturn {\n title,\n frontMatter,\n useTOC,\n default: _createMdxContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","__nextra_dynamic_opts":{"frontMatter":{},"title":"TypeScript Resolvers"}},"__N_SSG":true},"page":"/plugins/typescript/typescript-resolvers","query":{},"buildId":"u6ASScd3CT8d7V6lLAcYP","assetPrefix":"/graphql/codegen","isFallback":false,"gsp":true,"scriptLoader":[]}</script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10