Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/graphql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */ `
Expand Down
9 changes: 5 additions & 4 deletions src/graphql.ts
Original file line number Diff line number Diff line change
@@ -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,
};
}
6 changes: 3 additions & 3 deletions worker-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
}
Expand Down