@jokio/graphql
Version:
High level, pre-configured, GraphQL Server
26 lines (25 loc) • 956 B
TypeScript
import { GraphQLServer, PubSub } from 'graphql-yoga';
import { GraphQLSchema } from 'graphql';
import { RunProps, Context, SubscriptionEventProps } from './types';
export { Module, Resolvers, Context, RunProps } from './types';
export { RestAPI } from './api';
export declare function devEnv(): void;
export declare function run(props: RunProps): Promise<{
server: GraphQLServer;
engine: any;
pubsub: PubSub;
}>;
declare const _default: {
run: (props: RunProps) => Promise<{
server: GraphQLServer;
engine: any;
pubsub: PubSub;
}>;
devEnv: () => void;
getRemoteSchema: (uri: any) => Promise<GraphQLSchema>;
};
export default _default;
export declare function createSubscriptionEvent<TContext extends Context>({eventName, filter, map}: SubscriptionEventProps<TContext>): {
resolve: (result: any) => any;
subscribe: (rootValue?: any, args?: any, context?: any, info?: any) => AsyncIterator<any>;
};