INNER CODE UNIT · TypeScript
ObsidianRouter
open-source-labs/obsidian · src/Obsidian.ts:58
export async function ObsidianRouter<T>({
Router,
path = '/graphql',
typeDefs,
resolvers,
context,
usePlayground = false,
useCache = true, // default to true
redisPort = 6379,
policy = 'allkeys-lru',
maxmemory = '2000mb',
searchTerms = [], // Developer can pass in array of search categories
persistQueries = false, // default to false
hashTableSize = 16, // default to 16
maxQueryDepth = 0,
customIdentifier = ['__typename', '_id'],
mutationTableMap = {}, // Developer passes in object where keys are add mutations and values are arrays of affected tables
}: ObsidianRouterOptions<T>): Promise<T> {