From 13e91d4078c1893ec75eb2cc26befb2de082f86a Mon Sep 17 00:00:00 2001 From: Adrian Pilarczyk Date: Fri, 28 Feb 2025 15:36:43 +0100 Subject: [PATCH 1/3] add refer-to-schema rule --- .cursor/rules/refer-to-schema.mdc | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .cursor/rules/refer-to-schema.mdc diff --git a/.cursor/rules/refer-to-schema.mdc b/.cursor/rules/refer-to-schema.mdc new file mode 100644 index 00000000..84cb5e85 --- /dev/null +++ b/.cursor/rules/refer-to-schema.mdc @@ -0,0 +1,9 @@ +--- +description: Integrating with Saleor API +globs: +alwaysApply: false +--- + +# Verify schema + +Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](mdc:graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API. \ No newline at end of file From db59d2b6f1782e481a3339a3669132aab242538a Mon Sep 17 00:00:00 2001 From: Adrian Pilarczyk Date: Fri, 28 Feb 2025 15:39:17 +0100 Subject: [PATCH 2/3] add copilot instructions --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..1903f6f8 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](../graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API. From c1de6ee70fcbd2a6f43b70dc4dad8e4aac9da45f Mon Sep 17 00:00:00 2001 From: Adrian Pilarczyk Date: Tue, 4 Mar 2025 08:47:13 +0100 Subject: [PATCH 3/3] more --- .cursor/rules/integrating-with-saleor-api.mdc | 17 +++++++++++++++++ .cursor/rules/refer-to-schema.mdc | 9 --------- .github/copilot-instructions.md | 12 ++++++++++++ 3 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 .cursor/rules/integrating-with-saleor-api.mdc delete mode 100644 .cursor/rules/refer-to-schema.mdc diff --git a/.cursor/rules/integrating-with-saleor-api.mdc b/.cursor/rules/integrating-with-saleor-api.mdc new file mode 100644 index 00000000..f0590e1c --- /dev/null +++ b/.cursor/rules/integrating-with-saleor-api.mdc @@ -0,0 +1,17 @@ +--- +description: Integrating with Saleor API +globs: +alwaysApply: false +--- + +# Verify Schema + +Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](mdc:graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API. + +# GraphQL Files + +Whenever the user requires some GraphQL query/mutation, write them to a .graphql file in "/graphql" folder. Queries go to "/query", mutations go to "/mutations" etc. + +# Generating Types + +When you add a new GraphQL file, make sure to regenerate the types using the "generate" command from [package.json](mdc:package.json). It may take some time for the TS Server to detect the changes. \ No newline at end of file diff --git a/.cursor/rules/refer-to-schema.mdc b/.cursor/rules/refer-to-schema.mdc deleted file mode 100644 index 84cb5e85..00000000 --- a/.cursor/rules/refer-to-schema.mdc +++ /dev/null @@ -1,9 +0,0 @@ ---- -description: Integrating with Saleor API -globs: -alwaysApply: false ---- - -# Verify schema - -Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](mdc:graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API. \ No newline at end of file diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 1903f6f8..6477c495 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1 +1,13 @@ +# Copilot Instructions + +## Verify Schema + Whenever the user is asking for integration with Saleor API, verify the [schema.graphql](../graphql/schema.graphql) to match the queries, mutations and inputs required by Saleor API. + +## GraphQL Files + +Whenever the user requires some GraphQL query/mutation, write them to a .graphql file in [/graphql](../graphql) folder. Queries go to "/query", mutations go to "/mutations" etc. + +## Generating Types + +When you add a new GraphQL file, make sure to regenerate the types using the "generate" command from [package.json](../package.json). It may take some time for the TS Server to detect the changes.