Skip to content

Commit

Permalink
fix: useSWRInfinite config maybe ['']
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed May 7, 2024
1 parent 12d5322 commit 12088ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CodegenConfig } from "@graphql-codegen/cli";

const endpoint = process.env.GRAPH_API_ENDPOINT;
const useSWRInfiniteConfig = process.env.CONFIG_USE_SWR_INFINITE || '';
const useSWRInfiniteConfig = process.env.CONFIG_USE_SWR_INFINITE;

const config: CodegenConfig = {
schema: endpoint,
Expand All @@ -21,7 +21,7 @@ const config: CodegenConfig = {
},
config: {
autogenSWRKey: true,
useSWRInfinite: useSWRInfiniteConfig.split(',')
useSWRInfinite: useSWRInfiniteConfig?.split(',')
},
};

Expand Down

0 comments on commit 12088ca

Please sign in to comment.