Refactor tests command menu (#1702)
* Fix tests * Refactor tests command menu * Improve tests * Fix optimistic render breaking tests
This commit is contained in:
@ -28,6 +28,8 @@ export const BASE_ACCOUNT_OWNER_FRAGMENT = gql`
|
||||
`;
|
||||
|
||||
export const COMPANY_FIELDS_FRAGMENT = gql`
|
||||
${BASE_COMPANY_FIELDS_FRAGMENT}
|
||||
${BASE_ACCOUNT_OWNER_FRAGMENT}
|
||||
fragment companyFieldsFragment on Company {
|
||||
accountOwner {
|
||||
...baseAccountOwnerFragment
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { Company, GetCompaniesDocument } from '~/generated/graphql';
|
||||
import { Company } from '~/generated/graphql';
|
||||
|
||||
import { GET_COMPANIES } from '../queries/getCompanies';
|
||||
|
||||
export const getCompaniesOptimisticEffectDefinition = {
|
||||
key: 'generic-entity-table-data-companies',
|
||||
typename: 'Company',
|
||||
query: GetCompaniesDocument,
|
||||
query: GET_COMPANIES,
|
||||
resolver: ({
|
||||
currentData,
|
||||
newData,
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
import { COMPANY_FIELDS_FRAGMENT } from '../fragments/companyFieldsFragment';
|
||||
|
||||
export const GET_COMPANIES = gql`
|
||||
${COMPANY_FIELDS_FRAGMENT}
|
||||
query GetCompanies(
|
||||
$orderBy: [CompanyOrderByWithRelationInput!]
|
||||
$where: CompanyWhereInput
|
||||
|
||||
Reference in New Issue
Block a user