Skip to content

Instantly share code, notes, and snippets.

@janhelleman
janhelleman / nest stitch
Created January 23, 2020 13:23
stitches different graphQL endpoints and if a prefix is given, prefixes it's root queries to avoid collision (i.e. wpCategories if wp is used as prefix)
import { Injectable } from "@nestjs/common";
import { GqlOptionsFactory, GqlModuleOptions } from "@nestjs/graphql";
import {
makeRemoteExecutableSchema,
mergeSchemas,
introspectSchema,
transformSchema,
FilterRootFields,
RenameTypes,
RenameRootFields