vega-frontend-monorepo/libs/react-helpers/src/lib/chain-id.mock.ts
Radosław Szpiech 6cb2e3a3cf
chore: move mocks next to graphql queries (#2469)
* chore: move mocks next to graphql queries

* chore: mock functions rework

* chore: clean up
2022-12-23 12:36:25 +01:00

17 lines
391 B
TypeScript

import type { ChainIdQuery } from './__generated__/ChainId';
import merge from 'lodash/merge';
import type { PartialDeep } from 'type-fest';
export const chainIdQuery = (
override?: PartialDeep<ChainIdQuery>
): ChainIdQuery => {
const defaultResult = {
statistics: {
__typename: 'Statistics',
chainId: 'test-id',
},
};
return merge(defaultResult, override);
};