Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 388 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 388 Bytes

EdgeQL GraphiQL middleware

import type { Context } from 'edgeql'
import { cors } from 'edgeql/cors'
import { graphiql } from 'edgeql/graphiql'
import { NodeEdgeQL } from 'edgeql/node'

const app = new NodeEdgeQL()

app.handle(`
  type Query {
    hello: String!
  }
  `, (ctx: Context) => {
    return `hello world`
  }
)

app.use(graphiql({path: '/playground'}))