/*** UTILITY ------------------------------------------ ***/ // deno-lint-ignore-file no-import-prefix import { executeSchema, gql, GraphQLHTTP } from "jsr:@eol/gq"; const schema = executeSchema({ resolvers: { Query: { hello: (_: unknown, { name }: { name?: string }) => `hello, ${name ?? "world"}` } }, typeDefs: gql`type Query { hello(name: String): String }` }); const handler = GraphQLHTTP({ graphiql: true, playgroundOptions: { title: "Neat GraphQL Server" }, schema }); /*** PROGRAM ------------------------------------------ ***/ Deno.serve({ port: 4000 }, handler); /*** deno run -A /http/path/to/remote-example.ts ***/