5.1.1 • Published 4 years ago
@types/keystonejs__app-graphql v5.1.1
Installation
npm install --save @types/keystonejs__app-graphql
Summary
This package contains type definitions for @keystonejs/app-graphql (https://github.com/keystonejs/keystone).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keystonejs__app-graphql.
index.d.ts
// Type definitions for @keystonejs/app-graphql 5.1
// Project: https://github.com/keystonejs/keystone
// Definitions by: Kevin Brown <https://github.com/thekevinbrown>
// Timothee Clain <https://github.com/tclain>
// Abhijith Vijayan <https://github.com/abhijithvijayan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
// Because this is a scoped package, without this line Typescript doesn't associate the
// types with the right package.
// tslint:disable-next-line:no-single-declare-module
declare module '@keystonejs/app-graphql' {
import { Keystone } from '@keystonejs/keystone';
import { Express } from 'express';
interface GraphQLValidation {
depthLimit: (limit: number) => any; // TODO: fetch the correct type in apollo server validations
definitionLimit: (limit: number) => any; // TODO: fetch the correct type in apollo server validations
fieldLimit: (limit: number) => any; // TODO: fetch the correct type in apollo server validations
}
interface GraphQLAppOptions {
apiPath?: string | undefined;
graphiqlPath?: string | undefined;
schemaName?: string | undefined;
apollo?: {
validationRules?: [] | undefined;
introspection?: boolean | undefined;
} | undefined;
}
interface PrepareMiddlewareOptions {
keystone: Keystone;
dev?: boolean | undefined;
}
class GraphQLApp {
constructor(opts?: GraphQLAppOptions);
build(): void;
prepareMiddleware(options: PrepareMiddlewareOptions): Express;
}
const validation: GraphQLValidation;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 16:23:12 GMT
- Dependencies: @types/keystonejs__keystone, @types/express
- Global values: none
Credits
These definitions were written by Kevin Brown, Timothee Clain, and Abhijith Vijayan.