Skip to content

Instantly share code, notes, and snippets.

View szaza's full-sized avatar

Zoltán Szabó szaza

View GitHub Profile
@szaza
szaza / index.ts
Last active March 26, 2019 10:35
Workaround for GraphQL schema stitching error swallowing problem.
import "reflect-metadata";
import * as dotenv from "dotenv";
import * as hapi from "hapi";
import { TYPES } from "./common/types";
import { ApolloServer } from "apollo-server-hapi";
import { connectToDB } from "./persistence/persistence-context";
import { RootApi } from "./api/root-api";
import { Logger } from "winston";
import diContainer from "./common/di-container";
import console = require("console");
@szaza
szaza / introspection.ts
Last active March 26, 2019 10:26
Introspection example to resolve GraphQL schema stitching error swallowing.
import fetch from "cross-fetch";
import {
makeRemoteExecutableSchema,
introspectSchema,
mergeSchemas
} from "graphql-tools";
import { createHttpLink } from "apollo-link-http";
import { onError } from "apollo-link-error";
import { GraphQLSchema, GraphQLError } from "graphql";