Skip to content

How to build with GraphQL Server? #556

Answered by ije
skorotkiewicz asked this question in General
Discussion options

You must be logged in to vote

use the middleware:

serve({
  plugins: [denoDeploy({ modules }), react({ ssr: true }), unocss(config)],
  middlewares: [
    (req, ctx) => {
        const url = new URL(req.url)
        if (url.pathbame === "/api/ql") return yoga(req)
        ctx.next()
    }
  ],
});

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@skorotkiewicz
Comment options

@ije
Comment options

@skorotkiewicz
Comment options

Answer selected by skorotkiewicz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #555 on May 12, 2023 14:27.