Skip to content

Commit

Permalink
docs(appsync): add placeholder Query type for improved schema compati…
Browse files Browse the repository at this point in the history
…bility (#32652)

### Issue # (if applicable)

Closes #<issue number here>.

### 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

<!— What new or updated IAM permissions are needed to support the changes being introduced ? -->


### 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*
  • Loading branch information
azarboon authored Dec 24, 2024
1 parent d48d77a commit 61626dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/aws-cdk-lib/aws-appsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ input DemoInput {
type Mutation {
callStepFunction(input: DemoInput!): job
}

type Query {
_placeholder: String
}
```

GraphQL request mapping template `request.vtl`:
Expand Down

0 comments on commit 61626dc

Please sign in to comment.