Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pothos/packages/plugin-mocks/mod.ts>MocksPlugin

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
class MocksPlugin
extends BasePlugin<Types>
import { MocksPlugin } from "https://deno.land/x/pothos@release-1695766300/packages/plugin-mocks/mod.ts";

Methods

resolveMock(
typename: string,
fieldName: string,
)
subscribeMock(
typename: string,
fieldName: string,
)
wrapResolve(resolver: GraphQLFieldResolver<unknown, Types["Context"], object>, fieldConfig: PothosOutputFieldConfig<Types>): GraphQLFieldResolver<unknown, Types["Context"], object>
wrapSubscribe(subscribe: GraphQLFieldResolver<unknown, Types["Context"], object> | undefined, fieldConfig: PothosOutputFieldConfig<Types>): GraphQLFieldResolver<unknown, Types["Context"], object> | undefined