Fix optimistic effects to work with fragments (#1683)
* Fix optimistic effects to work with fragments * Regenerate
This commit is contained in:
@@ -1016,15 +1016,15 @@ export enum FileFolder {
|
|||||||
WorkspaceLogo = 'WorkspaceLogo'
|
WorkspaceLogo = 'WorkspaceLogo'
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IntFilter = {
|
export type FloatFilter = {
|
||||||
equals?: InputMaybe<Scalars['Int']>;
|
equals?: InputMaybe<Scalars['Float']>;
|
||||||
gt?: InputMaybe<Scalars['Int']>;
|
gt?: InputMaybe<Scalars['Float']>;
|
||||||
gte?: InputMaybe<Scalars['Int']>;
|
gte?: InputMaybe<Scalars['Float']>;
|
||||||
in?: InputMaybe<Array<Scalars['Int']>>;
|
in?: InputMaybe<Array<Scalars['Float']>>;
|
||||||
lt?: InputMaybe<Scalars['Int']>;
|
lt?: InputMaybe<Scalars['Float']>;
|
||||||
lte?: InputMaybe<Scalars['Int']>;
|
lte?: InputMaybe<Scalars['Float']>;
|
||||||
not?: InputMaybe<NestedIntFilter>;
|
not?: InputMaybe<NestedFloatFilter>;
|
||||||
notIn?: InputMaybe<Array<Scalars['Int']>>;
|
notIn?: InputMaybe<Array<Scalars['Float']>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IntNullableFilter = {
|
export type IntNullableFilter = {
|
||||||
@@ -1478,15 +1478,15 @@ export type NestedEnumViewTypeFilter = {
|
|||||||
notIn?: InputMaybe<Array<ViewType>>;
|
notIn?: InputMaybe<Array<ViewType>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NestedIntFilter = {
|
export type NestedFloatFilter = {
|
||||||
equals?: InputMaybe<Scalars['Int']>;
|
equals?: InputMaybe<Scalars['Float']>;
|
||||||
gt?: InputMaybe<Scalars['Int']>;
|
gt?: InputMaybe<Scalars['Float']>;
|
||||||
gte?: InputMaybe<Scalars['Int']>;
|
gte?: InputMaybe<Scalars['Float']>;
|
||||||
in?: InputMaybe<Array<Scalars['Int']>>;
|
in?: InputMaybe<Array<Scalars['Float']>>;
|
||||||
lt?: InputMaybe<Scalars['Int']>;
|
lt?: InputMaybe<Scalars['Float']>;
|
||||||
lte?: InputMaybe<Scalars['Int']>;
|
lte?: InputMaybe<Scalars['Float']>;
|
||||||
not?: InputMaybe<NestedIntFilter>;
|
not?: InputMaybe<NestedFloatFilter>;
|
||||||
notIn?: InputMaybe<Array<Scalars['Int']>>;
|
notIn?: InputMaybe<Array<Scalars['Float']>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NestedIntNullableFilter = {
|
export type NestedIntNullableFilter = {
|
||||||
@@ -2587,7 +2587,7 @@ export type ViewCreateNestedOneWithoutFieldsInput = {
|
|||||||
|
|
||||||
export type ViewField = {
|
export type ViewField = {
|
||||||
__typename?: 'ViewField';
|
__typename?: 'ViewField';
|
||||||
index: Scalars['Int'];
|
index: Scalars['Float'];
|
||||||
isVisible: Scalars['Boolean'];
|
isVisible: Scalars['Boolean'];
|
||||||
key: Scalars['String'];
|
key: Scalars['String'];
|
||||||
name: Scalars['String'];
|
name: Scalars['String'];
|
||||||
@@ -2598,7 +2598,7 @@ export type ViewField = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ViewFieldCreateInput = {
|
export type ViewFieldCreateInput = {
|
||||||
index: Scalars['Int'];
|
index: Scalars['Float'];
|
||||||
isVisible: Scalars['Boolean'];
|
isVisible: Scalars['Boolean'];
|
||||||
key: Scalars['String'];
|
key: Scalars['String'];
|
||||||
name: Scalars['String'];
|
name: Scalars['String'];
|
||||||
@@ -2608,7 +2608,7 @@ export type ViewFieldCreateInput = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ViewFieldCreateManyInput = {
|
export type ViewFieldCreateManyInput = {
|
||||||
index: Scalars['Int'];
|
index: Scalars['Float'];
|
||||||
isVisible: Scalars['Boolean'];
|
isVisible: Scalars['Boolean'];
|
||||||
key: Scalars['String'];
|
key: Scalars['String'];
|
||||||
name: Scalars['String'];
|
name: Scalars['String'];
|
||||||
@@ -2654,7 +2654,7 @@ export enum ViewFieldScalarFieldEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type ViewFieldUpdateInput = {
|
export type ViewFieldUpdateInput = {
|
||||||
index?: InputMaybe<Scalars['Int']>;
|
index?: InputMaybe<Scalars['Float']>;
|
||||||
isVisible?: InputMaybe<Scalars['Boolean']>;
|
isVisible?: InputMaybe<Scalars['Boolean']>;
|
||||||
key?: InputMaybe<Scalars['String']>;
|
key?: InputMaybe<Scalars['String']>;
|
||||||
name?: InputMaybe<Scalars['String']>;
|
name?: InputMaybe<Scalars['String']>;
|
||||||
@@ -2684,7 +2684,7 @@ export type ViewFieldWhereInput = {
|
|||||||
AND?: InputMaybe<Array<ViewFieldWhereInput>>;
|
AND?: InputMaybe<Array<ViewFieldWhereInput>>;
|
||||||
NOT?: InputMaybe<Array<ViewFieldWhereInput>>;
|
NOT?: InputMaybe<Array<ViewFieldWhereInput>>;
|
||||||
OR?: InputMaybe<Array<ViewFieldWhereInput>>;
|
OR?: InputMaybe<Array<ViewFieldWhereInput>>;
|
||||||
index?: InputMaybe<IntFilter>;
|
index?: InputMaybe<FloatFilter>;
|
||||||
isVisible?: InputMaybe<BoolFilter>;
|
isVisible?: InputMaybe<BoolFilter>;
|
||||||
key?: InputMaybe<StringFilter>;
|
key?: InputMaybe<StringFilter>;
|
||||||
name?: InputMaybe<StringFilter>;
|
name?: InputMaybe<StringFilter>;
|
||||||
@@ -3318,9 +3318,9 @@ export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typ
|
|||||||
|
|
||||||
export type BaseCompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number };
|
export type BaseCompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number };
|
||||||
|
|
||||||
export type BaseAccountOwnerFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null };
|
export type BaseAccountOwnerFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null };
|
||||||
|
|
||||||
export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };
|
export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null };
|
||||||
|
|
||||||
export type DeleteManyCompaniesMutationVariables = Exact<{
|
export type DeleteManyCompaniesMutationVariables = Exact<{
|
||||||
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
|
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
|
||||||
@@ -3341,7 +3341,7 @@ export type InsertOneCompanyMutationVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
|
export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null } };
|
||||||
|
|
||||||
export type UpdateOneCompanyMutationVariables = Exact<{
|
export type UpdateOneCompanyMutationVariables = Exact<{
|
||||||
where: CompanyWhereUniqueInput;
|
where: CompanyWhereUniqueInput;
|
||||||
@@ -3349,7 +3349,7 @@ export type UpdateOneCompanyMutationVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };
|
export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null } | null };
|
||||||
|
|
||||||
export type GetCompaniesQueryVariables = Exact<{
|
export type GetCompaniesQueryVariables = Exact<{
|
||||||
orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
|
orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
|
||||||
@@ -3357,14 +3357,14 @@ export type GetCompaniesQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', firstName?: string | null, lastName?: string | null, id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
|
export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null }> };
|
||||||
|
|
||||||
export type GetCompanyQueryVariables = Exact<{
|
export type GetCompanyQueryVariables = Exact<{
|
||||||
where: CompanyWhereUniqueInput;
|
where: CompanyWhereUniqueInput;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
|
export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null } };
|
||||||
|
|
||||||
export type DeleteFavoriteMutationVariables = Exact<{
|
export type DeleteFavoriteMutationVariables = Exact<{
|
||||||
where: FavoriteWhereInput;
|
where: FavoriteWhereInput;
|
||||||
@@ -3591,7 +3591,7 @@ export type SearchCompanyQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
|
export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null } | null }> };
|
||||||
|
|
||||||
export type SearchPeopleQueryVariables = Exact<{
|
export type SearchPeopleQueryVariables = Exact<{
|
||||||
where?: InputMaybe<PersonWhereInput>;
|
where?: InputMaybe<PersonWhereInput>;
|
||||||
@@ -3981,6 +3981,8 @@ export const BaseAccountOwnerFragmentFragmentDoc = gql`
|
|||||||
email
|
email
|
||||||
displayName
|
displayName
|
||||||
avatarUrl
|
avatarUrl
|
||||||
|
firstName
|
||||||
|
lastName
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const BaseCompanyFieldsFragmentFragmentDoc = gql`
|
export const BaseCompanyFieldsFragmentFragmentDoc = gql`
|
||||||
@@ -4911,16 +4913,10 @@ export type UpdateOneCompanyMutationOptions = Apollo.BaseMutationOptions<UpdateO
|
|||||||
export const GetCompaniesDocument = gql`
|
export const GetCompaniesDocument = gql`
|
||||||
query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {
|
query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {
|
||||||
companies: findManyCompany(orderBy: $orderBy, where: $where) {
|
companies: findManyCompany(orderBy: $orderBy, where: $where) {
|
||||||
accountOwner {
|
...companyFieldsFragment
|
||||||
...baseAccountOwnerFragment
|
|
||||||
firstName
|
|
||||||
lastName
|
|
||||||
}
|
|
||||||
...baseCompanyFieldsFragment
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${BaseAccountOwnerFragmentFragmentDoc}
|
${CompanyFieldsFragmentFragmentDoc}`;
|
||||||
${BaseCompanyFieldsFragmentFragmentDoc}`;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __useGetCompaniesQuery__
|
* __useGetCompaniesQuery__
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export const BASE_ACCOUNT_OWNER_FRAGMENT = gql`
|
|||||||
email
|
email
|
||||||
displayName
|
displayName
|
||||||
avatarUrl
|
avatarUrl
|
||||||
|
firstName
|
||||||
|
lastName
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
+2
-4
@@ -1,11 +1,9 @@
|
|||||||
import { Company } from '~/generated/graphql';
|
import { Company, GetCompaniesDocument } from '~/generated/graphql';
|
||||||
|
|
||||||
import { GET_COMPANIES } from '../queries/getCompanies';
|
|
||||||
|
|
||||||
export const getCompaniesOptimisticEffectDefinition = {
|
export const getCompaniesOptimisticEffectDefinition = {
|
||||||
key: 'generic-entity-table-data-companies',
|
key: 'generic-entity-table-data-companies',
|
||||||
typename: 'Company',
|
typename: 'Company',
|
||||||
query: GET_COMPANIES,
|
query: GetCompaniesDocument,
|
||||||
resolver: ({
|
resolver: ({
|
||||||
currentData,
|
currentData,
|
||||||
newData,
|
newData,
|
||||||
|
|||||||
@@ -6,12 +6,7 @@ export const GET_COMPANIES = gql`
|
|||||||
$where: CompanyWhereInput
|
$where: CompanyWhereInput
|
||||||
) {
|
) {
|
||||||
companies: findManyCompany(orderBy: $orderBy, where: $where) {
|
companies: findManyCompany(orderBy: $orderBy, where: $where) {
|
||||||
accountOwner {
|
...companyFieldsFragment
|
||||||
...baseAccountOwnerFragment
|
|
||||||
firstName
|
|
||||||
lastName
|
|
||||||
}
|
|
||||||
...baseCompanyFieldsFragment
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
+2
-4
@@ -1,11 +1,9 @@
|
|||||||
import { Person } from '~/generated/graphql';
|
import { GetPeopleDocument, Person } from '~/generated/graphql';
|
||||||
|
|
||||||
import { GET_PEOPLE } from '../queries/getPeople';
|
|
||||||
|
|
||||||
export const getPeopleOptimisticEffectDefinition = {
|
export const getPeopleOptimisticEffectDefinition = {
|
||||||
key: 'generic-entity-table-data-people',
|
key: 'generic-entity-table-data-people',
|
||||||
typename: 'Person',
|
typename: 'Person',
|
||||||
query: GET_PEOPLE,
|
query: GetPeopleDocument,
|
||||||
resolver: ({
|
resolver: ({
|
||||||
currentData,
|
currentData,
|
||||||
newData,
|
newData,
|
||||||
|
|||||||
Reference in New Issue
Block a user