From 8f6eaeaf980c637e3ddf19c84772cb449dd0688c Mon Sep 17 00:00:00 2001 From: "Teresa (Terri) Gobble" Date: Thu, 14 Mar 2024 14:31:59 -0500 Subject: [PATCH 1/3] Added multiple queries to interface for FaustTemplate --- packages/faustwp-core/src/getWordPressProps.tsx | 6 ++++++ 1 file changed, 6 insertions(+) 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']; } From e1350566beb7c355f394b6a5c2914ccd44d990cf Mon Sep 17 00:00:00 2001 From: Teresa Gobble Date: Thu, 14 Mar 2024 14:38:52 -0500 Subject: [PATCH 2/3] Create quiet-avocados-turn.md --- .changeset/quiet-avocados-turn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/quiet-avocados-turn.md diff --git a/.changeset/quiet-avocados-turn.md b/.changeset/quiet-avocados-turn.md new file mode 100644 index 000000000..2de8c3a40 --- /dev/null +++ b/.changeset/quiet-avocados-turn.md @@ -0,0 +1,5 @@ +--- +"@faustwp/core": patch +--- + +Added multiple queries to interface for FaustTemplate From 7ac7f21ed0d6a0ec552ba5e492d010a4ab206930 Mon Sep 17 00:00:00 2001 From: Teresa Gobble Date: Fri, 15 Mar 2024 08:30:15 -0500 Subject: [PATCH 3/3] Update .changeset/quiet-avocados-turn.md Co-authored-by: John Parris --- .changeset/quiet-avocados-turn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/quiet-avocados-turn.md b/.changeset/quiet-avocados-turn.md index 2de8c3a40..fad1dcd47 100644 --- a/.changeset/quiet-avocados-turn.md +++ b/.changeset/quiet-avocados-turn.md @@ -2,4 +2,4 @@ "@faustwp/core": patch --- -Added multiple queries to interface for FaustTemplate +Added `queries` property to FaustTemplate interface. Fixes an error when using multiple queries with TypeScript.