artsy / metaphysics

Artsy's GraphQL API
MIT License
360 stars 89 forks source link

refactor(homeView): organize directory structure #6009

Closed anandaroop closed 1 month ago

anandaroop commented 1 month ago

Part 1 of 2, not controversial I hope — just takes our big blob of files and organizes them into folders.

(Part 2 will be a little more drastic, so I'll split that out into a separate PR for discussion)

Before: most things sitting at the rootAfter: resolvers, sections, helpers organized into folders
src/schema/v2/homeView
├── HomeViewComponent.ts
├── HomeViewSection.ts
├── __tests__
│   ├── HomeView.test.ts
│   └── HomeViewSection.test.ts
├── activityResolvers.ts
├── articlesResolvers.ts
├── artistResolvers.ts
├── artworkResolvers.ts
├── auctionResultsResolvers.ts
├── featuredFairsResolver.ts
├── getSectionsForUser.ts
├── heroUnitsResolver.ts
├── index.ts
├── marketingCollectionsResolver.ts
├── salesResolver.ts
├── sections.ts
├── withHomeViewTimeout.ts
└── zones
    ├── __tests__
    └── legacy.ts
src/schema/v2/homeView
├── HomeViewComponent.ts
├── HomeViewSection.ts
├── __tests__
│   ├── HomeView.test.ts
│   └── HomeViewSection.test.ts
├── helpers
│   ├── getSectionsForUser.ts
│   └── withHomeViewTimeout.ts
├── index.ts
├── resolvers
│   ├── activityResolvers.ts
│   ├── articlesResolvers.ts
│   ├── artistResolvers.ts
│   ├── artworkResolvers.ts
│   ├── auctionResultsResolvers.ts
│   ├── featuredFairsResolver.ts
│   ├── heroUnitsResolvers.ts
│   ├── marketingCollectionsResolvers.ts
│   └── salesResolvers.ts
├── sections
│   └── index.ts
└── zones
    ├── __tests__
    └── legacy.ts