2cbf10db78
* upgrade @types/graphql * refactor type definition * remove unused property * update apollo-provider type definition ref: #66504309599ce9d4a31feb8fd5f065d790349c86
17 lines
311 B
TypeScript
17 lines
311 B
TypeScript
import { willPrefetch } from '../index'
|
|
import gql from 'graphql-tag'
|
|
|
|
export default willPrefetch({
|
|
apollo: {
|
|
allPosts: {
|
|
query: gql`query AllPosts {
|
|
allPosts {
|
|
id
|
|
imageUrl
|
|
description
|
|
}
|
|
}`,
|
|
prefetch: true, // Don't forget this
|
|
}
|
|
}
|
|
}) |