Skip to content

Commit

Permalink
Merge pull request #7 from fanout/subscription-server-api
Browse files Browse the repository at this point in the history
Library API
  • Loading branch information
jkarneges committed May 29, 2019
2 parents 054d42c + eec3c91 commit 5f64aa1
Show file tree
Hide file tree
Showing 25 changed files with 515 additions and 1,380 deletions.
14 changes: 6 additions & 8 deletions src/FanoutGraphqlApolloConfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { PubSub, PubSubEngine } from "apollo-server";
import { Context, gql, SubscriptionServerOptions } from "apollo-server-core";
import { Config as ApolloServerConfig } from "apollo-server-core";
import { Context, SubscriptionServerOptions } from "apollo-server-core";
import { ExpressContext } from "apollo-server-express/dist/ApolloServer";
import { ApolloServerPlugin } from "apollo-server-plugin-base";
import { IResolvers, makeExecutableSchema } from "graphql-tools";
import * as uuidv4 from "uuid/v4";
import { ISimpleTable } from "./SimpleTable";
Expand Down Expand Up @@ -167,11 +165,11 @@ export const FanoutGraphqlApolloConfig = (
return context;
};

const DebugApolloServerPlugin = (): ApolloServerPlugin => ({
requestDidStart(requestContext) {
console.log("requestDidStart");
},
});
// const DebugApolloServerPlugin = (): ApolloServerPlugin => ({
// requestDidStart(requestContext) {
// console.log("requestDidStart");
// },
// });

const schema = makeExecutableSchema({ typeDefs, resolvers });
return {
Expand Down
2 changes: 1 addition & 1 deletion src/FanoutGraphqlAppLambdaCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PubSubEngine } from "apollo-server";
import { APIGatewayProxyEvent } from "aws-lambda";
import * as AWSLambda from "aws-lambda";
import * as awsServerlessExpress from "aws-serverless-express";
import { compose, identity } from "fp-ts/lib/function";
import { compose } from "fp-ts/lib/function";
import { IFanoutGraphqlTables } from "./FanoutGraphqlApolloConfig";
import {
FanoutGraphqlExpressServer,
Expand Down
11 changes: 2 additions & 9 deletions src/FanoutGraphqlAppLambdaCallbackTest.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import * as pulumiAws from "@pulumi/aws";
import * as pulumiAwsx from "@pulumi/awsx";
import {
AsyncTest,
Expect,
FocusTest,
IgnoreTest,
TestFixture,
Timeout,
} from "alsatian";
import { AsyncTest, Expect, TestFixture } from "alsatian";
import { APIGatewayProxyEvent, Handler } from "aws-lambda";
import {
decodeWebSocketEvents,
Expand Down Expand Up @@ -90,7 +83,7 @@ export class FanoutGraphqlAppLambdaCallbackTest {
Expect(result.statusCode).toBe(200);
Expect(typeof result.headers).toBe("object");
const headers = lowerCaseKeys(result.headers);
Expect(result.headers["content-type"]).toBe("text/html");
Expect(headers["content-type"]).toBe("text/html");
});
}
/**
Expand Down

0 comments on commit 5f64aa1

Please sign in to comment.