Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edgeql

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgeql - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

dist/app.d.ts
import type { GraphQLSchema } from 'graphql';
import { Context } from './context/context';
import type { ExecutionContext, Environment, Middleware, Handler } from './types';

@@ -9,3 +8,3 @@ export declare class EdgeQL {

fetch: (request: Request, env?: Environment, exeContext?: ExecutionContext) => Promise<Response>;
execute(ctx: Context): Promise<void>;
private execute;
use(fn: Middleware): void;

@@ -12,0 +11,0 @@ handle(schema: GraphQLSchema): void;

@@ -9,4 +9,7 @@ import type { ExecutionContext, Environment } from '../types';

readonly graphql: GraphQLContext;
private _map;
constructor(request: Request, env?: Environment, exeContext?: ExecutionContext);
json(): Response;
set(key: string, value: unknown): void;
get(key: string): any;
}

@@ -13,2 +13,12 @@ import { GraphQLContext } from './graphql';

}
set(key, value) {
this._map ||= {};
this._map[key] = value;
}
get(key) {
if (!this._map) {
return undefined;
}
return this._map[key];
}
}

@@ -8,2 +8,8 @@ import { describe, expect, it } from 'vitest';

});
it('set and get', () => {
const ctx = new Context(new Request('http://localhost'), { Bindings: {}, Variables: {} }, { waitUntil: () => { }, passThroughOnException: () => { } });
ctx.set('k', 'v');
expect(ctx).not.toBe(null);
expect(ctx.get('k')).toBe('v');
});
});
{
"name": "edgeql",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -61,3 +61,3 @@ # EdgeQL

For example if you wanted to track how long it takes for a request to propagate through Koa by adding an `X-Response-Time` header field the middleware would look like the following:
For example if you wanted to track how long it takes for a request to propagate through EdgeQL by adding an `X-Response-Time` header field the middleware would look like the following:

@@ -64,0 +64,0 @@ ```typescript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc