-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Prefetch links on Artwork screen #11650
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { | ||
Spacer, | ||
Flex, | ||
Screen, | ||
Tabs, | ||
useScreenDimensions, | ||
Separator, | ||
Skeleton, | ||
SkeletonBox, | ||
Flex, | ||
SkeletonText, | ||
Separator, | ||
Spacer, | ||
Tabs, | ||
useScreenDimensions, | ||
} from "@artsy/palette-mobile" | ||
import { ArtistSeriesQuery } from "__generated__/ArtistSeriesQuery.graphql" | ||
import { ArtistSeries_artistSeries$key } from "__generated__/ArtistSeries_artistSeries.graphql" | ||
|
@@ -134,13 +134,7 @@ export const ArtistSeriesQueryRenderer: React.FC<{ artistSeriesID: string }> = ( | |
<ArtworkFiltersStoreProvider> | ||
<QueryRenderer<ArtistSeriesQuery> | ||
environment={getRelayEnvironment()} | ||
query={graphql` | ||
query ArtistSeriesQuery($artistSeriesID: ID!) { | ||
artistSeries(id: $artistSeriesID) { | ||
...ArtistSeries_artistSeries | ||
} | ||
} | ||
`} | ||
query={ArtistSeriesScreenQuery} | ||
cacheConfig={{ force: true }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @olerichter00 I've noticed that here you do not remove |
||
variables={{ | ||
artistSeriesID, | ||
|
@@ -153,3 +147,11 @@ export const ArtistSeriesQueryRenderer: React.FC<{ artistSeriesID: string }> = ( | |
</ArtworkFiltersStoreProvider> | ||
) | ||
} | ||
|
||
export const ArtistSeriesScreenQuery = graphql` | ||
query ArtistSeriesQuery($artistSeriesID: ID!) { | ||
artistSeries(id: $artistSeriesID) { | ||
...ArtistSeries_artistSeries | ||
} | ||
} | ||
` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,20 +69,21 @@ export const ArtistSeriesFullArtistSeriesListFragmentContainer = createFragmentC | |
} | ||
) | ||
|
||
export const ArtistSeriesFullArtistSeriesListScreenQuery = graphql` | ||
query ArtistSeriesFullArtistSeriesListQuery($artistID: String!) { | ||
artist(id: $artistID) { | ||
...ArtistSeriesFullArtistSeriesList_artist | ||
} | ||
} | ||
` | ||
|
||
export const ArtistSeriesFullArtistSeriesListQueryRenderer: React.FC<{ artistID: string }> = ({ | ||
artistID, | ||
}) => { | ||
return ( | ||
<QueryRenderer<ArtistSeriesFullArtistSeriesListQuery> | ||
environment={getRelayEnvironment()} | ||
query={graphql` | ||
query ArtistSeriesFullArtistSeriesListQuery($artistID: String!) { | ||
artist(id: $artistID) { | ||
...ArtistSeriesFullArtistSeriesList_artist | ||
} | ||
} | ||
`} | ||
cacheConfig={{ force: true }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why we had this |
||
query={ArtistSeriesFullArtistSeriesListScreenQuery} | ||
variables={{ | ||
artistID, | ||
}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
took me some time to understand this. I wonder if a comment could be helpful here