diff --git a/src/graphql.test.ts b/src/graphql.test.ts index 6784121..2fe3748 100644 --- a/src/graphql.test.ts +++ b/src/graphql.test.ts @@ -2,12 +2,11 @@ import { buildHTTPExecutor } from '@graphql-tools/executor-http' import { expect, it } from 'bun:test' import { countries } from 'countries-list' import { parse } from 'graphql' - import { yoga } from './graphql' const executor = buildHTTPExecutor({ fetch: yoga.fetch, - endpoint: 'http://yoga/graphql', + endpoint: 'http://yoga/', }) const ListFilteredCountriesQuery = parse(/* GraphQL */ ` diff --git a/src/graphql.ts b/src/graphql.ts index b68aaba..f98d083 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -1,12 +1,13 @@ -import { createYoga } from "graphql-yoga"; +import { createYoga } from 'graphql-yoga' -import { schema } from "./schema"; +import { schema } from './schema' export const yoga = createYoga({ schema, batching: true, -}); + graphqlEndpoint: '/', +}) export default { fetch: yoga.fetch, -}; +} diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index 3abbf67..6bb174c 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -1,9 +1,9 @@ /* eslint-disable */ -// Generated by Wrangler by running `wrangler types` (hash: b739a9c19cff1463949c4db47674ed86) -// Runtime types generated with workerd@1.20260219.0 2026-02-19 nodejs_compat +// Generated by Wrangler by running `wrangler types` (hash: e32b09e4b5ca118f20a449da2115a7dd) +// Runtime types generated with workerd@1.20260219.0 2026-02-19 declare namespace Cloudflare { interface GlobalProps { - mainModule: typeof import("./src/index"); + mainModule: typeof import("./src/graphql"); } interface Env { }