Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
/**
|
|
*
|
|
* audit/server
|
|
*
|
|
*/
|
|
import { Audit, AuditResult } from './common.mjs';
|
|
/**
|
|
* Options for server audits required to check GraphQL over HTTP spec conformance.
|
|
*
|
|
* @category Audits
|
|
*/
|
|
export interface ServerAuditOptions {
|
|
/**
|
|
* The URL of the GraphQL server for the audit.
|
|
*
|
|
* A function can be also supplied, in this case -
|
|
* every audit will invoke the function to get the URL.
|
|
*/
|
|
url: string | Promise<string> | (() => string | Promise<string>);
|
|
/**
|
|
* The Fetch function to use.
|
|
*
|
|
* For NodeJS environments consider using [`@whatwg-node/fetch`](https://github.com/ardatan/whatwg-node/tree/master/packages/fetch).
|
|
*
|
|
* @default global.fetch
|
|
*/
|
|
fetchFn?: unknown;
|
|
}
|
|
/**
|
|
* List of server audits required to check GraphQL over HTTP spec conformance.
|
|
*
|
|
* @category Audits
|
|
*/
|
|
export declare function serverAudits(opts: ServerAuditOptions): Audit[];
|
|
/**
|
|
* Performs the full list of server audits required for GraphQL over HTTP spec conformance.
|
|
*
|
|
* Please consult the `AuditResult` for more information.
|
|
*
|
|
* @category Audits
|
|
*/
|
|
export declare function auditServer(opts: ServerAuditOptions): Promise<AuditResult[]>;
|