Removing Prisma and Grapql-nestjs-prisma resolvers (#2574)
* Some cleaning * Fix seeds * Fix all sign in, sign up flow and apiKey optimistic rendering * Fix
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import { Company, Favorite, User } from '~/generated/graphql';
|
||||
import { Company } from '@/companies/types/Company';
|
||||
import { Favorite } from '@/favorites/types/Favorite';
|
||||
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
||||
|
||||
import { mockedUsersData } from './users';
|
||||
|
||||
@ -7,7 +9,6 @@ type MockedCompany = Pick<
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'domainName'
|
||||
| '__typename'
|
||||
| 'createdAt'
|
||||
| 'address'
|
||||
| 'employees'
|
||||
@ -15,19 +16,9 @@ type MockedCompany = Pick<
|
||||
| 'xUrl'
|
||||
| 'annualRecurringRevenue'
|
||||
| 'idealCustomerProfile'
|
||||
| '_activityCount'
|
||||
| 'accountOwnerId'
|
||||
> & {
|
||||
accountOwner: Pick<
|
||||
User,
|
||||
| 'id'
|
||||
| 'email'
|
||||
| 'displayName'
|
||||
| 'avatarUrl'
|
||||
| '__typename'
|
||||
| 'firstName'
|
||||
| 'lastName'
|
||||
> | null;
|
||||
accountOwner: Pick<WorkspaceMember, 'id' | 'avatarUrl' | 'name'> | null;
|
||||
Favorite: Pick<Favorite, 'id'> | null;
|
||||
};
|
||||
|
||||
@ -39,23 +30,26 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:08:54.724515+00:00',
|
||||
address: '17 rue de clignancourt',
|
||||
employees: 12,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/airbnb/',
|
||||
xUrl: 'https://twitter.com/airbnb',
|
||||
annualRecurringRevenue: 500000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/airbnb/',
|
||||
label: 'https://www.linkedin.com/company/airbnb/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/airbnb',
|
||||
label: 'https://twitter.com/airbnb',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 5000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: true,
|
||||
_activityCount: 1,
|
||||
Favorite: null,
|
||||
accountOwnerId: mockedUsersData[0].id,
|
||||
accountOwner: {
|
||||
email: 'charles@test.com',
|
||||
displayName: 'Charles Test',
|
||||
firstName: 'Charles',
|
||||
lastName: 'Test',
|
||||
name: {
|
||||
firstName: 'Charles',
|
||||
lastName: 'Test',
|
||||
},
|
||||
avatarUrl: null,
|
||||
id: mockedUsersData[0].id,
|
||||
__typename: 'User',
|
||||
},
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae',
|
||||
@ -64,14 +58,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
address: '',
|
||||
employees: 1,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/aircall/',
|
||||
xUrl: 'https://twitter.com/aircall',
|
||||
annualRecurringRevenue: 50000,
|
||||
accountOwnerId: null,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/aircall/',
|
||||
label: 'https://www.linkedin.com/company/aircall/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/aircall',
|
||||
label: 'https://twitter.com/aircall',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 500000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: false,
|
||||
_activityCount: 1,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: 'a674fa6c-1455-4c57-afaf-dd5dc086361d',
|
||||
@ -80,14 +79,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:10:32.530184+00:00',
|
||||
address: '',
|
||||
employees: 1,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/algolia/',
|
||||
xUrl: 'https://twitter.com/algolia',
|
||||
annualRecurringRevenue: 500000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/algolia/',
|
||||
label: 'https://www.linkedin.com/company/algolia/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/algolia',
|
||||
label: 'https://twitter.com/algolia',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 5000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: true,
|
||||
_activityCount: 1,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
accountOwnerId: null,
|
||||
},
|
||||
{
|
||||
id: 'b1cfd51b-a831-455f-ba07-4e30671e1dc3',
|
||||
@ -96,14 +100,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-03-21T06:30:25.39474+00:00',
|
||||
address: '',
|
||||
employees: 10,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/apple/',
|
||||
xUrl: 'https://twitter.com/apple',
|
||||
annualRecurringRevenue: 5000000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/apple/',
|
||||
label: 'https://www.linkedin.com/company/apple/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/apple',
|
||||
label: 'https://twitter.com/apple',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 1000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: false,
|
||||
_activityCount: 0,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
accountOwnerId: null,
|
||||
},
|
||||
{
|
||||
id: '5c21e19e-e049-4393-8c09-3e3f8fb09ecb',
|
||||
@ -112,14 +121,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:13:29.712485+00:00',
|
||||
address: '10 rue de la Paix',
|
||||
employees: 1,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/qonto/',
|
||||
xUrl: 'https://twitter.com/qonto',
|
||||
annualRecurringRevenue: 500000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/qonto/',
|
||||
label: 'https://www.linkedin.com/company/qonto/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/qonto',
|
||||
label: 'https://twitter.com/qonto',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 5000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: false,
|
||||
_activityCount: 2,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
accountOwnerId: null,
|
||||
},
|
||||
{
|
||||
id: '9d162de6-cfbf-4156-a790-e39854dcd4eb',
|
||||
@ -128,14 +142,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:09:25.656555+00:00',
|
||||
address: '',
|
||||
employees: 1,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/facebook/',
|
||||
xUrl: 'https://twitter.com/facebook',
|
||||
annualRecurringRevenue: 5000000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/facebook/',
|
||||
label: 'https://www.linkedin.com/company/facebook/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/facebook',
|
||||
label: 'https://twitter.com/facebook',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 5000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: true,
|
||||
_activityCount: 13,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
accountOwnerId: null,
|
||||
},
|
||||
{
|
||||
id: '9d162de6-cfbf-4156-a790-e39854dcd4ef',
|
||||
@ -144,14 +163,19 @@ export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
createdAt: '2023-04-26T10:09:25.656555+00:00',
|
||||
address: '',
|
||||
employees: 1,
|
||||
linkedinUrl: 'https://www.linkedin.com/company/sequoia/',
|
||||
xUrl: 'https://twitter.com/sequoia',
|
||||
annualRecurringRevenue: 500000,
|
||||
linkedinUrl: {
|
||||
url: 'https://www.linkedin.com/company/sequoia/',
|
||||
label: 'https://www.linkedin.com/company/sequoia/',
|
||||
},
|
||||
xUrl: {
|
||||
url: 'https://twitter.com/sequoia',
|
||||
label: 'https://twitter.com/sequoia',
|
||||
},
|
||||
annualRecurringRevenue: { amountMicros: 5000000, currencyCode: 'USD' },
|
||||
idealCustomerProfile: true,
|
||||
_activityCount: 1,
|
||||
accountOwner: null,
|
||||
Favorite: null,
|
||||
__typename: 'Company',
|
||||
accountOwnerId: null,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user