mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Avoid circular imports
This commit is contained in:
parent
af21934296
commit
18ee5418b6
1 changed files with 0 additions and 19 deletions
|
|
@ -1,8 +1,3 @@
|
|||
import { Router } from "express";
|
||||
import { createYoga, YogaInitialContext } from "graphql-yoga";
|
||||
|
||||
// import DEFAULT_QUERY from "./defaultQuery";
|
||||
import { getSchema } from "./schema";
|
||||
import UserContext from "../../data/UserContext.js";
|
||||
|
||||
/** @gqlContext */
|
||||
|
|
@ -13,17 +8,3 @@ export function getUserContext(ctx: Ctx): UserContext {
|
|||
return ctx.ctx;
|
||||
}
|
||||
|
||||
const router = Router();
|
||||
|
||||
const yoga = createYoga({
|
||||
schema: getSchema(),
|
||||
context: (ctx: YogaInitialContext) => {
|
||||
// @ts-expect-error
|
||||
return ctx.req;
|
||||
},
|
||||
});
|
||||
|
||||
// Bind GraphQL Yoga to the graphql endpoint to avoid rendering the playground on any path
|
||||
router.use("", yoga);
|
||||
|
||||
export default router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue