mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
core: experimental hot reload support
This commit is contained in:
1 parent
632ae27b88
commit
fd7c9cbeb1
26 files changed
+429
-148
No files matched your search
@@ -2,7 +2,7 @@ import { makeExecutableSchema } from '@graphql-tools/schema';
|
||||
import { graphql, GraphQLSchema } from 'graphql';
|
||||
import { resolvers, typeDefs } from 'graphql-scalars';
|
||||
import * as bus from '../service/bus';
|
||||
import { Handler, Route } from '../service/server';
|
||||
import { Handler } from '../service/server';
|
||||
|
||||
const types: Record<string, Record<string, string>> = {};
|
||||
const unions: Record<string, string> = {};
|
||||
@@ -123,8 +123,7 @@ class ApiHandler extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
export function apply() {
|
||||
Route('api', '/api', ApiHandler);
|
||||
export const sideEffect = true;
|
||||
export function apply(ctx) {
|
||||
ctx.Route('api', '/api', ApiHandler);
|
||||
}
|
||||
|
||||
global.Hydro.handler.api = apply;
|
||||
Reference in new issue
Block a user