UNPKG

@devniel/graphql-query-test-mock

Version:

Mock queries to your GraphQL backend in your Jest tests.

17 lines (13 loc) 404 B
// @flow strict export type Variables = { +[key: string]: mixed }; export type Data = { [key: string]: mixed }; export type Error = { [key: string]: mixed }; export type ServerResponse = { errors?: Array<Error>, data: Data }; export type ServerErrorResponse = { data?: Data; errors: Array<Data>; }; export type NockReturnValue = [number, ServerResponse | ServerErrorResponse];