
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Bringing GraphQL to the Edge with effortless lightness.
import { EdgeQL } from 'edgeql'
const app = new EdgeQL()
const schema = `
type Query {
hello: String
}
`
app.register(schema, () => 'world')
export default app
import { EdgeQL } from 'edgeql'
import type { Context } from 'edgeql'
import {
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
} from 'graphql'
const app = new EdgeQL()
const helloworld: GraphQLSchema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
helloworld: {
type: GraphQLString,
resolve: (parent: any, args: any, ctx: Context, info: any) => {
return 'helloworld, EdgeQL'
},
},
},
})
})
const clock: GraphQLSchema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
clock: {
type: GraphQLString,
resolve: (parent: any, args: any, ctx: Context, info: any) => {
return new Date().toISOString()
},
},
},
})
})
// register schema
app.register({
schema: helloworld,
})
app.register({
schema: clock,
})
// middleware
app.use(async (ctx: Context, next: Next) => {
const startedAt = new Date()
await next()
const endedAt = new Date()
ctx.res.headers.set('x-response-time', `${endedAt.getTime() - startedAt.getTime()}`)
})
export default app
FAQs
Effortlessly craft GraphQL APIs on the Edge, designed to thrive across various JavaScript runtimes.
The npm package edgeql receives a total of 24 weekly downloads. As such, edgeql popularity was classified as not popular.
We found that edgeql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.