From 61626dc9e5d580878dec665aa2d2ac976103a826 Mon Sep 17 00:00:00 2001 From: Mahdi Azarboon <21277296+azarboon@users.noreply.github.com> Date: Wed, 25 Dec 2024 05:18:40 +0800 Subject: [PATCH] docs(appsync): add placeholder Query type for improved schema compatibility (#32652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Issue # (if applicable) Closes #. ### Reason for this change My earlier PR (#32633) addressing the same issue was approved but encountered sync problems, leading me to close it and open this fresh PR. I’ve ensured this branch is properly synced, and I hope the issue is resolved. For clarity, the rationale behind this change is as follows: While the current schema is technically valid with a single root Mutation type, most GraphQL clients and tools expect a default Query operation for introspection and standard queries. This PR introduces a minimal placeholder Query type to enhance compatibility and align with widely accepted GraphQL conventions. ### Description of changes ### Describe any new or updated permissions being added ### Description of how you validated changes ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/aws-appsync/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/aws-cdk-lib/aws-appsync/README.md b/packages/aws-cdk-lib/aws-appsync/README.md index f0ab40d93b3c8..1f85e8bdedc08 100644 --- a/packages/aws-cdk-lib/aws-appsync/README.md +++ b/packages/aws-cdk-lib/aws-appsync/README.md @@ -240,6 +240,10 @@ input DemoInput { type Mutation { callStepFunction(input: DemoInput!): job } + +type Query { + _placeholder: String +} ``` GraphQL request mapping template `request.vtl`: