diff --git a/.changeset/quiet-avocados-turn.md b/.changeset/quiet-avocados-turn.md new file mode 100644 index 000000000..fad1dcd47 --- /dev/null +++ b/.changeset/quiet-avocados-turn.md @@ -0,0 +1,5 @@ +--- +"@faustwp/core": patch +--- + +Added `queries` property to FaustTemplate interface. Fixes an error when using multiple queries with TypeScript. diff --git a/packages/faustwp-core/src/getWordPressProps.tsx b/packages/faustwp-core/src/getWordPressProps.tsx index c66ebb730..f4532d1c1 100644 --- a/packages/faustwp-core/src/getWordPressProps.tsx +++ b/packages/faustwp-core/src/getWordPressProps.tsx @@ -52,6 +52,12 @@ export type WordPressTemplate = React.FC & { export interface FaustTemplate extends React.FC> { query?: WordPressTemplate['query']; + queries?: { + query: DocumentNode; + variables?: (...args: QueryVariablesArgs) => { + [key: string]: any; + }; + }[]; variables?: WordPressTemplate['variables']; }