-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodegen.ts
More file actions
40 lines (37 loc) · 906 Bytes
/
codegen.ts
File metadata and controls
40 lines (37 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
schema: "schema.graphql",
documents: ["src/**/*.tsx"],
generates: {
"./src/__generated__/": {
preset: "client",
plugins: [],
presetConfig: {
gqlTagName: "gql",
},
},
"./src/__generated__/client.json": {
config: {
output: "client",
algorithm: "sha256",
},
plugins: ["graphql-codegen-persisted-query-ids"],
},
"./server-persisted-operations.json": {
config: {
output: "server",
algorithm: "sha256",
},
plugins: ["graphql-codegen-persisted-query-ids"],
},
},
ignoreNoDocuments: true,
};
export default config;
// new ApolloClient({
// link: ApolloLink.from([
// persistedLink,
// new HttpLink({ uri: "http://localhost:5001" }),
// ]),
// cache: new InMemoryCache(),
// })