장재혁

complete API and WEB intergated

...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
10 "start": "next start" 10 "start": "next start"
11 }, 11 },
12 "dependencies": { 12 "dependencies": {
13 - "@graphql-community/shared": "1.0.0",
14 "@apollo/client": "^3.1.3", 13 "@apollo/client": "^3.1.3",
14 + "@graphql-community/shared": "1.0.0",
15 "@graphql-tools/load-files": "6.0.18", 15 "@graphql-tools/load-files": "6.0.18",
16 "@graphql-tools/merge": "6.0.18", 16 "@graphql-tools/merge": "6.0.18",
17 "@graphql-tools/schema": "6.0.18", 17 "@graphql-tools/schema": "6.0.18",
18 + "antd": "^4.16.0",
18 "apollo-server-micro": "^2.16.1", 19 "apollo-server-micro": "^2.16.1",
19 "graphql": "15.3.0", 20 "graphql": "15.3.0",
20 "next": "latest", 21 "next": "latest",
......
1 import { AppProps } from "next/app"; 1 import { AppProps } from "next/app";
2 import { ApolloProvider } from "@apollo/client"; 2 import { ApolloProvider } from "@apollo/client";
3 import { useApollo } from "../lib/apollo"; 3 import { useApollo } from "../lib/apollo";
4 +import "antd/dist/antd.css";
4 5
5 export default function App({ Component, pageProps }: AppProps) { 6 export default function App({ Component, pageProps }: AppProps) {
6 const apolloClient = useApollo(pageProps); 7 const apolloClient = useApollo(pageProps);
......
1 import { GetPostInput, Post } from "@graphql-community/shared"; 1 import { GetPostInput, Post } from "@graphql-community/shared";
2 import { useQuery, gql } from "@apollo/client"; 2 import { useQuery, gql } from "@apollo/client";
3 +import { message } from "antd";
3 4
4 const GET_SOME_POST_QUERY = gql` 5 const GET_SOME_POST_QUERY = gql`
5 query GetSomePosts($getSomePostInput: GetPostInput!) { 6 query GetSomePosts($getSomePostInput: GetPostInput!) {
...@@ -25,7 +26,7 @@ const Index = () => { ...@@ -25,7 +26,7 @@ const Index = () => {
25 26
26 return ( 27 return (
27 <> 28 <>
28 - <div>index </div> 29 + <div onClick={() => message.success("hi")}>index </div>
29 <div>{data?.getSomePosts[0].author}</div> 30 <div>{data?.getSomePosts[0].author}</div>
30 <div>{data?.getSomePosts[0].category}</div> 31 <div>{data?.getSomePosts[0].category}</div>
31 </> 32 </>
......
This diff is collapsed. Click to expand it.