This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HttpException, Injectable } from '@nestjs/common'; | |
| import { ConfigService } from '@nestjs/config'; | |
| import { GqlOptionsFactory } from '@nestjs/graphql'; | |
| import { MercuriusDriverConfig, MercuriusPlugin } from '@nestjs/mercurius'; | |
| import AltairFastify, { | |
| AltairFastifyPluginOptions, | |
| } from 'altair-fastify-plugin'; | |
| import { GraphQLError } from 'graphql'; | |
| import Redis, { RedisOptions } from 'ioredis'; | |
| import mercuriusCache, { MercuriusCacheOptions } from 'mercurius-cache'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loadPackage } from '@nestjs/common/utils/load-package.util'; | |
| import { transformSchema } from '@nestjs/graphql'; | |
| import { BuildFederatedSchemaOptions } from '@nestjs/graphql'; | |
| import { GraphQLSchema, isObjectType, buildASTSchema } from 'graphql'; | |
| import { forEach } from 'lodash'; | |
| export function buildMercuriusFederatedSchema({ | |
| typeDefs, | |
| resolvers, | |
| }: BuildFederatedSchemaOptions) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This is just an example | |
| */ | |
| import { Inject, ParseIntPipe, UseGuards } from '@nestjs/common'; | |
| import { | |
| Args, | |
| Int, | |
| Mutation, | |
| Resolver, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface IEdge<T> { | |
| cursor: string; | |
| node: T; | |
| } | |
| interface IPageInfo { | |
| endCursor: string; | |
| hasNextPage: boolean; | |
| } |