import Head from 'next/head'; import React from 'react'; import { GetServerSideProps } from 'next'; import { apiClientGet } from '@/lib/apiClient'; import { ApolloQueryResult, gql } from '@apollo/client'; import Link from 'next/link'; type PageData = { hello:string; } type PageProps = ApolloQueryResult export const getServerSideProps:GetServerSideProps = async () => { const client = await apiClientGet(); const res = await client.query({ query: gql` query { hello } ` }); return { props: res }; }; const HomePage: React.FC = props => { return (
HomePlay, your personal video game library Play Game { props.data?.hello }
); } export default HomePage;