import{_ as o}from"./graphql-playground (1)-C_SWrH2M.js";import{_ as s}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as n,b as r,d as a,e as i,f as l,a as d,r as p,o as h}from"./app-h9l50wZ_.js";const c="/assets/grafik-4-Cy8h69YF.png",u={};function m(g,e){const t=p("RouteLink");return h(),n("div",null,[e[3]||(e[3]=r("h1",{id:"graphql-with-apollo",tabindex:"-1"},[r("a",{class:"header-anchor",href:"#graphql-with-apollo"},[r("span",null,"GraphQL with Apollo")])],-1)),e[4]||(e[4]=r("p",null,"GraphQL is a data query language which provides an alternative to REST and ad-hoc web service architectures. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server.",-1)),r("p",null,[e[1]||(e[1]=a("We have a closer description for the ")),i(t,{to:"/backend/src/graphql/GraphQL-Playground.html"},{default:l(()=>e[0]||(e[0]=[a("GraphQL Playground")])),_:1}),e[2]||(e[2]=a("."))]),e[5]||(e[5]=d('<figure><img src="'+o+'" alt="GraphQL Playground" tabindex="0" loading="lazy"><figcaption>GraphQL Playground</figcaption></figure><h2 id="middleware-keeps-resolvers-clean" tabindex="-1"><a class="header-anchor" href="#middleware-keeps-resolvers-clean"><span>Middleware keeps resolvers clean</span></a></h2><figure><img src="'+c+'" alt="Middleware schema" tabindex="0" loading="lazy"><figcaption>Middleware schema</figcaption></figure><p>A well-organized codebase is key for the ability to maintain and easily introduce changes into an app. Figuring out the right structure for your code remains a continuous challenge - especially as an application grows and more developers are joining a project.</p><p>A common problem in GraphQL servers is that resolvers often get cluttered with business logic, making the entire resolver system harder to understand and maintain.</p><p>GraphQL Middleware uses the <a href="https://dzone.com/articles/understanding-middleware-pattern-in-expressjs" target="_blank" rel="noopener noreferrer"><em>middleware pattern</em></a> (well-known from Express.js) to pull out repetitive code from resolvers and execute it before or after one of your resolvers is invoked. This improves code modularity and keeps your resolvers clean and simple.</p>',6))])}const b=s(u,[["render",m],["__file","graphql.html.vue"]]),k=JSON.parse('{"path":"/backend/graphql.html","title":"GraphQL with Apollo","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Middleware keeps resolvers clean","slug":"middleware-keeps-resolvers-clean","link":"#middleware-keeps-resolvers-clean","children":[]}],"git":{"createdTime":1775351521000,"updatedTime":1775351521000,"contributors":[{"name":"dependabot[bot]","email":"49699333+dependabot[bot]@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":0.62,"words":185},"filePathRelative":"backend/graphql.md","localizedDate":"April 5, 2026","excerpt":"\\n<p>GraphQL is a data query language which provides an alternative to REST and ad-hoc web service architectures. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server.</p>\\n<p>We have a closer description for the <a href=\\"/backend/src/graphql/GraphQL-Playground.html\\" target=\\"_blank\\">GraphQL Playground</a>.</p>"}');export{b as comp,k as data};
