Skip to content

Commit

Permalink
remove edge runtime simplify schema
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeardEth committed Jan 25, 2024
1 parent 240ef5b commit c893d19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions apps/nextjs/src/app/api/graphql/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { createYoga } from "graphql-yoga";

import { schema } from "@realms-world/graphql-server";

export const runtime = "edge";

const { handleRequest } = createYoga({
schema,
graphqlEndpoint: "/api/graphql",
Expand Down
6 changes: 3 additions & 3 deletions packages/graphql-server/src/resolvers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sql } from "drizzle-orm";
import type { InferResolvers } from "garph";
import type { YogaInitialContext } from "graphql-yoga";
import { sql } from "drizzle-orm";

import type { SQL } from "@realms-world/db";
import { and, asc, db, eq, gt, schema } from "@realms-world/db";
Expand Down Expand Up @@ -38,12 +38,12 @@ export const resolvers: Resolvers = {
limit: limit + 1,
where: and(gt(schema.erc721Tokens.token_id, cursor), ...where),
orderBy: asc(schema.erc721Tokens.token_id),
with: {
/*with: {
listings: true,
transfers: {
orderBy: (transfers, { desc }) => [desc(transfers._cursor)],
},
},
},*/
});
},
},
Expand Down
3 changes: 0 additions & 3 deletions packages/graphql-server/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { GarphSchema } from "garph";
import { Range } from "postgres-range";

import { Int8Range } from "@realms-world/db";

export const g = new GarphSchema();

Expand Down

0 comments on commit c893d19

Please sign in to comment.